【发布时间】:2015-01-20 17:56:58
【问题描述】:
所以,我有堆积条形图,当数据标签不适合该区域时,我想隐藏它们。例如类别 8,根本没有数据标签“4”。 这是一个类似的问题: Highcharts stacked bar chart hide data labels not to overlap 但我的问题是我还需要在导出时隐藏标签
我在生成图表以隐藏标签后完成了这段代码
$.each(this.chartObject.series,function(i,data_series){
if (data_series.visible){
$.each(data_series.data,function(j,data){
if(data.yBottom != null && data.plotY != null){
if(data.yBottom - data.plotY < 15){
if (typeof data.dataLabel != 'undefined'){
data.dataLabel.hide();
}
}
}
});
}
});
【问题讨论】:
标签: highcharts