我正在尝试使用ZingChart创建实时时间序列图.但我希望它是累积的,其中所有点在数据追加时累积.所以我在每个ajax轮询中使用"appendseriesvalues"来附加数据,并将数据作为JSON对象传递给(key,value)对.
我的代码如下:
var chartData = {
"show-progress":false,
"gui":{
"behaviors":[
{
"id":"ZoomIn",
"enabled":"all"
},
{
"id":"ZoomOut",
"enabled":"all"
},
{
"id":"ShowAll",
"enabled":"all"
}
]
},
"type":"line",
// "utc":true, /* Force UTC time. */
// "timezone": -5,
"plotarea": {
"adjust-layout":true /* For automatic margin adjustment. */
},
"scale-x":{
"values": [],
"label":{ /* Add a scale title with a label object. */
"text":"Above is an example of a time-series scale",
},
"min-value":1420070400000, /* Unix timestamp for Jan 1, 2015. */
"step":"second",
"transform":{ /* Converts …Run Code Online (Sandbox Code Playgroud)