如何才能实现xAxis系列'切片' &安培;外部标签分组/子系列如下例所示?
答案 0 :(得分:1)
首先,这不是Highcharts现成的东西。您提供的示例似乎涉及创建一些自己的自定义视觉效果。这一切都发生在以下文件中:
http://data.worldjusticeproject.org/scripts/0d579abd.main.js
通过beautifying此JavaScript,您可以看到外部标签已添加声明性地。例如:
function() {
"use strict";
Roli.Labels = ["1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "2.1", "2.2", "2.3", "2.4", "3.1", "3.2", "3.3", "3.4", "4.1", "4.2", "4.3", "4.4", "4.5", "4.6", "4.7", "4.8", "5.1", "5.2", "5.3", "6.1", "6.2", "6.3", "6.4", "6.5", "7.1", "7.2", "7.3", "7.4", "7.5", "7.6", "7.7", "8.1", "8.2", "8.3", "8.4", "8.5", "8.6", "8.7"], Roli.Descriptions = {
"1.0": "Constraints on Government Powers",
1.1: "Limits by legislature",
1.2: "Limits by judiciary",
1.3: "Independent auditing",
1.4: "Sanctions for official misconduct",
1.5: "Non-governmental checks",
1.6: "Lawful transition of power",
"2.0": "Absence of Corruption",
...
...
}
然后他们继续定义一个使用这些标签的函数drawRadar
。这是在扩展Backbone中的视图时进行的:http://backbonejs.org/#View-extend