我有一个柱形图,每个点有两列和n个样条线。样条曲线在IE8中的列后面呈现,但在chrome中工作正常,我需要在IE8中工作。
series: [{ data: [minReturn], name: "Minimum Projected Return" }, { data: [maxReturn], name: "Maxmimum Projected Return" },
{
type: 'spline',
name: 'Target - ' + targetName0 + " : " + targetReturn0 + "%",
data: [targetReturn0],
marker: {
lineWidth: 2,
lineColor: Highcharts.getOptions().colors[3],
fillColor: 'white'
}
}]
我动态添加了额外的样条线:
riskReturnoptions.series.push({ type: 'spline', name: 'Target - ' + $('#targetname' + i).val() + " : " + parseFloat($('#targetreturn' + i).val()) + "%", data: [parseFloat($('#targetreturn' + i).val())], marker: { lineWidth: 2, lineColor: Highcharts.getOptions().colors[3], fillColor: 'white'} });
然后为每个系列添加点:
var pointcounter = 3;
riskReturnchart.xAxis[0].setCategories(categoryArray);
riskReturnchart.series[0].addPoint(minReturn);
riskReturnchart.series[1].addPoint(maxReturn);
riskReturnchart.series[2].addPoint(targetReturn0);
for (i = 1; i <= targetno; i++) {
riskReturnchart.series[pointcounter].addPoint(parseFloat($('#targetreturn' + i).val());
pointcounter++;
}
riskReturnchart.redraw();