Highcharts 如何跳过sankey图表中的一级数据?
考虑下图(下面的代码在SO代码段中不起作用,请参阅)Highcharts 如何跳过sankey图表中的一级数据?,highcharts,Highcharts,考虑下图(下面的代码在SO代码段中不起作用,请参阅) Highcharts.chart('container'{ 系列:[{ 键:['from','to','weight'], 数据:[ [开始”,“你好”,70], [“开始”,“世界”,20], ['start','yuhu',10], [你好,aaa,49], [hello','bbb',21], [bbb','OK',21], [world',OK',30], //到目前为止一切都还好 //yuhu和aaa应与OK处于同一水平 ['yu
Highcharts.chart('container'{
系列:[{
键:['from','to','weight'],
数据:[
[开始”,“你好”,70],
[“开始”,“世界”,20],
['start','yuhu',10],
[你好,aaa,49],
[hello','bbb',21],
[bbb','OK',21],
[world',OK',30],
//到目前为止一切都还好
//yuhu和aaa应与OK处于同一水平
['yuhu','KO',10],
['aaa','KO',49]
],
键入:“sankey”,
}]
});代码>
通常,您可以使用以下选项控制渲染节点的列:
通常,您可以控制渲染节点的列:使用选项:
Highcharts.chart('container', {
series: [{
keys: ['from', 'to', 'weight'],
nodes: [{
id: 'KO',
column: 3
}],
data: [
['start', 'hello', 70],
['start', 'world', 20],
['start', 'yuhu', 10],
['hello', 'aaa', 49],
['hello', 'bbb', 21],
['bbb', 'OK', 21],
['world', 'OK', 30],
// up to now everything is OK
// yuhu and aaa should be at the same level as OK
['yuhu', 'KO', 10],
['aaa', 'KO', 49]
],
type: 'sankey',
}]
});