Sign in to follow this  
Pallav

specify x and y axis labels and create line chart

Recommended Posts

hi,

i am looking to create a line graph that will have a scale across the x axis from 20 - 100. I want to have 6 values on my y axis and dislay these values (V1, V2, V3, V4, V5 and V6). I want to plot the data and draw a line graph. So for example my data might be as follows:

V1 - 35

V2 - 45

V3 - 47

V4 - 52

V5 - 60

V6 - 62

I want to draw a line graph that will join up the values from V2 to V5. And simply display a dot or plot point where the values for V1 and V6 exist.

I also want to draw a vertical line down through the graph, and this line should be drawn at the average of all the points (i.e. add up the values for V1 to V6 and divide by 6)

Is there anyone who thinks this can be done? I am using Fusion Charts for many other graphs and think its very good but I dont think it can cope with this? Am I wrong?

Kind regards

Damien.

Share this post


Link to post
Share on other sites

This cannot be directly done using any of the default charts. However, you can tweak the XML of scatter chart to do so.

In our scatter chart, you can opt to plot lines between points. Also, both the x and y axis are numeric. So, create 2 datasets - first, containing the points which you want to connect with line and second simple points.

For the mean line, use the trend line feature.

Share this post


Link to post
Share on other sites

Hi there, thanks for your reply and your good advice. I have tried to implement what you have suggested but I would like some more help if possible.... Below is the code for what I am trying to create.

<graph palette='2' caption='Server Performance' yAxisName='Response Time (sec)' xAxisName='Server Load (TPS)'

xAxisMaxValue='100' xAxisMinValue='20' yAxisMaxValue='7'>

<categories verticalLineColor='666666' verticalLineThickness='1'>

  <category label='20' x='20' showVerticalLine='1'/>

  <category label='30' x='30' showVerticalLine='1'/>

  <category label='40' x='40' showVerticalLine='1'/>

  <category label='50' x='50' showVerticalLine='1'/>

  <category label='60' x='60' showVerticalLine='1'/>

  <category label='70' x='70' showVerticalLine='1'/>

  <category label='80' x='80' showVerticalLine='1'/>

  <category label='90' x='90' showVerticalLine='1'/>

  <category label='100' x='100' showVerticalLine='0'/>

</categories>

<categories horizontalLineColor='666666' horizontalLineThickness='1'>

  <category label='V5' x='1' showhorizontalLine='1'/>

  <category label='V4' x='2' showhorizontalLine='1'/>

  <category label='V3' x='3' showhorizontalLine='1'/>

  <category label='V2' x='4' showhorizontalLine='1'/>

  <category label='V1' x='5' showhorizontalLine='1'/>

  <category label='ACT' x='6' showhorizontalLine='1'/>

  <category label='' x='7' showhorizontalLine='0'/>

</categories>

<dataset seriesName='Server 1' color='009900' anchorSides='3' anchorRadius='4' anchorBgColor='D5FFD5'

anchorBorderColor='009900'>

  <set y='2' x='32' />

  <set y='3' x='43' />

  <set y='4' x='48' />

  <set y='5' x='50' />

</dataset>

<dataset seriesName='Server 2' color='0000FF' anchorSides='4' anchorRadius='4' anchorBgColor='C6C6FF'

anchorBorderColor='0000FF'>

  <set y='1' x='23'/>

  <set y='6' x='29'/>

</dataset>

<vTrendlines>

  <line startValue='53' endValue='53.1' lineThickness='2' color='FF0000'  />

</vTrendlines>

 

</graph>

----------------------

I would like to display V1, V2, V3 etc up along the Y axis, instead of displaying 1-7 but my code does not work. Is it correct what I am tring to do? It seems to work fine to display on the X axis but I cannot display different values on the Y axis.

Also I do not know how to join up the 4 values in the 1st data series. Do you have any advice on how I can do this?

Many thanks

Damien.

Share this post


Link to post
Share on other sites

To show v1, v2 etc on y-axis, you need to define trend lines and label them as v1,v2 etc.

>> Also I do not know how to join up the 4 values in the 1st data series. Do you have any advice on how I can do this?

Set <dataset drawLine='1' ..>

Share this post


Link to post
Share on other sites

hi there,

once again, thanks for your help. What you have suggested works perfectly.

We have one last problem....

As we have set out Y axis scale from 0-7, the numbers 1,2,3,4,5,6 and 7 appear on the Y axis. We also want our names for the trend lines on that side though.... Is there a setting where we can stop the Y axis displaying the values? Or perhaps we can fool the graph by asking it to display a blank (e.g. ' ') in place of the 1,2,3 etc...

Thanks,

Damien.

Share this post


Link to post
Share on other sites

Hi Pallav,

Many thanks, this works perfectly! I am thrilled with your software, it has given us a solution to creating a graph that we did not think was possible!!

I cannot speak highly enough of the software, and the excellent support that I have received on this.

Kind regards

Damien Lee.

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