- 当只有1个扇形时,角度计算-6.285040585751744e-7和0,相减小于0.0001,也不绘制
- bbox.js: getBBoxFromArc方法对于整圆的判断错误,导致半圆弧的最小包围盒计算错误 (8763929f)
- fix the error when pie chart data difference is very large. Closed #514 (b3bf2932)
- add null value judgment to prevent error. (c9be938a)
- legend filter should work during pan or pinch. Closed #467 (3be0359f)
- should filter the points when calculate the polyline shape's bounding box. Closed #468 (00883059)
- add test case for issue 488, the bug has fixed at antvis/adjust#2, Closed #488. (e4381e0a)
- close F2.track(). (ae6331b5)
- tooltip: miniprogram support xTip. (e9115c38)
- add label1offsetY, label2OffsetY to adjust label position for pie-label. (7cac3ce4)
- Guide.Point, fix the bug caused by parsePoint() return null. Closed #458. (2edbb03f)
- pieLabel getBBox() should compact node and mini program env. Closed #448. (29ebd491)
- fix the bug that axis configuration not work when data is empty. Closed #439. (594e4f84)
- fix the bug that grid callback return null did not work. Closed #437 (717f2bf6)
- syncYScales: scale should re-calculate the ticks (ef68c0c8)
- Arc shape support fill. Closed #429. (dc4981fc)
- filter grid points which not in the range 0 to 1. (f25b1300)
- support snap property for crosshairs. (267e59eb)
- Guide component support change visible. (1ba0db13)
- PieLabel plugin support active selected shape. (fc06bca3)
- optimize category scale's normalization of non-drawing data. For pan and swipe interaction. (14556a29)
- tooltip tip content support callback. (506b1fb2)
- auto adjust tooltip's tips position. (5b13ecde)
- support swipe interaction. (5fb037f9)
- support speed and step setting for category scale pan interaction.Closed #357,#343. (fbcf0c89)
- add F2.Global.legend.common and F2.Global.axis.common for generic theme configuration. (becd26c0)
- add PieLabel plugin for rendering the labels of pie chart. (6ba1c70e)
- support 'x', 'y', 'xy' three types for tooltip crosshairs, and support xTip and yTip display for tooltip. Closed #369. (7fad5c78)
- fix the gradient color bug. Closed #389. (5cf6e442)
- fix pinch errors of category scale. Closed #342. (d41802f2)
- fix angle calculation problem with linear gradient. (4adbb845)
- fix the draw error caused by smooth area animation. Closed #373. (407fdf5c)
- fix the draw error of polyline which has empty points but still fill the area. Closed #363. (2c336837)
- let 'interval-select' interaction work for mixed charts. Closed #355. (b80aa3ff)
- upgrade @antv/util to 1.2.5 (ff8eb0f7)
- fix the error when draw Guide.regionFilter for area chart. Closed #345. (3900565d)
- add some padding in the vertical direction of chart clip area. Closed #336. (ab485d15)
- fix the error that when the grid is a function and specify the type as 'arc'. Closed #331. (b27a0727)
- when the points is empty, return. Closed #316. (82d5c2c7)
- fix the bug when customizing the legend, the function type marker not work. Closed #317. (d631466c)
- Optimized geometry shape's id generation strategy. Closed #318. (ea7adc9d)
- upgrade babel7. (ee2087e2)
- Guide.point, the render method should return the point shape. (e83a3a1c)
- attrs should be deep clone. Closed #288. (2e4a90b9)
- when Text shape's text attribute is updated, the textArr attribute should be reset. Closed #302. (1625a22e)
- if text shape's x or y is NaN, there will be a drawing error in webchart mini program. Related to antvis/wx-f2#81. (4f0ca529)
- if there is a point with NaN value in the Polyline's points, there will be a drawing error in webchart mini program. (d5b39bef)
- when text shape's content is 0, ensure it will be rendered. Closed #282. (b35dedf2)
- add Node.js 10 (c6adb987)
- support set gradient color in default. Closed #243. (20b18a90)
- support
syncY
property to unify multiple Y-axis data ranges. Related to #258. (854685e8) - support set default selected shape for pie-select and interval-select interaction. Related to #248. (55364d59)
- when geom clear, the
_width
should be reset. Closed #273. (a36aa67f) - when chart update, tooltip's
_lastActive
should be reset. Closed #271. (297ae475) - define calculateBBox method for smooth area shape for getBBox(). (ebf8539d)
- Fix sorting problem for categorical data. Closed #257. (3a129289)
- add interactions for chart, includes: 'pie-select', 'interval-select', 'pan' and 'pinch'.
- add chart.guide().regionFilter({}).
- add chart.guide().point({}).
- add scrollBar plugin for pan and pinch interaction. (08b18c38)
- add guide.repaint() method. (e626def6)
- Guide component add
limitInPlot
property to limit guide draw in chart plot area. Closed #203 (05bf832c) - add show() and hide() methods for
Geometry
instance. (652ce741) - add
limitInPlot
property for chart, to limit the drawing area of geometrys. (74e53218) - the drawing order of geoms can be decided by scale values. (1f2993e6)
- Fix problem with element zIndex in tooltip. Closed #216 (2b83bb83)
- fix axis label animation. (8b1f7b19)
- when x scale is category, do not need to sort data. Closed #202. (184f3937)
- The position of the canvas in the parent container needs to be considered when calculating the Guide.Html position. (512e025d)
- timeCat type scale setting values caused an error in chart drawing. (d1391bd3)
- remove index-common and update index. (38e89096)
- configuration update. (45333936)
- handle the compatibility of Element.prototype.remove(). (97215b9a)
- require from lib folder. (b06507b1)
- use public package
@antv/scale
and@antv/adjust
. (84e9a90f) - use public module
@antv/attr
. (357679bc) - use @antv/util as utility methods. (c619b66b)
- add test cases for all of the interactions. (77ffa62c)
- add test case for scrollBar plugin. (b8ac2974)
- fix the problem that tooltipMarker not show. Closed #234. (334eb765)
- fix smooth area chart's update animation does not work. Closed #235. (53124c33)
- support guide animation. (51fd1dd8)
- Optimize automatic position adjustment of Guide Tag. Closed #225. (2c0c18a2)
- Not support triggerOn callback usage for tooltip and legend any more. (33624cb1)
- Guarantee the accuracy of the trigger point coordinates. Closed #210 (db3d25c8)
- when set chart.legend(false), chart.getLegendItems() return empty. Closed #190. (c75fdb82)
- fix radar chart drawing path error. Closed #180 (257e2030)
- negative data, drawing graphics(bar chart and area chart) beyond the canvas. Closed #179 (3767e386)
- add f2 track, issue #156. (a301f3ab)
- fix main entry configuration. (352dcefa)
- update package.json configuration. (6f3ee61f)
- when data changed, the padding should be recalculated. (fe7c2215)
- fix the error when values are all null in linear scale. (54787f36)
- fix the interval y scale unable to set min. (9c124f9d)
- chart legend support single select mode. (ebf6db35)
- prevent same plugins repeat init. (89874884)
- when chart is clear, chart.getSnapRecords() should not be affected. (1dbdd79b)
- fixed stack point chart draw error. Closed #119 (d3632781)
- auto padding calculate should consider legend's offsetX and offsetY. (93f75681)
- getSnapRecords() - pick data more accurate in pie chart. (d3d6ddc2)
- the drawing problem when the data of rounded interval shape is zero. (ee79a36c)
- Support for rotation of text shapes. (8d01b4d6)
- Support polar coordinate grid lines can be drawn as arcs. (e8178a99)
- Optimize shape's unique id generation strategy. (09036bad)
- add isCategory property for TimeCat scale. (6299df3a)
- animate: fixed issue where geometry animation could not be closed. (e0c39b2b)
- theme: adjust axis-line's display position. (423b05cc)
- dev: require on demand: bundler app (b6fc228c)
- Group support matrix animation (0789075f)
- add chart.animate() method to support more shapes' animation. (bac28f85)
- add env detect variables, support node-canvas (fcc792f2)
- gesture-plugin (4de892c9)
- animate:
- support pixelRatio setting for node-canvas. (85cb71d0)
- demo: add rotation interactive of pie chart. (cfff6817)
- canvas support alipay miniprogram (58cc8375)
- canvas support wx miniprogram. (f6c327a4)
- fix delay causes the chart not be completely drawed. (c6023c1e)
- fix bug when get records in polar coordinate. Closed #83. (1813bef9)
- adjust the zIndex of axis, guide, tooltip container. (b1d4e597)
- axis label fontFamily (e6620f16)
- stop canvas draw when animation stop. (adc33eb4)
- support chart animation. See API
- add
chart.changeSize(width, height)
method. (58c605f6) - add
chart.guide().tag()
. (f4c88331) - support multiple y axis for guide. Closed #64 (6463787b)
- scale formatter not work in tooltip. (c6aff75b)
- support area with null data (b555d7c7)
- set min and max for interval is not work. Closed #57 (1a3dde5a)
- 修复 linear scale tickCount 为 1 卡死浏览器的问题 (86f16009)
- hidden point draw error. (78fcd53b)
- chart.getSnapRecords() uncorrect in pie chart. Closed #67 (53fd40ff)
- Add complete test cases.
- 添加底层绘图引擎,详见 graphic
- 新增插件机制,更好支持图表功能扩展,详见 plugin
- 扩展图表功能组件:Tooltip、Legend,扩展 Guide 功能
- 更灵活的模块按需引用,详见按需引用
- 全新的图表样式,详见 demos
- 支持图表布局 padding 的自动计算,详见 padding
- 添加
chart.scale()
方法,用于列定义 - 扩展
adjust()
方法,支持传入对象,dodge 方式支持设置marginRatio
属性用于调整间距 chart.coord('polar')
新增radius
属性,用于调整半径大小,详见 Coordinate API
- dev:
- support setting axis's position. (2a157f25)
- demo: demo for drawing labels on pie plot, etc. (232b717f)
- demos: fix title of demos (82acc214)
- remove useless dependencies (f43b42ce)
- add something for github. (572204fd)
- contribute: add contribute.md (b6b4e3ec)
- guide: support offset setting for Guide.Text. (c0564ae6)
- support F2.Util. (b83b5e95)
- support CanvasRenderingContext2D instance. (ff2cd37f)
- better script (1d1cc799)
- should use canvas dom's width. (ca6c040a)
- dist/f2.js => dist/f2.min.js (24c5b060)
- scale: fixed bug of first record with null (f94cf376)
- chart: fixed bug of #15, getSnapRecords of pie (9b0169b3)
跟 g2-mobile 2.x 相比 F2 3.0 的变化:
-
命名空间 GM 改成 F2 ==不兼容==
-
animate 接口简化 ==不兼容==
// 2.0 chart.aniamte().wavec({ duration: 2000, easing: 'elastic', success: function() { alert('ok'); } }); // 3.0 chart.animate({ type: 'wavec', duration: 2000, easing: 'elastic', success: function() { alert('ok'); } });
-
new chart() 时的配置项
- margin 改成 padding 为了升级方面,margin 还保留支持
// 2.0 var chart = new Chart({ margin: 20 }); // 3.0 var chart = new Chart({ padding: 20 });
- 增加 width, height 属性,可以不在 canvas 上指定宽高
- 增加 pixelRatio 属性
-
intevalStack,intervalDodge,areaStack 不再在chart 上支持 ==不兼容==
F2 3.0 所有的geomety 都支持数据调整
// 2.0 chart.intervalStack().position('a*b'); // 3.0 chart.interval().position().adjust('stack')
-
自定义Shape 的接口,更改了函数名称,但是保留原先函数名的支持
- registShape 改成 registerShape
- getShapePoints 改成 getPoints
- drawShape 改成 draw
// 2.0 G2.Shape.registShape('interval', 'custom', { getShapePoints(cfg) {}, drawShape(cfg, canvas) {} }); G2.Shape.registerShape('interval', 'custom', { getPoints(cfg) {}, draw(cfg, canvas) {} });
-
时间分类(timeCat) 类型数据的 mask 改成标准格式 ==不兼容== 新的 mask 参考fecha
- 修复数据为空,同时设置列定义里面 min: 0,死循环的问题
- 修复销毁时动画未完成的 bug
- 修复 timeCat 类型的 getSnapRecords 方法返回空值的问题
- 支持外部传入 context 对象
- 支持传入 canvas 对象
- 新增半圆处理
- 新增销毁功能
- 性能优化
- 支持缓动函数
easing
自定义 - 支持传入
canvas
对象
- 修复平铺动画重复绘制问题
- 修复
guide
辅助元素模块引入时自动创建dom的问题
- 动画新增参数配置和回调
- 修复极坐标下
getRecord
方法获取数据范围不在0-1内的问题 - 给
getSnapRecords
方法新增逼近维度配置
- 绘图库绘制文字的方法添加旋转
rotate
功能
- 给 guide 的 rect 方法新增圆角配置
- 给 geom 中折线图的虚线 dash 添加全局样式配置
- 给
axis
的label
配置项添加定义文本内容功能
- 修复线图和区域图使用时间轴数据超过10条在chrome浏览器排序出错的问题
- 修复guide的clear方法没有清空html的dom元素问题
- 添加window变量保护
- 优化getSnapRecord方法
- 添加
fillOpacity
和strokeOpacity
两个图形绘图属性; - geom 对象开放
getAllShapeData()
接口,返回 geom 上所有 shape 的绘制数据; - 修复参与映射的数据属性的数据值全为 undefined 导致栈溢出的问题;
- 添加环形平铺动画方法
wavec()
; - 修复辅助html文本结构混乱问题.
- 在数据结构frame中添加源数据,供用户在扩展接口上使用
- 优化动画模块
- 给定默认颜色,将color方法变成可选项
- 修复area模块的自定义shape接口
- 新增动画功能,支持水平方向的平铺(waveh)、x轴上的缩放(scalex)、y轴上的缩放(scaley)、x和y轴同时缩放(scalexy)
- 修复shape接口
- 给line的shape新增dash方法
- 将getSnapRecords方法在chart中抛出
- guide 新增html对齐功能,支持9点对齐方式:tr、tc、tl、br、bc、bl、lc、rc、cc
- geom 添加getSnapRecords方法,提供根据画布坐标获取数据的功能
- 集成g2-core,并统一API与G2一致
- guide 拓展
- line
- arc
- text
- html
- 修复了环图在UC上的bug
- 新增加 timeCat 类型
- 调整scale tickcount 自动计算向上逼近
- 修复scale linear 的几个bug
- scale 增加了offset属性,自动计算时min,max各自浮动 百分比
- 增加了自动计算精度的功能,用户只需要传入单精度的值
- 提供了自定义样式功能,拆分坐标轴的全局配置信息
- 修复点图,边框没有颜色的问题
new
It is the first version of g-mobile.