Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
用rHighcharts包装Highchart函数_Highcharts_Rcharts - Fatal编程技术网

用rHighcharts包装Highchart函数

用rHighcharts包装Highchart函数,highcharts,rcharts,Highcharts,Rcharts,如何在图表中包装函数 例如,我希望在加载图表时将缩放设置为某些值,如下所示: a$chart( type='line', zoomType= 'xy', events=list(load=function() {chart.xAxis[0].setExtremes(6, 10);}) ) 在R中,是否有一种标准的方法来表达这个函数和highchart函数 也许我应该把它刹住。假设我想在图表加载后发送一条问候语。用Ramnaths评论的符号,我想 a$chart(

如何在图表中包装函数

例如,我希望在加载图表时将缩放设置为某些值,如下所示:

a$chart(
    type='line',
    zoomType= 'xy',
    events=list(load=function() {chart.xAxis[0].setExtremes(6, 10);})
)
在R中,是否有一种标准的方法来表达这个函数和highchart函数

也许我应该把它刹住。假设我想在图表加载后发送一条问候语。用Ramnaths评论的符号,我想

a$chart(
    type='line',
    zoomType= 'xy',
    events=list(load=!#alert('hello');#!)
)

有什么方法可以实现这一点吗?

要将函数从rCharts传递到图表,您需要将其包装在
##。这就是您想要的吗?我尝试了:events=list(load=“#!function(){this.xAxis[0].setextrems(40120);}#!”),但没有成功。结果应该是一个类似于这里描述的javascript代码