造型高图传奇

时间:2015-10-21 07:03:07

标签: javascript highcharts

我试图将highmap的图例风格化

enter image description here

我成功地更改了图例的背景颜色和标题颜色,但无法更改图例中的白色刻度线分色重定位的颜色以及每个直尺的标题(1,10,100,1k ...... )

我尝试了什么..

legend: {
                title: {
                    text: 'Population density per km²',
                    style: {
                        color: '#ff0000'
                    }
                },
                backgroundColor: 'rgba(255,255,255,0)',
                borderWidth: 0,
                borderRadius: 0,
                itemStyle: {
                    color: '#ff0000'
                }
            }

如何更改1,10,100,1k的颜色以及矩形的颜色..

1 个答案:

答案 0 :(得分:0)

您可以colorAxis中的dateClasses进行配置。

colorAxis: {

                    dataClasses: [{
                        from: -100,
                        to: 0,
                        color: '#C40401',
                        name: 'Romney'
                    }, {
                        from: 0,
                        to: 100,
                        color: '#0200D0',
                        name: 'Obama'
                    }]
                },
相关问题