amcharts4 icon indicating copy to clipboard operation
amcharts4 copied to clipboard

I need to set the max value on value axis as 100. It shouldn't exceed 100. But if all the value's in my graph are below 50 then max value shouldn't exceed 50.

Open VineelaKantamneni opened this issue 1 year ago • 6 comments

I had tried using default behaviour...but when max value in my graph is 100 then it's going up to 120...It's looking like below. Screenshot from 2022-09-19 17-54-02

I had set strictminmax property to true then it's giving like below: for ex: max value is 42%....The value axis is upto 40 only Screenshot from 2022-09-19 17-53-46

VineelaKantamneni avatar Sep 19 '22 12:09 VineelaKantamneni

Try setting strictMinMax = true on your Y axis.

martynasma avatar Sep 19 '22 12:09 martynasma

I had tried setting that if I set that then case 2 mentioned above is arising. Screenshot from 2022-09-19 17-53-46

for ex: max value is 42%....The value axis is upto 40 only

VineelaKantamneni avatar Sep 19 '22 13:09 VineelaKantamneni

Not sure how that is possible, unless you also set max. Can you post your chart on CodePen?

martynasma avatar Sep 19 '22 13:09 martynasma

Below are links to code pens. https://codepen.io/vineelak/pen/OJZgRLO In the above graph max value in my graph is 100. by default I'm getting value axis greater than 100. If I set valueAxis.strictMinMax = true; property then the axis is upto 100.

It's Fine but sometimes I get values of the chart all most equal and the max value on the valueaxis should be based on max value in my data. As I'm setting valueAxis.strictMinMax = true; I'm getting chart like in below link. https://codepen.io/vineelak/pen/KKRqgXY

You can observe above issue in below screenshot. max val60ue in my graph is around 49. so I have to get value axis upto 60. But I'm getting only till 40 due to property valueAxis.strictMinMax = true; A Pen by vineelak

VineelaKantamneni avatar Sep 20 '22 05:09 VineelaKantamneni

You can add an adapter for max value: https://codepen.io/team/amcharts/pen/rNvwjpq/179c6b7db861ee89b16f366a073f2f8e?editors=1010

zeroin avatar Sep 20 '22 07:09 zeroin

It's working. Thank you. @martynasma and @zeroin

VineelaKantamneni avatar Sep 20 '22 12:09 VineelaKantamneni

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Oct 21 '22 00:10 github-actions[bot]