在canvas.js中循环数据

时间:2018-12-05 09:55:53

标签: canvas litterallycanvas.js

dataPoints = [ value1, value2 ]
data: [
  {
    name: dataPoints[0],
    type: "line",
    yValueFormatString: "#",
    showInLegend: true,
    dataPoints: [
      { x: new Date(2017,6,24), y: 1 },
      { x: new Date(2017,6,25), y: 31 },
      { x: new Date(2017,6,26), y: 29 },
      { x: new Date(2017,6,27), y: 29 },
      { x: new Date(2017,6,28), y: 31 },
      { x: new Date(2017,6,29), y: 30 },
      { x: new Date(2017,6,30), y: 29 }
    ]
  },
  ...
]

我想拥有这些数据,并与dataPoints循环。它应该是动态的。有人可以帮助我如何进行此操作

0 个答案:

没有答案