Welcome Guest Search | Active Topics |

Plot dynamic-multiLine live chart
anijqchartian
#1 Posted : Thursday, September 6, 2012 3:03:00 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 9/6/2012(UTC)
Posts: 1

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Hello
I have a need where I need to plot a multi line live chart , in which number of lines will be decided dynamically. Each line corresponds to a entity .
As a feature , User going to select the number of entities , those entities data will be gathered from back end and the data should be plotted in line chart.
This data should get updated after 20 secs.
Can any one give some pointer on this, how can I achieve this dynamic multi line chart?
Dragan
#2 Posted : Thursday, September 6, 2012 3:31:08 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
You can check these samples:

http://www.jqchart.com/samples/RealTime/LiveData
http://www.jqchart.com/samples/RealTime/ChartSeries
http://www.jqchart.com/samples/RealTime/ChartDataPoints

After you get the new data from your backend, you can create the chart series and update the jqChart. The code can be something like:

Code:

var series = [];

for (var i = 0; i < yourBackEndData.length; i++) {
   series.push({ type: 'line', data: yourBackEndData[i].data });
}

$('#jqChart').jqChart('option', 'series', series);
Best Regards,
Dragan Matek
jqChart Inc.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

FlatEarth Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.071 seconds.