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"},
]
}
]
});
-
This topic was modified 8 years, 1 month ago by tbraida.