Releases: graph-cn/flutter_graph_view
v2.1.0
What's Changed
- Features/extension by @sealoyal2018 in #30
- New Documentation and new graphic ( desing ) features by @NoachDev in #31
Pub v2.1.0
-
doc: the first complete documentation for using the markdown format. Contributed by @NoachDev #31
首份完整的markdown格式的使用文档
-
4 feats contributed by @NoachDev #31
- A new vertex shape for the graph:
VertexDiamondShape(8f42cca) - Individually scalable vertex sizes
- Solid colors
- Scalable loop arc edges
- A new vertex shape for the graph:
-
1 fix and 1 feat contributed by @sealoyal #30
- fix: edge self connection cannot apply edge decorator.
边自连接无法应用边装饰器
- feat: a new edge decorator for label support.
新增边标签显示装饰器
options ..edgeShape = EdgeLineShape( decorators: [ LabelEdgeDecorator(), ], )
- fix: edge self connection cannot apply edge decorator.
-
feat: support obtaining the center position of edges.
-
feat: support for setting the edge text renderer.
支持设置边的文本内容及渲染器
options ..edgeTextGetter = (e) {// default to e.ranking return '${e.ranking}'; } ..edgeShape = EdgeLineShape( textRenderer: EdgeTextRendererImpl(), )
Pub v2.0.2+1
- fix: the issue of incorrect rendering when calling
setStatefrom the outside修复从外部setState时无法正常渲染的问题
- fix: the issue where the data panel is still initialized even if the vertex is not
tapUp修复当节点未点击,但数据面板依然被初始化的问题
Pub 2.0.2
- feat: in the
VertexShape, add new callback functions onLoad, onDrag, onPointerUp, and onPointerDown.在实现
VertexShape时,增加onLoad、onDrag、onPointerUp、onPointerDown回调以实现个性化的事件响应。 - fix: the text wrapping issue in
VertexTextRendererImpl修复
VertexTextRendererImpl段落长度与实际文本长度不符导致换行的问题。
Pub 2.0.1
- deprecated: DreatheDecorator
废弃节点上下浮动的呼吸特效
- feat: Ensure that the graph object is not null and supports external specification.
确保 graph 对象不为空,且支持从外部指定
Pub v2.0.0
- perf: remove duplicate method calls.
针对 ForceDecorator 的子类,移除
super.compute避免重复执行 - refac: replace flame with canvas
使用原生画布来替代 flame
Warning(注意事项)
Due to the destructive changes made to most APIs that are incompatible with 1.x, please upgrade from 1.x with caution. However, if there are performance issues due to excessive data volume in the project, please do not hesitate to upgrade to 2.x, even if it requires a certain amount of work.
由于多数 API 产生了破坏性的改动,与 1.x 不兼容,请谨慎从 1.x 中升级,但如果项目中因数据量过大,遇到了性能问题,请毫不犹豫升级到 2.x,即使需要一定工作量。
Pub v1.2.1
- feat: add a decorator for counting
新增一个计数用的装饰器
- fix: the issue of font and size not displaying properly.
修复字体跟字号无法正常显示的问题
New Contributors
- @sealoyal2018 made their first contribution in #30
- @NoachDev made their first contribution in #31
Full Changelog: v1.2.0...2.1.0
v1.2.0
1.2.0
- feat: add
stopDragtoFlutterGraphWidgetto control the drag behavior of the graph view.支持通过
FlutterGraphWidget.stopDrag = false;停止视窗拖拽。 - fix[#27]: the issue does not work properly in version 1.29.0.
在 1.29.0 版本中无法正常工作的问题
Behavior change:
- Upgrade flame to 1.29.0, so the
gameRefinVertexComponentshould be replaced withgame, when usingvertex.cpn?.gameRef.升级 flame 到 1.29.0 版本,所以
VertexComponent中的gameRef应该替换为game,用到vertex.cpn?.gameRef时。
更多未发布在GitHub的变更日志(More change logs not published on GitHub)
1.1.6
- feat: 为 edge 新增
SolidArrowEdgeDecorator实心箭头装饰器support
SolidArrowEdgeDecoratorfor edge
1.1.5
- feat: Support controlling the game pause or play through the
options.pause.支持通过
options.pause控制游戏暂停或播放。 - feat: Support specifying node components through
options.vertexComponentNew支持通过
options.vertexComponentNew指定节点组件。
1.1.4+1
- fix: the issue of edge overlap when the edgeName is different but same src, dst and edgeId.
1.1.4
-
feat: add interface to
GraphAlgorithm:afterDrag,beforeMergeand etc. -
feat: add
LegendDecoratorto support the legend of the graph, to control the vertex and edge display. And fix the scroll issue of the legend panel.- feat: 新增
LegendDecorator,支持图的图例,控制节点和边的显示。并修复图例面板的滚动问题。
example:
// First add LegendDecorator to your decorators, // then set the legend options. options ..useLegend = false
- feat: 新增
-
behavior changed: remove
speedproperty fromVertexComponent.What will be effective is that all the vertex.position will be set to the vertex.cpn.position directly, when decorating the vertex in
GraphAlgorithmand sub-classes. -
behavior changed: set the radius of vertex to a private variable
-
feat: adding
GraphRouteDecorator, make the data like a brower history.- feat: 新增
GraphRouteDecorator,使数据像浏览器历史一样,支持前进后退,当有合并行为发生时。
- feat: 新增
-
feat: adding
PauseDecorator, make the graph stop updating.- feat: 新增
PauseDecorator,使图的节点停止位置更新。
- feat: 新增
-
feat: adding control panels of decorators.
example:/// 指定装饰器参数的控制面板创建方法 CoulombReverseDecorator( handleOverlay: kCoulombReserseOverlayBuilder(), ),
-
feat: enable configuring the force factor between brother vertexs.
example:/// @en: Make the repulsion between similar points smaller /// /// @zh: 使相似点之间的排斥力变小 CoulombReverseDecorator(sameSrcAndDstFactor: 1.1),
-
fix: the line added later covers the previous point.
-
feat: support image vertex.
-
feat: using tag similarity as a layout element.
example:/// @en: Make the repulsion between similar tags smaller /// /// @zh: 使相似标签之间的排斥力变小 CoulombReverseDecorator(sameTagsFactor: 0.8),
-
feat: add
draggedproperty toVertexComponentto indicate whether the vertex is being dragged.
1.1.3+1
- fix: the crash issue when force is not a number [ForceMotionDecorator].
1.1.3
-
feat:
EdgeLineShapecan append decorators.- feat: 使
EdgeLineShape可以追加装饰器。
Options() ..edgeShape = EdgeLineShape( decorators: [ DefaultEdgeDecorator(), ], )
- feat: 使
-
fix: the edge overlap problem of multiple edge graphs with two identical nodes.
-
fix: Edge with the same parameters except for different edge type is misdiagnosed as the same edge.
-
fix: correct the position of the two points of the edge.
- fix: 修正边的两个点的位置。
-
fix: the overlap issue of the data panel.
Full Changelog: v1.1.2...v1.2.0
v1.1.2
-
feat: support specifying legends and legend text build.
example
Options() ..legendBuilder = (color, i) { // default return RectangleComponent.fromRect( Rect.fromLTWH(40, 50.0 + 30 * i, 30, 18), paint: Paint()..color = color, ); } ..legendTextBuilder = (tag, i, color, position) { // default return TextComponent( text: tag, position: Vector2(position.x + 40, position.y - 6), // position: Vector2(position.x + 40, position.y - 2), // textRenderer: TextPaint( // style: TextStyle( // fontSize: 17.0, // color: Colors.white, // ), // ), ); }
Full Changelog: v1.1.1...v1.1.2
v1.1.1
What's Changed
Features
- feat: make opacity configurable for vertex and edge.
options.hoverOpacity - perf: adjusting the parameters of the decorators.
- feat: add a decorator for the anti Coulomb force rule.
- feat add a choice to HookeBorderDecorator, to control the border of the graph.
- feat: support specifying vertex text style.
- interface change: add a graph parameter to
DataConvertor.convertGraph接口变更:为 convertGraph 添加一个graph参数
- feat: add interface to
GraphComponent: addVertex, addEdge, mergeGraph - feat: add implementation of PersistenceDecorator to store position of vertex. (#10 #11, via: @jersonal-com )
- feat: support zooming through gestures.
Bugfix
- fix: make CoulombCenterDecorator a usable decorator.
- fix: vertex text style
backgroundnot working. - fix: prevent the addition of duplicate data.
- fix usage of both Scale and Pan on mobile platforms. ( #12, via: @muknta )
New Contributors
- @jersonal-com made their first contribution in #10
- @muknta made their first contribution in #12
Full Changelog: v1.0.0...v1.1.1
v1.0.0
Full Changelog: v0.3.0...v1.0.0
v0.3.0
Full Changelog: v0.2.2+1...v0.3.0
v0.2.2+1
Full Changelog: v0.0.2...v0.2.2+1
v0.0.2
0.0.2
-
feat: enable decorator for vertex.
- Remove the breath effect. To use the breath effect, please pass in BreatheDecorator() when creating the GraphAlgorithm object, such as:
FlutterGraphWidget( ... algorithm: ForceDirected(BreatheDecorator()), ... )
-
feat: adding custom properties to vertex components helps the algorithm create more effects.
-
dependency: upgrade flame from 1.6.0 to 1.7.0
- 特性:启用节点操作算法装饰器,可以多个操作算法以装饰模式的方式进行复合
- 移除原有的呼吸特效,如需保持原有的呼吸特性,可以在创建 FlutterGraphWidget 时,使用如下写法:
FlutterGraphWidget( ... algorithm: ForceDirected(BreatheDecorator()), ... )
- 特性:为节点组件追加可以自定义的属性,帮助算法实现更多特效
- 依赖:升级flame版本至 1.7.0

