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. Has anyone figured out how to set the theme for the highcharts rendering? Ideally, I'd like to do a chart like this: http://www.highcharts.com/demo/area-inverted/gray.

I'm using java script with the 2.0rc1 interface.

有帮助吗?

解决方案

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:

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!

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top