我需要在Highcharts中动态追加onload或redraw事件函数,我知道在配置步骤中进行,如:
$('#container').highcharts({
chart: {
events: {
load: function(event) {
function1();
function2();
function3();
},
redraw: function(event) {
functionA();
functionB();
functionC();
}
}
},
xAxis: {
},
series: [{
data: [29.9, 71.5]
}]
});
Run Code Online (Sandbox Code Playgroud)
但是我需要在配置图表之后这样做(因为我无法访问配置图表步骤,图表通过包装器来到我的代码中)并且我需要做这样的事情:
//The wrapper simulation
^
|
|
/////////////////////////////////////////
//$('#container').highcharts({ //
// chart: { //
// events: { //
// load: function(event) { //
// function1(); //
// }, //
// redraw: function(event) { //
// functionA(); //
// } //< "I dont't have access to this code"
// …Run Code Online (Sandbox Code Playgroud) 我需要添加一些自定义按钮(带有onclick事件),而不会覆盖导出按钮值,因为我想包含新按钮而不会丢失先前在图表中定义的自定义按钮(我的图表已经定义了自定义按钮),所有这些都在运行时,在使用此对象的Highcharts图表中:
$( '容器').highcharts()
这可能吗?