bharat.nagdev
Posts: 24
Joined: Mon Aug 10, 2020 1:45 pm

Update from Highcharts 6.1 to 9

Hello,

Currently, We are using Highcharts 6.1 with the following features:
- Highcharts
- Highstock
- Exporting
- Boost Module

The Ecosystem I use it in has the following configurations:
- Ionic 5
- Angular 11
- Capacitor 2.4
We use the charts to work on mobile as well as the web.

We are planning to update the version to 9 and I want to know if someone has done that or is there anything to take care of in this process.

Information of any deprecations or changes related to this update will be much helpful.
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: Update from Highcharts 6.1 to 9

Hi,
Thanks for contacting us and your question.

Generally, this shouldn't be a problem when upgrading highcharts version, just remember that all modules must be of the same version.

I recommend test in a test environment before you start, sometimes the nodeModule needs to be deleted and install again.

Let me know how are you doing with this.
Best regards.
Sebastian Hajdus
Highcharts Developer
bharat.nagdev
Posts: 24
Joined: Mon Aug 10, 2020 1:45 pm

Re: Update from Highcharts 6.1 to 9

Hi Sebastian,
So far I have changed a lot of chart options to use defined values instead of string and a few markerGroup and labelGroup related changes.

I am stuck in rangeSelector changes. In this previously buttonTheme was allowed to be a number (i.e. 32 used by me). But now SVGAttributes are needed to pass.
I do not know what to pass in these attributes to achieve the 32 buttonTheme
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: Update from Highcharts 6.1 to 9

Hi Bharat!

Have you possible to prepare a working demo with version 6.1?
Generally, I need to see your chart configuration to help.

I'm waiting for news from you.
Best regards.
Sebastian Hajdus
Highcharts Developer
bharat.nagdev
Posts: 24
Joined: Mon Aug 10, 2020 1:45 pm

Re: Update from Highcharts 6.1 to 9

Hi Sebastian,

I have tried to replicate as many options as I can in the following fiddle: https://jsfiddle.net/Lx8s50kr/5/

However, there is business logic implemented in the following methods which I have not mentioned in the fiddle:
- Series / Y axis: Get data from the server-side
- Range Selector buttons: Get customized buttons and define their click events to get data based on the selected buttons
- Chart Events: Load event -> to load dynamic data , Selection event -> to show or hide zoom button manually
- Plot options -> legend item click event: customize the markers shown on the plot area
- Also we have a customized date picker implemented for date-based data rendering

I hope these details are enough to provide further guidance.

Hope this helps.
Thanks!
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: Update from Highcharts 6.1 to 9

Hi,

I opened the chart configuration in version 6.0.1 and the chart looks the same, this is not the reason for the version update.
Your question is too general, beyond the scope of the support on our forum.

Demo:
https://jsfiddle.net/BlackLabel/x2p549t3/

Best regards.
Sebastian Hajdus
Highcharts Developer
bharat.nagdev
Posts: 24
Joined: Mon Aug 10, 2020 1:45 pm

Re: Update from Highcharts 6.1 to 9

Hi Sebastian,
I think there is some misunderstanding. The fiddle I shared is of Highcharts 6.1 and not highcharts 9.
I have tried to implement the same options in Highcharts 9 and it worked in fiddle but with the JS library installed as npm package in my Ionic/angular environment, there are options that do not work. unless I typecast it to a specific type.
for example,
zoomType: 'xy' does not work but zoomType: <Highcharts.OptionsZoomTypeValue>'xy' works.

I hope this is understandable now.
Again, I want to know the things to take care of moving forward to Highcharts from 6.1 to 9.
Let me know if there any more details needed.
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: Update from Highcharts 6.1 to 9

Hi,

In your example, you use a 9 version source, but if I understand you correctly you put chart configuration from version 6.1.
You can try to reproduce your case on stackblitz or codesanbox, when I can see where the problem is.

Best regards.
Sebastian Hajdus
Highcharts Developer
bharat.nagdev
Posts: 24
Joined: Mon Aug 10, 2020 1:45 pm

Re: Update from Highcharts 6.1 to 9

Hi,

I got it almost working with all the configurations.

However, can you help me reposition the `reset zoom` button somewhere else? Maybe near the datepickers.

Hope this helps.
Thanks!
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: Update from Highcharts 6.1 to 9

Hi,
Good for you!

To change the position of reset button you can use chart.resetZoomButton.position, it's allowed to set x and y values.
https://api.highcharts.com/highstock/ch ... ZoomButton

Best regards.
Sebastian Hajdus
Highcharts Developer
bharat.nagdev
Posts: 24
Joined: Mon Aug 10, 2020 1:45 pm

Re: Update from Highcharts 6.1 to 9

Hi,
The buttonTheme previously had a number value.
Which can not be assigned in the latest version.
I had buttonTheme: 32, and now it says can not assign a type number to type SVGAttributes.

Please help me with this.
Thanks.
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: Update from Highcharts 6.1 to 9

Hi,
According to the documentation the buttonTheme is an object with a collection of attributes for the buttons.

Where do you get buttonTheme: 32?

API References:
https://api.highcharts.com/highstock/ra ... uttonTheme
https://api.highcharts.com/class-refere ... Attributes

Best regards.
Sebastian Hajdus
Highcharts Developer
bharat.nagdev
Posts: 24
Joined: Mon Aug 10, 2020 1:45 pm

Re: Update from Highcharts 6.1 to 9

Hi,
I have checked the attributes of the button. But in the version 6 setup, I had this buttonTheme as a number value.
I have no idea when the buttonTheme was changed to object or it was like this from the begining.
Do you have an idea about the changes related to buttonTheme?

Hope this helps.
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: Update from Highcharts 6.1 to 9

Hi
Unfortunately, I can't find any information in the documentation that there was a number in buttonTheme.

If you don't know how buttonTheme works and it doesn't do anything, why do you want to use it?
Wouldn't it be better for you to set specific styles for the CSS button?
https://www.highcharts.com/docs/chart-d ... yle-by-css

Best regards.
Sebastian Hajdus
Highcharts Developer
bharat.nagdev
Posts: 24
Joined: Mon Aug 10, 2020 1:45 pm

Re: Update from Highcharts 6.1 to 9

Hi,
Thanks for the help.

I am not sure why buttonTheme is used like this.
I will dig deeper for specific style for the CSS button.
Thanks for the help.

Return to “Highcharts Stock”