pradip.walghude
Posts: 23
Joined: Thu Jan 28, 2021 10:02 am

Unable to set tick Amount on bar chart

Hi Team,

I want to display five ticks on bar charts but when I set the below property then the chart is not able to render data.

dict.setValue(value: 5, forKeyPath: "yAxis.tickAmount"). and

dict.setValue(value: 800, forKeyPath: "yAxis.tickInterval")

Please try to provide this solution as soon as possible. It seems this property works in JSFiddle but does not work on the iOS platform.
Attachments
Screen Shot 2023-01-25 at 1.29.19 PM.png
Screen Shot 2023-01-25 at 1.29.19 PM.png (27.16 KiB) Viewed 304 times
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Unable to set tick Amount on bar chart

Hello,
It seems this property works in JSFiddle but does not work on the iOS platform.
Can you send both demos in JSFiddle and iOS how do you do it?

Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/
pradip.walghude
Posts: 23
Joined: Thu Jan 28, 2021 10:02 am

Re: Unable to set tick Amount on bar chart

I don't have any dedicated demo for this, I was trying to implement in our project which was not able to share here.

If you have a list of properties for bar chart interval/ tickAmount then please share with me.
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Unable to set tick Amount on bar chart

Hello:

You're probably doing it the wrong way, but it's hard to tell without any part of the code.

Here you have a list of all available demos: https://www.highcharts.com/demo/ios

We have also prepared a demo with tickAmount and tickInterval.

JSFiddle demo: https://jsfiddle.net/hmkx5boc/1/
iOS code:

Code: Select all

let options = HIOptions()

let title = HITitle()
title.text = "Tick amount is 8"
options.title = title

let xAxis = HIXAxis()
xAxis.categories = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
options.xAxis = [xAxis]

let yAxis = HIYAxis()
yAxis.tickAmount = 8
yAxis.tickInterval = 20
options.yAxis = [yAxis]

let series = HISeries()
series.data = [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]

options.series = [series]

Let me know if you have any further questions!
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/

Return to “Highcharts Usage”