我需要新的功能添加HighCharts - 添加新的动态功能
function(chart) { // on complete
chart.renderer.path(['M', 300, 0, 'L', 300, 300])
.attr({
'stroke-width': 2,
stroke: 'red'
})
.add();
chart.renderer.path(['M', 0, 150, 'L', 500, 150])
.attr({
'stroke-width': 2,
stroke: 'red'
})
.add();
}
OR
function(chart) { // on complete
var textX = chart.plotLeft + (chart.plotWidth * 0.5);
var textY = chart.plotTop + (chart.plotHeight * 0.5);
var span = '<span id="pieChartInfoText" style="position:absolute; text-align:center;">';
span += '<span style="font-size: 32px">Upper</span><br>';
span += '<span style="font-size: 16px">Lower</span>';
span += '</span>';
$("#addText").append(span);
span = $('#pieChartInfoText');
span.css('left', textX + (span.width() * -0.5));
span.css('top', textY + (span.height() * -0.5));
}
我现有图表。这些功能是动态的。他们每次更新数据库时都会更改。我怎样才能做到这一点?。
我需要一个代码,这个功能追加到现有的高图表