Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个独特的要求。1. 呈现一个堆积条形图 2. 每个栈的颜色可以由用户在数据库中设置 3. 用户可以选中/取消选中以从图表中添加或删除一个栈 4. 用户可以更改的顺序堆栈。
1 和 2 很好,但我被困在 3 和 4。我想我将不得不为图例创建一个自定义渲染器,以便我可以添加一个复选框,但在那之后呢?
有人做过吗?或者有什么指点?
创建渲染器后,您可以在复选框的 onclick 事件上绑定一些处理程序,该事件将根据用户的选择重绘图形。