Author |
Message |
30/07/2018 13:13:26
|
rheinrichs
Power User
Joined: 08/05/2009 10:05:36
Messages: 209
Offline
|
Hi!
I'm using the chartjs component with JSON. (example attached)
According to stackoverflow, the chart should support "null" values as well:
https://stackoverflow.com/questions/30570402/how-to-add-an-empty-data-point-to-a-linechart-on-chart-js
For the example this looks like:
"data": [1.0, 0.0, 2.0, null, -2.0, -1.0]
This graph rendered invalid. May the "null" value not transfered well?
Kind regards
Roland
Filename |
chart.json |
Download
|
Description |
|
Filesize |
156 bytes
|
Downloaded: |
525 time(s) |
|
|
|
30/07/2018 13:27:04
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5555
Offline
|
...the JSON String is directly transferred into a JS-object, so your null-s are null-s on JS side, so this is correct. You may direclty play around with ChartJS in some own HTML page, that's the best way to experiment. Or/and you may observer the exact object transfer to the chart.js component in the browser debugger...
Regards, Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
03/08/2018 08:13:23
|
rheinrichs
Power User
Joined: 08/05/2009 10:05:36
Messages: 209
Offline
|
Yes, perfect - thx
I found there is a additional parameter was needed within JSON.
Regards,
Roland
|
|
|
|