samehhady
Posts: 1
Joined: Fri Dec 25, 2020 9:05 am

dataClass with data value returning as object

So I am trying to use dataClasses in my map but my problem is the map data values are returning as an object so I can show multiple data in tooltip.

Data structure look like that:

[["BC", {value: "0.14", change: "-0.18"}], ["AB", {value: "0.1", change: "0.14"}]]. ( Doesn't work)
[["BC", 0.14], ["AB", 0.1]]. (Works)

Question is, how can I make the dataClass work on "value" or on "change" attributes? currently it only works if the value is a number or string but not an object.

When I use the value as object, the data classes are totally discarded.
pawelys
Posts: 962
Joined: Wed Sep 02, 2020 10:37 am

Re: dataClass with data value returning as object

Hello, welcome to the forum, and thanks for contacting us with your question!
I don't understand what is the problem. Why don't you just get the value out of the object, so the structure matches the Highcharts data structure? You can as well try defining the point as the object? Could you please provide the live demo, where your issue is reproduced? The data structure varies between different series types, so if you will create the demo, it would be easier to get all the information, that I need. You can check the data structure here:

https://api.highcharts.com/highmaps/series.map.data
https://api.highcharts.com/highmaps/series.heatmap.data
https://api.highcharts.com/highmaps/ser ... ubble.data
https://api.highcharts.com/highmaps/series.mapline.data
https://api.highcharts.com/highmaps/series.tilemap.data


In case of any further questions feel free to ask!
Kind regards,
Paweł Lysy
Highcharts Developer

Return to “Highcharts Maps”