Create a chart with javascript

381
2
07-19-2022 08:01 AM
KARIMLABIDI
Occasional Contributor

Hello,

I would like to create a chart with chart Js and that's not easy! I would like to load a json from my AGE rest and after that,create a cumulative chart with the length of my polyline.

My code blocks when I try to load data,it gives me a error 'undefined (reading Map)'. I don't know what to do.

KARIMLABIDI_0-1658242723759.png

The data looks like this

KARIMLABIDI_1-1658242789636.png

Any help would very appreciated 🙂

0 Kudos
2 Replies
ReneRubalcava
Frequent Contributor

Is miseservice an array? Too tough to tell from a screenshot, but sounds like that property is not an array you can map over

0 Kudos
KARIMLABIDI
Occasional Contributor

Thank you for your answer. I took this link to try to make the same thing . From an URL Json , I should be able to load data but I don't know if my data ara in array.

https://www.youtube.com/watch?v=oFLnXT7D4gc.

If I can't map over , do you how I can I load data in my chart?

 

Thank you

 

0 Kudos