Highcharts polar:当切换到可见时,系列会出现在其他系列之上
Highcharts polar : series appear over others when toggle to visible
我正在使用 Highcharts 绘制极坐标图。当我加载页面时,默认情况下某些系列是不可见的。问题是当我想展示它们时,它们出现在其他人之上...
你可以在这里看到它:http://jsfiddle.net/kd2fs3rz/
加载页面时,变量 data
通常由 Ajax 加载。
当我展示系列赛 2 和系列赛 3 时,我该如何做?
您需要明确设置每个系列的zIndex:
var zIdx = 0; // Within the function, but outside of the while loop
chart.addSeries({
id: e.vag_id,
name: e.vag_id,
data: temp,
visible: visible,
zIndex: zIdx++ // Here
});
我正在使用 Highcharts 绘制极坐标图。当我加载页面时,默认情况下某些系列是不可见的。问题是当我想展示它们时,它们出现在其他人之上...
你可以在这里看到它:http://jsfiddle.net/kd2fs3rz/
加载页面时,变量 data
通常由 Ajax 加载。
当我展示系列赛 2 和系列赛 3 时,我该如何做?
您需要明确设置每个系列的zIndex:
var zIdx = 0; // Within the function, but outside of the while loop
chart.addSeries({
id: e.vag_id,
name: e.vag_id,
data: temp,
visible: visible,
zIndex: zIdx++ // Here
});