谁能推荐一个带有数据绑定的d3.js前端?例如,我点击我的前端按钮,它改变了我的d3.js图表的一部分。或者我点击我的d3图表,额外的数据会弹出我的表格。
我认为React会是一个很好的选择,但是我几乎没有看到任何教程将两者结合起来。
Angular, Vue或React,任何前端框架都可以很好地工作。
只需捕捉将要修改图表的点击事件,并使用一个函数来刷新图表,因此您将其绑定到点击。
类似于(即value):
<button @click="update()">Update Values</button>
在方法中:
update: function() {
//Do the changes over the data here and then call the render function
this.renderChart()
}
renderChart: function() {
// All the d3 code here to build the chart with updated data
}