kennethic
Posts: 25
Joined: Thu Jun 16, 2022 2:18 pm

Re: TypeError: highcharts__WEBPACK_IMPORTED_MODULE_9__.stockChart is not a function

Thank you for that hubert.

Another question. stockchart can also read data from localstorage?

Like this:https://stackoverflow.com/questions/405 ... in-angular
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: TypeError: highcharts__WEBPACK_IMPORTED_MODULE_9__.stockChart is not a function

kennethic,
Yes, of course. You can take data from localstorage and then just create a chart with that data. Data-source for Highcharts doesn't matter, just create data in the proper format, as we discussed in previous posts.
Regards!
Hubert Kozik
Highcharts Developer
kennethic
Posts: 25
Joined: Thu Jun 16, 2022 2:18 pm

Re: TypeError: highcharts__WEBPACK_IMPORTED_MODULE_9__.stockChart is not a function

I only stored received_at in my local or both received_at and distance_m to display in calendar?
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: TypeError: highcharts__WEBPACK_IMPORTED_MODULE_9__.stockChart is not a function

kennethic,
You can store in localstorage whatever you want, in whatever format you want. Actually, this is a question for some guru guys from localstorage, we provide support only for the Highcharts part, but I can help you a little bit. For example, you can store an object converted to a string and after reading it from localstorage parse it properly like in this demo: https://jsfiddle.net/BlackLabel/3268cpms/
Or you can store each value individually and read them also individually.

Regards!
Hubert Kozik
Highcharts Developer
kennethic
Posts: 25
Joined: Thu Jun 16, 2022 2:18 pm

Re: TypeError: highcharts__WEBPACK_IMPORTED_MODULE_9__.stockChart is not a function

its working now. thank you so much hubert!

if I have encountered error again, Can we continue this thread?

Thank you!
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: TypeError: highcharts__WEBPACK_IMPORTED_MODULE_9__.stockChart is not a function

You're welcome! In case of similar further questions, feel free to contact me again here on this topic. Or if you will have other questions from another field please start a new topic :)
Hubert Kozik
Highcharts Developer
kennethic
Posts: 25
Joined: Thu Jun 16, 2022 2:18 pm

Re: TypeError: highcharts__WEBPACK_IMPORTED_MODULE_9__.stockChart is not a function

Hi Hubert.

It is possible in my data to have a starting point and endpoint. Then the starting point would be the left part of the calendar, then the endpoint would be the right part of the calendar.

Thank you!
kennethic
Posts: 25
Joined: Thu Jun 16, 2022 2:18 pm

Re: TypeError: highcharts__WEBPACK_IMPORTED_MODULE_9__.stockChart is not a function

another question hubert.

why this calendar have a opposite data like, I think in the left side that is the past or the old data, and in the right side the latest and from the old.

See the Loom below:
https://www.loom.com/share/246b07fb01ac ... 953af9e1ea
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: TypeError: highcharts__WEBPACK_IMPORTED_MODULE_9__.stockChart is not a function

kennethic,
As we spoke in previous posts, to pass a data to chart you have to declare point with x and y values to series.data object, which is an array of data points for the series. You can read it in the documentation here: https://api.highcharts.com/highcharts/series.line.data In datetime type of xAxis points have to be sorted ascending.

If you want to set a start point if you have no data you can use a property pointStart described here: https://api.highcharts.com/highcharts/s ... pointStart

According to your video, I don't see any problems there. You are choosing as start date 23 June 2022 and as end date 24 June 2022, which is totally fine and good.

Regards!
Hubert Kozik
Highcharts Developer
kennethic
Posts: 25
Joined: Thu Jun 16, 2022 2:18 pm

Re: TypeError: highcharts__WEBPACK_IMPORTED_MODULE_9__.stockChart is not a function

Hi hubert.

It is possible that I have separate data for calendar and separate data for graph. Like I have geojson format for calendar and in the graph as well.

Thanks,
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: TypeError: highcharts__WEBPACK_IMPORTED_MODULE_9__.stockChart is not a function

kennethic,
Unfortunately, it is not possible to achieve that straight from the API level. You cannot set different data to the range selector. In order to implement such a feature, you need to create a custom navigator or override its current functionality. The range selector inputs are displaying the current min and max values. If you want to enable all days-buttons in the range selector you can set yAxis.min and yAxis.max to some values and it will work as extremes of this calendar.

Demo: https://jsfiddle.net/BlackLabel/ha6efgjn/
API Reference: https://www.highcharts.com/docs/stock/range-selector

Kind regards!
Hubert Kozik
Highcharts Developer
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: TypeError: highcharts__WEBPACK_IMPORTED_MODULE_9__.stockChart is not a function

You're welcome! In case of any further questions, feel free to contact us again.
Hubert Kozik
Highcharts Developer
kennethic
Posts: 25
Joined: Thu Jun 16, 2022 2:18 pm

Re: TypeError: highcharts__WEBPACK_IMPORTED_MODULE_9__.stockChart is not a function

Hi, Hubert.

I encountered error in rangeSelector, when I choose the scale the data disappeared, and in the calendar as well.

What did you think my problem?

Thank you so much!

See video loom.
https://www.loom.com/share/16ae94df1337 ... eb9f2843c8
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: TypeError: highcharts__WEBPACK_IMPORTED_MODULE_9__.stockChart is not a function

Hi kennethic!
It is hard to tell you what is not working and what could be done without taking look at your code.
Could you reproduce the issue in an online editor that I could work on? You can start here: https://jsfiddle.net/BlackLabel/Lxfogzk5/

Regards!
Hubert Kozik
Highcharts Developer

Return to “Highcharts Stock”