Bar Chart - X axis set at finite value with bars that move toward it

Created on 10 May 2023, over 1 year ago
Updated 20 October 2023, about 1 year ago

How can I create a bar graph where the X axis has a numerical range of say 0-100 and the bars move from 0 on the left to 100 on the right. Right now my bar chart just keeps growing to the right as the plot value increases.

Thanks for your time and thoughts.

πŸ’¬ Support request
Status

Active

Version

5.0

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States guymandude

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @guymandude
  • πŸ‡ΊπŸ‡ΈUnited States guymandude
  • πŸ‡ΊπŸ‡ΈUnited States guymandude
  • πŸ‡¨πŸ‡¦Canada nikathone Ontario

    Can you provide a screenshot of your bar chart and an example of what you would like it to look like? Here is a page where there is bar chart examples for highcharts. You can click the jsfiddle or codepen link to edit the data.

  • πŸ‡ΊπŸ‡ΈUnited States guymandude

    Thanks for following up. The attached diagram has the current chart on the left and the objective chart on the right. I want to be able to have a fixed value on one side (in this case it is a value of 100) and have the bars grow toward the fixed value. The values of the bars will never go over 100 as it represents percent.

  • πŸ‡¨πŸ‡¦Canada nikathone Ontario

    Which charts library are you using?

  • πŸ‡ΊπŸ‡ΈUnited States guymandude

    C3 is the one in the pics.

  • πŸ‡ΊπŸ‡ΈUnited States andileco

    Any chance you set the Y-axis min and max (assuming you're using Views)?

  • πŸ‡¦πŸ‡ΉAustria maxilein

    Ok,

    I had the same. The min- max-values entered in the Y-axis get applied to the horizontal axis.

  • πŸ‡¦πŸ‡ΉAustria maxilein

    BUT not if you use aggregation to show SUMs.

  • πŸ‡¦πŸ‡ΉAustria maxilein

    First I think I misunderstood min and max value.
    But none the less they don't have any effect.

    How can I set a max scale value that is always shown?

    Besides if your data is 13,000,000.40 in millions.
    It automatically gets cut down to a scale of 0 - 14 - which is fine for readability. (see screenshot)
    Strangely the popup data value over a bar would be cut by the 1,000 down to 13,000.
    And the minimum to maximum values don't get applied in any way.
    I also would like to have a scale from 0-20 or 0-20,000,000 respectively. None of them works. It just grows a little higher than the max of 13.
    But I would like to see the scale with a fixed width - and the bar is a proportionate part of it. That would be important to make it comparable on a visual level.

Production build 0.71.5 2024