You must be logged in to post your query.
Home › Forums › Chart Support › RangeColumn & IndexLabel – only one value on top of Y
Tagged: RangeColumn
Hi,
I’m using the RangeColumn and trying to set the IndexLabel.
I read the topic and there is:
Range Charts have two indexLabels – one for each y value
I would like to show only one time! Show on top of Y. Is this possible?
Thanks from Brazil!
var chart = new CanvasJS.Chart("chartContainer", { animationEnabled: true, title:{ text: "Total Stores", }, exportEnabled: false, axisY: { includeZero:false, }, axisX: { interval:1, }, data: [ { type: "rangeColumn", bevelEnabled: false, indexLabel: "{y}", indexLabelFormatter: function(e){ if( e.index === 1) return e.dataPoint.y[1]; else return " "; }, dataPoints: [ // Y: [Low, High] {y:[0, 36],label: "Total variance",indexLabel: "SHOW THIS TEXT ON TOP"}, {y:[28, 36],label: "Year"}, {y:[27, 28],label: "Quarter"}, {y:[6, 27],label: "Manager"}, {y:[0, 6],label: "Store attributes"}, ] } ] });
@tbraida,
indexLabel and indexLabelFormatter at dataSeries will be overridden by indexLabel and indexLabelFormatter at dataPoint level. Assigning indexLabelFormatter at dataPoint level will work in your case.
— Vishwas R
You must be logged in to reply to this topic. Login/Register