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.

Removing YAxis when Legend CheckBox in not selected

Thread ID:

Created:

Updated:

Platform:

Replies:

77241 Oct 22,2008 07:10 AM Oct 28,2008 09:22 AM WPF 5
loading
Tags: Chart
Administrator [Syncfusion]
Asked On October 22, 2008 07:10 AM

Hi!

I was wondering, how i can make YAxis of a certain series dissapear when i deselect this series in the chart legend. The series itself dissapears as expected, but the YAxis stays in place which is no good.

I add the series like this:
public AddSeries()
{
this.StrokeThickness = 2;
this.Type = ChartTypes.StepLine;
this.IsIndexed = false;
this.BindingPathX = "Value1";
this.BindingPathsY = new string[] { "Value2" };
this.YAxis = new ChartAxis();
this.YAxis.Orientation = Orientation.Vertical;
}

Thanks for the help,
Tadej Abina


Administrator [Syncfusion]
Replied On October 22, 2008 08:37 AM

Hi Tadeja,

Thanks for your interests in Syncfusion products.

By default, we do not have options to remove the ChartAxis along with ChartSeries. Because there might be other ChartSeries that might share the same ChartAxis.

But your requirement can be achieved by applying a custom DataTemplate to ItemsTemplate property of ChartLegend class. In the DataTemplate a click event for the CheckBox can be added and corresponding ChartAxis can be removed manually using the click event handler.

I have created a sample on it and it is attached for your reference.

Please let us know if you have further queries.

Regards,
Athaur Rahman GS



ChartLegendsSample_9c434c8b.zip

Administrator [Syncfusion]
Replied On October 23, 2008 02:58 AM

Hey!

Thanks for the help, works like a charm :)

One more thing though-how can i tell the YAxis Header to display vertically immediatelly...it displays horizontally for a brief moment, then switches to vertical.

regards,
Tadej Abina


Administrator [Syncfusion]
Replied On October 23, 2008 09:24 AM


Hi Tadeja,

Thanks for your interests in Syncfusion products.

I am not able to reproduce the issue mentioned by you with the sample that I sent you yesterday. If you are reproducing it on a different sample kindly update us with the sample to try and reproduce this issue.

Please let us know if you have further queries.

Regards,
Athaur Rahman GS


Administrator [Syncfusion]
Replied On October 28, 2008 06:03 AM

Hey!

The YAxis header problem is not a problem anymore :)

But i do have some new ones:
1. If i create a chart area and dont add any series at first, there is obviously no legend to show. But when i start adding the series, the legend is still not there as if it was not updating.
2. The rendering of series when there is f.e. mora than 200 data points is very slow...is there a way to make it faster, besides Begin/EndUpdate? Series are drawn based on collections that are made beforehand.
3. Does EssentialChart have a problem with WindowsVista? I had no errors working with it on my Windows XP, but my co-worker tried to run the application on Windows Vista and it crashed every single time. It works atm, but only because we limited the number of data points to 100. Any thoughts?

Thank you in advance for all your help!

regards, Tadej Abina


Administrator [Syncfusion]
Replied On October 28, 2008 09:22 AM


Hi Tadeja,

Thanks for your interests in Syncfusion products. The following are the responses for your queries.

Regarding chart series not getting displayed in the legends, it can be overcome by setting the ItemsSource of the chart legends. I have attached the updated the sample for your reference.

Regarding more data points, we could see the chart getting loaded and working as normal for more than 1000 points also. Attached sample also creates series with 1000 points.

Regarding working in vista, we do not have any issues working with Vista. Kindly update us with a sample to reproduce the issue.

Please let us know if you have further queries.

Regards,
Athaur Rahman GS



ChartLegendsSample_e961b57e.zip

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.

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.

;