我想在饼图中选择多个部分。如果已选择,则应在单击时取消选择该部分。
我在这里找到了一个例子。但是在这种情况下,只能选择一个部分,而单击任何其他部分,则将选定的部分取消选择。
同样,我找到了另一个示例[
$(function(){var chart = new Highcharts.Chart({chart:{renderTo:'container',type:'pie'
Run Code Online (Sandbox Code Playgroud)}, plotOptions: { series: { states: { hover: { enabled: false } }, point: { events: { click: function () { this.graphic.attr({ fill: 'yellow' }); } } } } }, tooltip: { enabled: false }, series: [{ data: [{ name: 'test', y: 29.9, color: "#CCCCCC", active: false }, { name: 'test2', y: 71.5, color: "#CCCCCC", active: false }, { name: 'test3', y: 106.4, color: "#CCCCCC", active: false }] }] }); …