We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Multiple axis

Thread ID:

Created:

Updated:

Platform:

Replies:

78662 Dec 22,2008 11:22 PM UTC Dec 30,2008 12:10 PM UTC WPF 8
loading
Tags: Chart
Administrator [Syncfusion]
Asked On December 22, 2008 11:22 PM UTC

Hi

How can we add individual Yaxis for each series. in my project i have total 10 series and i want to add individual Yaxis for each series on selected checkbox, currently all sereis are sharing same axis.

code:


ChartSeries seriesChart = new ChartSeries();
chart.Areas[0].Series.Add(seriesChart);
seriesChart.XAxis = axisX;
seriesChart.YAxis = axisY;
seriesChart.DataSource = Outputset.Output_graph_tuples;
seriesChart.BindingPathX = "X_value";
seriesChart.BindingPathsY = new string[] { series.Datafieldname };
seriesChart.Label = series.Graphname;
seriesChart.StrokeThickness = 3;

Yuvraj


Pavithra J [Syncfusion]
Replied On December 23, 2008 12:09 PM UTC

Hi Yuvraj,

Thanks for your interest in Syncfusion products.

For each and every series in a chart, it is possible to create a seperate X and Y axis.

Since your requirement is just adding multiple secondary axis you can make use of the property YAxis of ChartSeries class. For your reference I have created a sample that could be downloaded from the below given link

http://websamples.syncfusion.com//samples/WPF/F78662/MultipleAxes.zip

Please let me know if you have any queries.

Thanks,
Pavithra.J


Administrator [Syncfusion]
Replied On December 24, 2008 03:52 AM UTC

Hi,

Thanks a lot its working Very well.

I wondering like when we unselect checkbox can we remove legend along with Yaxis.

and also i am not show gridline in my chart, what could be problem.i tried showgridline== true; its not working.





Saradha [Syncfusion]
Replied On December 24, 2008 11:36 AM UTC

Hi Yuvraj,

1. Legend Items of the corresponding series will be removed only when the series is removed. But here we are just hiding the series.

However your requirement can be achieved by applying a custom DataTemplate to ItemsTemplate property of ChartLegend class. This is illustrated in the attached sample.

2. On setting the ShowGridLines property the axis is supposed to show the GridLines. In the attached sample you could see the GridLines visible for Primary Axis and invisible for Secondary Axis. Could you please check with the attached sample whether the code used in your side is proper.

I have modified the multiple axes sample and it is attached for your reference.

Please let us know if you have further queries.

Regards,
K. Saradha Devi.



MultipleAxes_WithLegendItemsRemoved_f0f8b5.zip

Administrator [Syncfusion]
Replied On December 28, 2008 11:12 PM UTC

Hi ,

Thanks a lot again

But regarding gridline its still not working , i have no idea why it is doing this. What could be possibl problem causing this???

My code :
x:Name="chartArea"
Background="Transparent">














Administrator [Syncfusion]
Replied On December 29, 2008 01:00 AM UTC

Hi

I have solved displaying gridline problem, now onemore problem has occured, I have 10 series and its displaying grid line for all ten its kinda looks mess, so is there any possible way of displying common grid line for all .

please have a look at image file for clear idea of my problem.

Thanks

Yuvraj



grid_28ad8792.zip

Pavithra J [Syncfusion]
Replied On December 29, 2008 12:16 PM UTC

Hi Yuvraj,

Thanks for your interest in Syncfusion products.

The GridLines of any particular series will be made visible and invisible by setting a boolaen property ShowGridLines of ChartAxis class.

For your reference we have created a sample in which the GridLines of the first series alone gets displayed. You can download it from the below given link,

http://websamples.syncfusion.com/samples/WPF/F78662/MultipleAxes_WithOneGridLine.zip

Please let us know if you have any queries.

Regards,
Pavithra.J


Administrator [Syncfusion]
Replied On December 30, 2008 06:36 AM UTC

hi

thanks a lot again,

is there any possible way to add space between two axis ???

like in my case i have

seriesChart.Yaxis.Header == series.name;

so, it gives respective name for every axis,i need space between those names.

Yuvraj


Pavithra J [Syncfusion]
Replied On December 30, 2008 12:10 PM UTC

Hi Yuvraj,

Thanks for your interest in Syncfusion products.

Instead of adding the series name directly to the Header property of the secondary axis, you could use a Textblock to which the series name can be added. Now by setting the Margin property to the textblock you will get the required space.

For your reference we have created a sample and you could download from the below given link,

http://websamples.syncfusion.com/samples/WPF/MultipleAxesSamplewithMargin/MultipleAxesWithMargin.zip

Please let us know if you have any queries.

Thanks,
Pavithra.J


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;