Fixed height on bar chart

0
Hi, I'm currently working on a bar chart. I want every bars on my chart to have fixed height. How can I achieve that result ? This is my current bar chart, it automatically adjust its height.   Image 1 ) Image 2 )   Thank you : )
asked
3 answers
0

Hi Putharin,

The idea of a bar chart is that it gives you a visual representation of differences between values. If you want them to be of the same length however, you can do this by setting/manipulating the values right? Give every bar the same value, and it'll be the same lenght. Actual size of the element on your page (and subsequently, size of the bars on your screen) can be manipulated using css.

Let me know if you need any additional help!

answered
0

Hi Phutharin,

My bad, I misunderstood your question. If you are using this Chart widget (https://appstore.home.mendix.com/link/app/105695/) you'll have (lmost) endless customization possibilities, of which most can be found in the widget documentation. Bar width however isn't. But, since you can use all plotly.js features, you can check out the below url to find your desired customization properties. Good luck!

https://plot.ly/javascript/reference/#layout-legend
answered
0

Hi again,

I can finally see what I want to achieve now.

So basically I want this height of the bar chart here,

to be automatically adjusted based on how many data is in the chart.

For instance,

100 * 1 for 1 data

100 * 2 for 2 data

100 * 3 for 3 data

..................

Where do I have to customize in order to achieve this result ?

Thank you :)

answered