Home forums Using CanvasJS IndexLabel placement

This topic contains 3 replies, has 2 voices, and was last updated by  Vishwas R 2 weeks ago.

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

    Meraj Ahmed
    Member

    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

    Vishwas R
    Keymaster

    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

    Meraj Ahmed
    Member

    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 2 weeks, 1 day ago by  Meraj Ahmed. Reason: typo
    #20219

    Vishwas R
    Keymaster

    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.