<script>
var lineChartData = {
labels : ["January","February","March","April","May","June","July"],
datasets : [
{
fillColor : "rgba(220,220,220,0.5)",
strokeColor : "rgba(220,220,220,1)",
pointColor : "rgba(220,220,220,1)",
pointStrokeColor : "#fff",
data : [65,59,90,81,56,55,40]
}这里面的数据如何实现动态传值,如果我们的值是从数据库取得怎么传过去?
ajax吧,简单粗暴。
js代码用后台程序动态生成就可以啦
http://segmentfault.com/a/1190000004106175 是个echarts 动态获取的,原理应该一样。
demo地址:http://cuihuan.net:1015/demo_file/echarts_realtime_demo/demo.html
么个对应一个变量,想修改时直接修改变量。
用双向绑定策略?