C3: Loading json for multiple data lines timeseries chart

Created on 16 Sep 2014  路  8Comments  路  Source: c3js/c3

Hey there!

I was wondering if it's possible to load json data to create a chart with multiple data lines with its x-axis as a timeseries?

I used this example here (see https://groups.google.com/d/msg/c3js/UDQB8JorDho/up0gSEQQavUJ) but I realise the json parser is still severely limited to only certain formats, tried to crawl the Interwebs for examples but no luck. Was wondering if there are any workarounds?

Thanks! :)

question

Most helpful comment

@aendrew @keyscores

I modified that JSFiddle to use the syntax as suggested by @masayuki0812 in #516 and it renders properly.

http://jsfiddle.net/7kYJu/1940/

You can probably close this.

All 8 comments

Is this what you're trying? http://jsfiddle.net/7kYJu/424/

And I think it would be better to parse JSON when loading by yourself instead of use c3 JSON interface because there is a limitation of format to load.

Hey yeah, thanks! Got it working! :+1:

I am also having an issue with JSON where if a point is skipped in the timeseries, the line is not drawn. The example masayuki0812 provided above on JSFiddle is showing the same issue. Lines are not drawn for data2.
http://jsfiddle.net/7kYJu/424/

Found the problem. #516

This still seems broken in the jsfiddle above, with the latest master code. http://jsfiddle.net/7kYJu/424/

@keyscores Huh, right you are. Reopening...

@aendrew @keyscores

I modified that JSFiddle to use the syntax as suggested by @masayuki0812 in #516 and it renders properly.

http://jsfiddle.net/7kYJu/1940/

You can probably close this.

@ianjennings Thanks for reporting back!

Closing as resolved.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

seubert picture seubert  路  3Comments

alantygel picture alantygel  路  3Comments

DieterSpringer picture DieterSpringer  路  4Comments

Zerim picture Zerim  路  3Comments

aishwaryak picture aishwaryak  路  4Comments