highcharts - Dependency-Wheel 项目无连接
问题描述
有没有办法添加没有连接的项目?
尝试将“to”或“weight”设置为空或 null,但这会停止渲染图表
https://www.highcharts.com/samples/codepen/highcharts/demo/dependency-wheel
解决方案
这不受支持,但您可以在创建图表后隐藏一些连接:
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
推荐阅读
- python - 梯度下降的实现爆炸到无穷大?
- javascript - 使用两个搜索值搜索对象数组
- php - 在一个刀片 laravel 中处理两种不同的形式
- laravel - 使用 Mailgun 帐户发送电子邮件我得到的域未经验证,需要 DNS 配置错误
- c - c中的循环队列函数中的SIGSEV错误
- python - 在 Pandas 中执行类似 Vlookup 的操作
- sql-server - 列数未知的 SQL 透视 - 不是有效标识符,仅显示最小值
- javascript - 无法将 Ajax GET 调用中的数据值检索到 Django 视图中
- angularjs - 构造函数中的角度单元测试
- git - 我必须每次都应用 core.autocrlf 吗?