Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一张美国地图,其中包含通过 JSON 填充的州明细。如何将 colorAxis 的max:值设置为特定向下钻取图中的项目总数。
现在 max: 未设置,我的 colorAxis 从 0 开始并上升到某个随机数。
您可以在 colorAxis 上设置最大值
colorAxis: { min: 0, max:50 },
或使用 tickPositioner 并根据需要进行计算。
colorAxis: { min: 0, tickPositioner:function(){ console.log(this); } },
文档:http ://api.highcharts.com/highmaps#colorAxis