Sign in to follow this  
SyBabyUk

Multi Series Line Graph

Recommended Posts

Can I you give me an example of how to build the following chart? I have an x scale that runs from 0 to X (X being Variable) for this example we will say X is 30. A Y scale running 0 to 100.  The chart is a multi series line graph with different counts for plots on the x-axis ie

<dataset seriesName="test1">
 <set label="0" value="50" toolText="Time:0 Score:52.1" link="j-fetchTime-0" /> 
 <set label="1" value="50" toolText="Time:0.5 Score:50" link="j-fetchTime-1" /> 
 <set label="5" value="61" toolText="Time:0.6 Score:61" link="j-fetchTime-1" />
 <set label="18" value="65" toolText="Time:0.6 Score:61" link="j-fetchTime-1" />
 <set label="22" value="21" toolText="Time:0.6 Score:61" link="j-fetchTime-1" />
 <set label="30" value="50" toolText="Time:0.6 Score:61" link="j-fetchTime-1" /
</dataset>
<dataset seriesName="test2">
 <set label="0" value="0" toolText="Time:0 Score:52.1" link="j-fetchTime-0" /> 
 <set label="15" value="50" toolText="Time:0.5 Score:50" link="j-fetchTime-1" /> 
 <set label="26" value="1" toolText="Time:0.6 Score:61" link="j-fetchTime-1" />
 <set label="30" value="50" toolText="Time:0.6 Score:61" link="j-fetchTime-1" />
</dataset>
<dataset seriesName="test3">
 <set label="0" value="50" toolText="Time:0 Score:52.1" link="j-fetchTime-0" /> 
 <set label="15" value="100" toolText="Time:0.6 Score:61" link="j-fetchTime-1" />
 <set label="21" value="5" toolText="Time:0.6 Score:61" link="j-fetchTime-1" />
 <set label="22" value="21" toolText="Time:0.6 Score:61" link="j-fetchTime-1" />
 <set label="30" value="50" toolText="Time:0.6 Score:61" link="j-fetchTime-1" /
</dataset>
<dataset seriesName="test4">
 <set label="0" value="50" toolText="Time:0 Score:52.1" link="j-fetchTime-0" /> 
 <set label="15" value="100" toolText="Time:0.6 Score:61" link="j-fetchTime-1" />
 <set label="30" value="50" toolText="Time:0.6 Score:61" link="j-fetchTime-1" /
</dataset>

In this example the "lable" is the x-value and "value" is the value on the y-axis! 

test1 has 6 plots along the x axis

test2 has 4 plots along the x axis

test3 has 5 plots along the x axis

test4 has 3 plots along the x axis

Note I've tried using "<categories>" like this but it didn't work due to the uneven count in the datasets I think

Note Please ignore tooltext and link attributes in my example:)

<categories>
  <category label="0" /> 
  <category label="1" /> 
  <category label="2" /> 
  <category label="3" /> 
  <category label="4" /> 
  <category label="5" /> 
  <category label="6" /> 
  <category label="7" /> 
  <category label="8" /> 
  <category label="9" /> 
  <category label="10" /> 
  <category label="11" /> 
  <category label="12" /> 
  <category label="13" /> 
  <category label="14" /> 
  <category label="15" /> 
  <category label="16" /> 
  <category label="17" /> 
  <category label="18" /> 
  <category label="19" /> 
  <category label="20" /> 
  <category label="21" /> 
  <category label="22" /> 
  <category label="23" /> 
  <category label="24" /> 
  <category label="25" /> 
  <category label="26" /> 
  <category label="27" /> 
  <category label="28" /> 
  <category label="29" /> 
  <category label="30" /> 
</categories>

How would I plot this as a multi series line chart?

Thanks Simon

Edited by Guest

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi Simon,

Welcome to FusionCharts forum. :)

In case you wish to display the chart covering the whole canvas of the chart, you need to plot the chart with equal number of <category> elements and <dataset> elements.

Please refer to the sample that we are sending you as an attachment.

Hope this helps. :)

MSline.zip

Share this post


Link to post
Share on other sites

This is quite basic function of a line graph is to plot points.  Unfortunetaly each set I wish to plot does not have equal counters. Should this not be quite easy to do?  To supply at a start x-value and end x value in the chart node ( xAxisMinValue="0", xAxisMaxValue="'30'")? Then use syntax similar to a normal line graph ie.

<dataset seriesName="test1">

 <set label="0" value="1"  />

 <set label="15" value="2" />

 <set label="30" value="3"  />

</dataset>

<dataset seriesName="test2">

 <set label="20" value="20"  />

 <set label="30" value="30" />

 <set label="34" value="100"  />

 <set label="50" value="21"  />

 <set label="98" value="70"  />

</dataset>

<dataset seriesName="test3">

 <set label="20" value="20"  />

 <set label="30" value="30" />

 <set label="34" value="100"  />

 <set label="50" value="21"  />

</dataset>

As far as I can see the functionality is already there in the line graph so why can't we use the same in the multi series line graph?

 

 

Edited by Guest

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

Could you please re-check the attributes mentioned in our Documentation, as the Line Chart/Multi-Series Line Charts does not support the "xAxisMinValue" and "xAxisMaxValue" attributes.

Share this post


Link to post
Share on other sites

the msline.zip sample doesnt even display the data correctly - it cuts everything off on the x-axis at category 5.

 

 

 

I cant believe there still isnt a proper solution to this not very complicated problem.

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
Sign in to follow this