Comments (5)
个人感觉
- rener负责绑定的方案很赞
- 关于多实例,render后返回实例更容易拓展和操作(大多数库都是这样),如果统一维护map实例表还需要管理所有的更新和销毁,比较麻烦,也容易产生耦合,感觉不如抛给用户自行处理
from g2plot.
如果考虑 render 后返回实例,不如进一步考虑一下:
const options = {
geom: {
type: 'bar', // bar, line,pie etc...
someUniqueOptions, // 某种图表才支持的选项
},
data,
...options,
};
plot.render(options);
第一,不会先有一个某种图表的实例,再有一个 render 的实例,导致用户认知上的问题;
第二,好扩展。举个例子:
这种图如果按照现在的 API, 可能需要搞一个新的 chart 类型?option 形式的话将 geom
定义成数组,里面分别定义 bar 和 line。相应 yAxis
也支持数组,以 index 或者 alias 形式指定这个定义的是哪个 geom 的 y 轴。
from g2plot.
对于目前将柱状图分为Column,GroupColumn,StackColumn。个人建议应该合并成一个Column。Column 实际上是单柱状图与重叠柱状图的实现途径。而实际需求上还有,重叠分组柱状图,分组堆叠柱状图。实际上他们不过是通一份数据的不同展示
from g2plot.
这种图如果按照现在的 API, 可能需要搞一个新的 chart 类型?option 形式的话将
geom
定义成数组,里面分别定义 bar 和 line。相应yAxis
也支持数组,以 index 或者 alias 形式指定这个定义的是哪个 geom 的 y 轴。
这种feature会在混合图表支持,现在已经单独把layer(图层)抽出来了~
from g2plot.
长远来看,区分的细致一点更容易解耦,如果以后能够提供动态打包的功能也能够在一些图形上做一些代码的取舍,或者做成不同图形从cdn直接异步获取的形式,能够更好地缩减主体入口的文件体积
from g2plot.
Related Issues (20)
- 分页器的箭头怎么自己定义形状
- 🐛 [BUG]双轴图开启缩略轴宽度发生变化 不自适应问题+缩略轴拖拽没有及时同步右侧view问题
- 🐛 [BUG] color 使用函数调用时,slider 显示 bug
- @antv/g2 新的大版本v5 的升级 有开发和发布计划吗? HOT 3
- 请问@antv/g2plot的动画支持循环播放吗?
- 🤔 [QUESTION] Line大部分属性报缺失Error
- 🤔 [QUESTION] 双轴-多折线图中如何设置折线区域填充呢?
- 🤔 [QUESTION] 关于扇形仪表盘FanGauge
- @antv/g2plot,散点气泡图中的四象限图,怎么监听每个象限的点击事件,产品需要拿每个象限的点击事件去做业务 HOT 1
- 🤔 [QUESTION] Anyone here was able to use Donut chart ? HOT 1
- 🐛 [BUG] 条形图设置圆角无效
- 🤔 [QUESTION] Where I can see list of built-in interactions ?
- 🐛 [BUG] 条形图负值较大时和y轴文字重叠
- 🐛 [BUG]官网多图表联动bug
- 🤔 [QUESTION]多图表tooltip x轴的相同时间值联动,除了plot2.chart.showTooltip(point); 有无更好方式
- 🤔 [QUESTION]折线图x轴如何显示最小时间和最大时间,并且不重叠,中间时间自动设置
- 🐛 [BUG]"export 'StackedBar' was not found in '@antv/g2plot'
- Creating a new theme for React G2plot
- G2Plot 如何给轴标签添加图片
- 🐛 [BUG]legend maxWidthRatio不生效
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from g2plot.