Git Product home page Git Product logo

g2-plugin-slider's Issues

动态更新数据

想动态更新数据,以前的Range插件

$.getJSON('url',
				function(data) {
					flowChart.changeData(data)
					rainChart.changeData(data)
					flowChart.repaint()
					rainChart.repaint()

					range.clear()
					range = new G2.Plugin.range({
						id : 'range', //DOM id
						width : 800,
						height : 26,
						dim : 'time',
					});

					range.source(data);
					range.link([ flowChart, rainChart ]);
					range.render();
				});

重新new了一下。。现在这么写每次下面都会出个移动条。。怎么解决

2.1.1 版本在 module 引入初始化时报错

Summary

[email protected] 在 module 引入初始化时报错

Environment

版本 2.1.1

Expected behavior

无报错

Actual behavior

在未进一步引用时便出现报错:

Uncaught (in promise) TypeError: Cannot read property 'Group' of undefined
    at Object.<anonymous> (g2-plugin-slider.js:511)
    at __webpack_require__ (g2-plugin-slider.js:30)
    at Object.<anonymous> (g2-plugin-slider.js:96)
    at __webpack_require__ (g2-plugin-slider.js:30)
    at Object.<anonymous> (g2-plugin-slider.js:80)
    at __webpack_require__ (g2-plugin-slider.js:30)
    at g2-plugin-slider.js:73
    at g2-plugin-slider.js:76
    at webpackUniversalModuleDefinition (g2-plugin-slider.js:3)
    at Object../node_modules/_@[email protected]@@antv/g2-plugin-slider/build/g2-plugin-slider.js (g2-plugin-slider.js:10)

Steps to reproduce the behavior

前向依赖 G2 版本 3.4.5

安装插件:

npm i @antv/g2-plugin-slider --save

然后在项目中任意一个 js 文件中写入如下代码:

import G2Slider from '@antv/g2-plugin-slider';

运行即可。

How to set default position?

When I init the slider it defaults to showing a slice of data from the middle.

How can I decide with which data the slider initializes?

关于 yAxis 的疑问

yAxis
(string)
必须声明,我们的 Slider 是带有背景图表的滑动条组件,该字段用于声明该背景图表的纵轴轴映射字段。

多个纵坐标的情况下,是否也能联动?

设定滑动条text 自动隐藏?

滑动条目前可以通过textAttr 设置提示的样式或隐藏,请问是否可以设置提示默认隐藏,当鼠标移动到滑块或2个滑块之间的时候再显示? 或者是否让text出现在滑块上边,而不是左边?

限制start和end之间的距离

Summary

拖动slider的start,当start等于end时,拖拽对象会自动变成整个区间(因为start和end黏在一起了),而且这种情况下要把start 和 end 拉开相当困难。

Environment

任何

Expected behavior

如果可以限制start和end之间的距离,使得距离不要太小可能能解决。

能提供一个非线性的slider例子吗

先抱歉没按照issue格式写,我看到官网上的slider例子都是基于时间线性的,然后试了下非线性的发现不行,是不支持还是我写的不对,所以能提供一个slider的非线性的例子吗,比如如下数据结构

// 柱图数据
cons data = [
{name: 'item1',   value: 10},
{name: 'item2',   value: 20},
{name: 'item3',   value: 40},
{name: 'item4',   value: 50},
{name: 'item5',   value: 60},
...
]

span设置不生效

当使用非线性数据时,设置了startRadio和endRadio后,设置minSpan,maxSpan为相同数值但是滑块还是可以调整大小。

另外是否有开关可以关闭选区范围调整,我想每次数据分片是固定的数量

babel的loose模式会导致此模块在electron下无法加载

Summary

如题,默认构建的 build/g2-plugin-slider.js:502subClass.prototype.constructor = subClass,为只读属性,语句无法操作成功。

Uncaught TypeError: Cannot assign to read only property 'constructor' of object '#<Group>'
    at _inheritsLoose (webpack:///./node_modules/@antv/g2-plugin-slider/build/g2-plugin-slider.js?:497)
    at eval (webpack:///./node_modules/@antv/g2-plugin-slider/build/g2-plugin-slider.js?:513)
    at Object.eval (webpack:///./node_modules/@antv/g2-plugin-slider/build/g2-plugin-slider.js?:909)
    at __webpack_require__ (webpack:///./node_modules/@antv/g2-plugin-slider/build/g2-plugin-slider.js?:25)
    at Object.eval (webpack:///./node_modules/@antv/g2-plugin-slider/build/g2-plugin-slider.js?:91)
    at __webpack_require__ (webpack:///./node_modules/@antv/g2-plugin-slider/build/g2-plugin-slider.js?:25)
    at Object.eval (webpack:///./node_modules/@antv/g2-plugin-slider/build/g2-plugin-slider.js?:75)
    at __webpack_require__ (webpack:///./node_modules/@antv/g2-plugin-slider/build/g2-plugin-slider.js?:25)
    at eval (webpack:///./node_modules/@antv/g2-plugin-slider/build/g2-plugin-slider.js?:68)
    at eval (webpack:///./node_modules/@antv/g2-plugin-slider/build/g2-plugin-slider.js?:71)

Environment

  • 依赖链:
  • electron:
ares: "1.15.0"
brotli: "1.0.7"
chrome: "83.0.4103.122"
electron: "9.3.0"
http_parser: "2.8.0"
icu: "65.1"
llhttp: "2.0.1"
modules: "80"
napi: "5"
nghttp2: "1.40.0"
node: "12.14.1"
openssl: "1.1.0"
unicode: "12.1"
uv: "1.33.1"
v8: "8.3.110.13-electron.0"
zlib: "1.2.11"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.