Je355804
Posts: 17
Joined: Tue Oct 04, 2022 9:01 am

X axis issue with combined monthly and daily data

I have a chart with two series, one with monthly data dating back to 1960 and a second series with daily data dating back to 2010.

I am attempting to place both of these charts on the same xAxis and to have uniform tick spacing along the xAxis, which will dynamically adjust as the chart zooms in.

However, when I attempt to plot these together, I am getting yearly spacing for both series 1 and 2 from 2010 to present and approximately 25 year spacing from 1960 to 2010. I thought setting the tickInterval would be the solution, however the tick interval remains at 5 year spacing when I zoom the chart in. Below is an example of my issue.

I've also included an example of a chart I found on a separate site which functions correctly. I've included both a zoomed out and zoomed in view of the functioning chart.
Je355804
Posts: 17
Joined: Tue Oct 04, 2022 9:01 am

Re: X axis issue with combined monthly and daily data

the highcharts form isn't allowing me to upload images right now it appears.
jakub.j
Posts: 1091
Joined: Tue Jan 24, 2023 11:14 am

Re: X axis issue with combined monthly and daily data

We appreciate you reaching out to us!

It is hard to tell you what could be done without taking a look at your code.
Could you please provide a live demo of the chart in jsFiddle.net or similar?

Best regards
Jakub
Je355804
Posts: 17
Joined: Tue Oct 04, 2022 9:01 am

Re: X axis issue with combined monthly and daily data

Unfortunately not possible, it's a webapp and it is coded in react. I don't know if I can leave a link to the site where there is a working version? But short of that, I cannot recreate is jsfid

edit: is the image upload feature not working?
jakub.j
Posts: 1091
Joined: Tue Jan 24, 2023 11:14 am

Re: X axis issue with combined monthly and daily data

Hey,

You can leave the link here, not a problem.
If you are using react, you can create the demo on codesandbox.io, then I can check it out.
https://stackblitz.com/edit/react-nwseym?file=index.js

You should be able to add images but I can't see any image currently, I'm sorry.
If you want to send an image you can upload it to a platform like imgur.com

Best regards
Jakub
Je355804
Posts: 17
Joined: Tue Oct 04, 2022 9:01 am

Re: X axis issue with combined monthly and daily data

Hi Jakub thanks for your reply. I found a semi-viable solution for the time being. By utilizing datagrouping, I was able to get the chart to work, with the longer term economic data, although the resolution of the daily data when zoomed out fully is still less than I would like.

Here is the link to the site (I'll be honest, I'm not the developer - but I know the highcharts library and enough JS to make adjustments as far as the charts go. But I do not have the knowledge level to recreate this in react in codepen).

Here is the link to the site:
https://test.polaritydigital.io/risk

to recreate the issue --> hit Add+ --> Metric --> Economic --> M2SL (this is the value for the M2 Money Supply in the US, it dates back to 1960 or so.
User avatar
dawid.d
Posts: 837
Joined: Thu Oct 06, 2022 11:31 am

Re: X axis issue with combined monthly and daily data

Hello,

If I understand the problem correctly, the m2sl data is provided in monthly intervals, so it is not possible to make it denser. In that case, you'd have to provide data in higher resolution.

If I may clarify any issues/matters I am available at your convenience.
Best regards!
Dawid Draguła
Highcharts Developer

Return to “Highcharts Usage”