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.

Save original chart axis labels

Thread ID:

Created:

Updated:

Platform:

Replies:

101568 Nov 2,2011 03:12 PM Nov 4,2011 04:49 AM WPF 1
loading
Tags: Chart
George G
Asked On November 2, 2011 03:12 PM

How can we add an extra text string to a Syncfusion wpf chart?

We need to store an extra hidden text string to a SyncFusion chart. Our users have the ability to edit the chart axis label as well as the data series label. We need to preserver the original label from the first time the chart is displayed to the user.

This will allow the user to revert the edited label back to the original one.

This is for a chart that the user can dynamically add data series to as well as set axis scale, etc.

We're using Syncfusion.Chart.WPF.DLL version 9.203.0.137 in a .net 4.0 WPF desktop application.



Michael Prabhu M [Syncfusion]
Replied On November 4, 2011 04:49 AM

Hi George,

Thanks for using Syncfusion Products, We have analyzed your requirement and it can be achieved by storing the ChartAxisLabelsCollection while loading the chart and then restoring it after editing the axis labels as in below code snippet.

Code snippet[C#]:
Storing the text:
ChartAxisLabelsCollection lc=new ChartAxisLabelsCollection();
lc=xaxis.VisibleLabels;

Restoring the text:
xaxis.LabelsSource = lc;

We have also prepared a simple sample based on your requirement which you can download from the attachment.

Please let us know if you have any concerns.

Thanks,
Michael Prabhu.



AxisLabels_32088b1b.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.

;