Home forums Chart Support RangeColumn & IndexLabel – only one value on top of Y


Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #13048


    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,
    			text: "Total Stores",
    		exportEnabled: false,
    		axisY: {
    		axisX: {
    		data: [
    			type: "rangeColumn",
    			bevelEnabled: false,
    			indexLabel: "{y}",
    			indexLabelFormatter: function(e){
    			if( e.index === 1)
    				return e.dataPoint.y[1];
    				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 4 years, 3 months ago by 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

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.