Home Forums Chart Support how to put the label inside of the rectangles?

how to put the label inside of the rectangles?

Viewing 5 posts - 1 through 5 (of 5 total)
  • #42225

    1. I would like to put the labels inside the rectangles of the diagram, that is, instead of them being written below each rectangle – they will be written inside it vertically.
    Is it possible to do such a thing?

    2. When I enter full data some of the left labels disappear (perhaps because there is no space for them) how can they be shown anyway?

    https://jsfiddle.net/uoce26gt/

    Thank you!

    • This topic was modified 1 year, 8 months ago by shosh.
    #42226

    https://jsfiddle.net/uoce26gt/
    this is my code
    Look, the left labels don’t all appear, why?

    #42230

    @shosh,

    I would like to put the labels inside the rectangles of the diagram, that is, instead of them being written below each rectangle – they will be written inside it vertically.

    You can show text within the bar / next to bar using indexLabels. You can show indexlabel either inside or outside the bar by setting indexLabelPlacement property.
    JavaScript Chart Indexlabels

    When I enter full data some of the left labels disappear (perhaps because there is no space for them) how can they be shown anyway?

    Axis labels are shown at every interval, which is auto-calculated based on parameters like axis minimum, axis maximum, etc. In your case, you can show labels for every datapoints by setting interval: 1. Please take a look at this updated JSFiddle for working code.


    Vishwas R
    Team CanvasJS

    #42235

    Thank you very much! It helps me a lot!
    And now I see where to look for all the properties…
    Why don’t you make it automatic completion?
    It can be very effective if it brings all the options to a working environment.

    #42239

    @shosh,

    Thanks for your feedback. We will look into it in future. As of now, you can refer to documentation page for complete list of options available and try out live examples.


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.