首页 > 解决方案 > Dependency-Wheel 项目无连接

问题描述

有没有办法添加没有连接的项目?

尝试将“to”或“weight”设置为空或 null,但这会停止渲染图表

https://www.highcharts.com/samples/codepen/highcharts/demo/dependency-wheel

标签: highcharts

解决方案


这不受支持,但您可以在创建图表后隐藏一些连接:

chart: {
    events: {
        load: function() {
            var points = this.series[0].points;

            points.forEach(function(point) {
                if (
                    point.from === 'Brazil' ||
                    point.to === 'Brazil'
                ) {
                    point.graphic.hide();
                }
            });
        }
    }
}

现场演示:http: //jsfiddle.net/BlackLabel/tq2x4m1n/

API 参考: https ://api.highcharts.com/class-reference/Highcharts.SVGElement#hide


推荐阅读