0
是否可以点击明细后动态显示series.data.name显示series.data.name动态
这里是我的小提琴https://jsfiddle.net/prashu421/5Lzskkwg/4/,现在当你点击“铬”它drillsdown在那里我会喜欢显示文本“Chrome”,对于任何其他动态钻取类似,是否可以这样做?
我发现这个参考文献http://jsfiddle.net/KFpJC/2/,但是这是使用固定的文本来显示和隐藏。
更新:我希望系列名称显示在example中显示“Plot Band”的相同位置,但只在深入钻取后显示。
chart: {
type: 'column',
events: {
drilldown: function() {
var myAxis = this.xAxis[0];
var myPlotBands = myAxis.plotLinesAndBands;
$.each(myPlotBands, function (i, linesAndBands) {
linesAndBands.svgElem.hide();
if (linesAndBands.label) {
linesAndBands.label.css({
display: 'none'
});
}
});
},
drillup: function() {
$.each(this.xAxis[0].plotLinesAndBands, function (i, linesAndBands) {
linesAndBands.svgElem.show();
if (linesAndBands.label) {
linesAndBands.label.css({
display: 'block'
});
}
});
}
}
},
我刚开始使用Highcharts,任何建议/帮助表示赞赏。
谢谢。
哪里想显示的系列名称?在图表标题中,作为轴标题,在div的某处等等? –
你好@BarbaraLaird,我希望它显示在“Plot Band”显示在这个小提琴的同一个地方 - http://jsfiddle.net/KFpJC/2/,但是只在深入钻取之后。谢谢。 –