【发布时间】:2014-05-10 07:29:42
【问题描述】:
我使用通用函数使用 highchart 生成折线图。对于某些图表类型,我想要没有任何点格式的工具提示,而对于另一个想要使用格式化程序功能的人,如何实现这一点。从下面的代码图表类型 1 工具提示消失。
工具提示:{ 值后缀:'', pointFormat: (chartType == 1 ? '{series.name}: {point.y}
' : '' ) , 共享:(chartType == 1 ? true : false),formatter: function() { if (chartType == 2) { return '' + this.point.tooltip + ': ' + (chartType == 2 ? this.y.toFixed(1) : this.y.toFixed(0)); } else { return false; } }
【问题讨论】:
标签: highcharts