Javascript 如何使用饼图和列链接/共享图例?
如果我们以这个例子为例:Javascript 如何使用饼图和列链接/共享图例?,javascript,highcharts,legend,Javascript,Highcharts,Legend,如果我们以这个例子为例: 如何在饼图和列之间共享图例?我想在同时单击列和饼图的图例时禁用/禁用一个系列 BindLegendItem单击事件,在饼图中隐藏连接的切片。演示: 饼图选项的示例: { id: "my-pie", // ID type: 'pie', name: 'Total consumption', legendNames: ["Jane", "John", "Joe"], //NAMES d
如何在饼图和列之间共享图例?我想在同时单击列和饼图的图例时禁用/禁用一个系列 Bind
LegendItem单击事件,在饼图中隐藏连接的切片。演示:
饼图选项的示例:
{
id: "my-pie", // ID
type: 'pie',
name: 'Total consumption',
legendNames: ["Jane", "John", "Joe"], //NAMES
data: [{
name: 'Jane',
y: 13,
color: Highcharts.getOptions().colors[0] // Jane's color
}, {
name: 'John',
y: 23,
color: Highcharts.getOptions().colors[1] // John's color
}, {
name: 'Joe',
y: 19,
color: Highcharts.getOptions().colors[2] // Joe's color
}]
}
{
id: "my-pie", // ID
type: 'pie',
name: 'Total consumption',
legendNames: ["Jane", "John", "Joe"], //NAMES
data: [{
name: 'Jane',
y: 13,
color: Highcharts.getOptions().colors[0] // Jane's color
}, {
name: 'John',
y: 23,
color: Highcharts.getOptions().colors[1] // John's color
}, {
name: 'Joe',
y: 19,
color: Highcharts.getOptions().colors[2] // Joe's color
}]
}