【发布时间】:2017-01-07 17:58:33
【问题描述】:
我正在使用 ZingChart,我正在尝试将 3 个不同的系列添加到折线图中。 问题是当我这样做时,选择标记不起作用。 似乎发生的情况是,第二和第三系列没有像我预期的那样收到任何事件,而是其他节点收到它们。 我正在尝试做的事情无效吗?
我想将这些日期分成 3 组,以便为每组设置不同的标记。如果我可以以其他可以接受的方式设置标记。
var myConfig = {
graphset:[
{
type:"line",
x:"0%",
y:"0%",
height:"100%",
width:"100%",
plot: {
selectionMode : 'multiple',
selectedMarker:{ //sets the styling for selected marker (per series)
type:"star5",
backgroundColor:"white",
borderColor:"black",
borderWidth:2,
size:8
}
},
scaleY: {
minValue: 0,
maxValue: 10,
step: 1
},
scaleX: {
// minValue: 1480883248000,
// step: 720000,//12min
transform: {
type: 'date',
all: '%m/%d/%y %h:%i %A'
},
},
series: [
{
text: 'f',
values: [
[1480883248000, 1],
[1480898368000, 1],
[1480883248000, 1],
[1480883968000, 1],
[1480884688000, 1],
[1480885408000, 1],
[1480886128000, 1],
[1480886848000, 1],
[1480887568000, 1],
[1480888288000, 1],
[1480889008000, 1],
[1480889728000, 1],
[1480890448000, 1],
[1480891168000, 1],
[1480891888000, 1],
[1480892608000, 1],
[1480893328000, 1],
[1480894048000, 1],
[1480894768000, 1],
[1480895488000, 1],
[1480896208000, 1],
[1480896928000, 1],
/* [1480897648000, 1, 'n'],
[1480898368000, 1, 'n'],
[1480899088000, 1, 'n'],
[1480899808000, 1, 'n'],
[1480900528000, 1, 'n'],*/
],
marker: {
type: 'circle',
size: 2
}
},
{
text: 'a',
values: [[1480883728000, 1]],
marker: {
type: 'triangle',
size: 7
}
},
{
text: 'n',
values: [[1480894168000, 1]],
marker: {
type: 'square', //circle
size: 7
}
}
]
}
]
};
zingchart.render({
id : 'myChart',
data : myConfig,
height: 400,
width: "100%"
});
【问题讨论】:
标签: javascript charts zingchart