macpelos

Multi-Series PHP MySQL JSON

Recommended Posts

Hi there

I've been diving into forum and docs, but I think I'm going in the wrong direction.

I'm trying to show a multi-series line chart. Only 3 data in the query: date, device and data. The format in query is like that: devicename (string) | date (datetime)| data (float)

What I want is to show a line for every device and see data along the time. I've seen several examples with xml, but none with json.

Could anyone show me an example of something similar? I know there must be lots of them, but I cannot find even one. My main problem is arrange the json. I have no experience with it but I think I coud use an example as a guide.

Thanks for all!

Share this post


Link to post
Share on other sites

Hi,

 

You can check the documentation link of "msline" chart type for the showcased samples with JSON code references :

https://www.fusioncharts.com/dev/chart-guide/standard-charts/multi-series-charts#multi-series-line-chart

Also check the sample fiddle for a sample similar to your requirement mentioned : http://jsfiddle.net/hb4rckmj/

 

Please note : You need to provide the chart JSON dataSource in the prescribed structure to render the chart. Also the msline chart type does not support real datetime on the x-axis, it is a categorical axis that takes in string which are displayed as labels on the chart.

 

Thanks,

Akash.

Share this post


Link to post
Share on other sites

Thanks for your fast response.

Taking a look at the links I think I've found my mistake. It was a concept misunderstanding. I must convert my data to get a column for every device, a row for every datetime and a measure in the cell corresponding for that time and device.

Please, warn me if I'm wrong, but I'm gonna start from this point.

Thanks again and best regards

Edited by macpelos
spellcheck

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now