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.

Char annotations rendered incorrectly when switching to es-ES culture

Thread ID:

Created:

Updated:

Platform:

Replies:

128389 Jan 18,2017 10:10 AM Jan 19,2017 11:28 PM WPF 4
loading
Tags: SfChart
Maurizio Taddei
Asked On January 18, 2017 10:10 AM

Hi,

I have an issue with the chart annotations when I set the Culture to "es-ES". The annotations are rendered/plotted in the incorrect location on the chart. I will ultimately need to switch the culture at run-time.

The Culture is set in App.xaml.cs. 

public partial class App : Application
    {
        protected override void OnStartup(StartupEventArgs e)
        {
            //Thread.CurrentThread.CurrentUICulture = new CultureInfo("en");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("es-ES");
            Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture;

            base.OnStartup(e);
        }
    }

Please find sample attached.

Regards,
Maurizio

Attachment: Testing_WFP_Charts_23adf6a4.rar

Maurizio Taddei
Replied On January 18, 2017 11:49 AM

Hi,

I have an issue with the chart annotations when I set the Culture to "es-ES". The annotations are rendered/plotted in the incorrect location on the chart. I will ultimately need to switch the culture at run-time.

The Culture is set in App.xaml.cs. 

public partial class App : Application
    {
        protected override void OnStartup(StartupEventArgs e)
        {
            //Thread.CurrentThread.CurrentUICulture = new CultureInfo("en");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("es-ES");
            Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture;

            base.OnStartup(e);
        }
    }

Please find sample attached.

Regards,
Maurizio

Attachment: Testing_WFP_Charts_23adf6a4.rar

Hi,

Ok, I figured out the issue. I was hard-coding the Y value of the annotations, and this must have been causing a parsing exception. Now I'm binding the Y Values to static properties and all seems good.

The problem I'm having now is that when I change the language/culture at run-time (via buttons at the side of the chart), the Text Annotations disappear. 

Do you have any idea why this is happening?

Please find updated sample attached.

Regards,
Maurizio

Attachment: 20170118_Testing_WFP_Charts_8f7ded0f.rar

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On January 19, 2017 08:12 AM

Hi Maurizio, 
  
Thanks for contacting Syncfusion Support. 
  
While changing the culture dynamically, provided run text value gets changed.Therefore , the text annotation is not visible. To avoid the problem, we recommend you to use text block with its text property in the DataTemplate instead of RunText. 
  
We have modified the provided sample and it can be downloaded from below link, 
  
Sample:(es)Culture 
  
Regards, 
Devi 





Maurizio Taddei
Replied On January 19, 2017 08:25 AM

Hi Devi,

That's perfect, thanks very much!

Regards,
Maurizio

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On January 19, 2017 11:28 PM

Hi Maurizio, 
  
Thanks for your update. 
  
We glad that your problem has been resolved. Please let us know, if you need any further assistance on this. 
  
Regards, 
Devi 


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.

;