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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Char annotations rendered incorrectly when switching to es-ES culture

Thread ID:

Created:

Updated:

Platform:

Replies:

128389 Jan 18,2017 03:10 PM UTC Jan 20,2017 04:28 AM UTC WPF 4
loading
Tags: SfChart
Maurizio Taddei
Asked On January 18, 2017 03:10 PM UTC

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 04:49 PM UTC

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 01:12 PM UTC

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 01:25 PM UTC

Hi Devi,

That's perfect, thanks very much!

Regards,
Maurizio

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On January 20, 2017 04:28 AM UTC

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.

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

;