[英]Rally Chart with Black Background
I see a couple questions out there like this: Rally Standard Report charts with a black background , where people want to be able to change the background color of the charts. 我看到了几个这样的问题: 黑色背景的Rally Standard Report图表 ,人们希望能够更改图表的背景颜色。 Has anyone figured out how to set the theme for the highcharts rendering?
有没有人想出如何为highcharts渲染设置主题? Ideally, I'd like to do a chart like this: http://www.highcharts.com/demo/area-inverted/gray .
理想情况下,我想绘制如下图表: http : //www.highcharts.com/demo/area-inverted/gray 。
I'm using java script with the 2.0rc1 interface. 我将Java脚本与2.0rc1接口配合使用。
I found this while trying to solve a similar problem: Rally chart documentation 我在尝试解决类似问题时发现了这一点: 拉力表文档
If you use the updateBeforeRender option, you can reference Highcharts, specifically the method: 如果使用updateBeforeRender选项,则可以引用Highcharts,特别是方法:
Highcharts.setOptions();
which is what you need to use something like the gray theme. 这就是您需要使用灰色主题之类的东西。
Here is what my chart config looks like: 这是我的图表配置:
App.down('#chartContain').add({
xtype: 'rallychart',
updateBeforeRender: function() {
Highcharts.theme = {...}
Highcharts.setOptions(Highcharts.theme);
}
...
}
Copy the theme code from the Highcharts documentation and you should be good to go! 复制Highcharts文档中的主题代码,您应该一切顺利!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.