Home Forums Chart Support IndexLabel placement

IndexLabel placement

Viewing 4 posts - 1 through 4 (of 4 total)
  • #20209

    see this example.
    I have specified indexLabelPlacement: "outside". But not all the indexLabel are completely outside, first column’s indexLabel is inside at the top.
    I want the indexLabel to be completely outside so that it will look uniform.
    How to do that?

    #20210

    Meraj Ahmed,

    IndexLabel of first dataPoint is placed inside as there is no space to position it outside the column. Increasing axisY maximum to a value greater than larger dataPoint value will make space for indexLabel to render it outside column. Please take a look at this updated jsfiddle.


    Vishwas R
    Team CanvasJS

    #20213

    Ok, but your code hardcode the maximum value of y-axis. We can find the maximum value by iterating over each data point.
    But is there any inbuilt feature for finding the maximum value. And how much offset to take for y-axis maximum value?
    And, how to handle the same problem for stacked column chart like this?

    • This reply was modified 6 years, 8 months ago by Meraj Ahmed. Reason: typo
    #20219

    Meraj Ahmed,

    You can set axis maximum based on the maximum of sum of dataPoints from all dataSeries. Please take a look at this updated jsfiddle.


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.