[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Enh. for CharJS  XML
Forum Index -> Development
Author Message
rheinrichs

Power User
[Avatar]

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 [Disk] Download
 Description
 Filesize 156 bytes
 Downloaded:  468 time(s)

CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5527
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
rheinrichs

Power User
[Avatar]

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
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team