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. Image for the cookie policy date

Char annotations rendered incorrectly when switching to es-ES culture

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

4 Replies

MT Maurizio Taddei replied to Maurizio Taddei 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


DA Devi Aruna Maharasi Murugan Syncfusion Team 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 






MT Maurizio Taddei January 19, 2017 01:25 PM UTC

Hi Devi,

That's perfect, thanks very much!

Regards,
Maurizio


DA Devi Aruna Maharasi Murugan Syncfusion Team 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 


Loader.
Live Chat Icon For mobile
Up arrow icon