Home Forums Chart Support horizontal bar chart the bar length not proportionate to the value

horizontal bar chart the bar length not proportionate to the value

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

    pl see The bar length for the 500 (500/1000)*100) is more than the 900 (900/1000)*100). How to make it proportionate.

    #61375

    @vkkindia,

    The datapoint with the y-value of 900 should appear longer than the one with 500, and it seems to be working as expected in this case. Can you kindly create JSFiddle reproducing the issue you are facing & share it with us? Sharing the link with us will help us analyze the chart options and code in detail, so we can provide a more precise solution.


    Vishwas R
    Team CanvasJS

    #61376

    https://jsfiddle.net/exoc37vq/ Infact i had added the link in my question.

    (1000/1000)*100 = 100%
    (500/1000)*100 = 50%
    (900/1000)*100 = 90%

    #61378

    @vkkindia,

    There are three different charts with datapoint values of 1000, 500, and 900. The reason 900 looks shorter than 500 in another chart is that the axis doesn’t start from 0. Setting includeZero to true across all the charts should work fine in this case, making the values display consistently.


    Vishwas R

    #61380

    OK, i set it right in another way

    
      axisY: {
        gridThickness: 0,
        lineThickness: 0,
        tickThickness: 0,
        margin: 0,
       minimum:0,
        maximum:1100, 

    minimum:0, was the key

    • This reply was modified 2 weeks ago by vkkindia.
Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.