1

我有一张美国地图,其中包含通过 JSON 填充的州明细。如何将 colorAxis 的max:设置为特定向下钻取图中的项目总数。

现在 max: 未设置,我的 colorAxis 从 0 开始并上升到某个随机数。

4

1 回答 1

1

您可以在 colorAxis 上设置最大值

colorAxis: {
        min: 0,
        max:50
},

或使用 tickPositioner 并根据需要进行计算。

colorAxis: {
            min: 0,
            tickPositioner:function(){
                    console.log(this);
            }
},

文档:http ://api.highcharts.com/highmaps#colorAxis

于 2015-04-16T11:26:12.543 回答