【问题标题】:Dependency-Wheel item without connectionDependency-Wheel 项目无连接
【发布时间】:2023-03-21 10:59:01
【问题描述】:

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

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

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

【问题讨论】:

  • 很遗憾,不支持在没有连接的情况下添加项目。

标签: highcharts


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-03-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-09-07
    • 1970-01-01
    相关资源
    最近更新 更多