Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1886
XamDataChart Axis Refresh
posted

I have the label of my Axis tied to a converter that will display values in specific units -  ie display 1000000000  as 1.5  or 1500.0.

 

Within our UI, the users can set the display units and number of decimals for the axis label (these properties are INotifyPropertyChanged) and when they change, we reset the values inside the Converter.

Everything works correctly - EXCEPT, the axis lable changes do not immediatly 'refresh' and we have to resize our application window to see the new axis labels.  Is there way to force the xamDataChart (or the axis) to redraw itself.  None of the data within the series is changing  just the axis label value due to a change in converter properties.

 

thanks

Rod

Parents
  • 30945
    Offline posted

    Hello Rod,

     

    Tahnk you for your post. I have been looking into it and if I understand correctly you are using a DataTemplate for the Label of the Axis and using a Converter in it, you are displaying the value of the axis in different manner and you wish the values to update after changing properties of your view model that determine the type of the conversion and the number of digits after the decimal poin. If this is correct, I can suggest using a MultiBinding in the DataTempalte and bind to the value of the axis and also to both, unit type and precision properties and in the IMultiValueConverter you can perform the logic for displaying the label’s content. I have created a sample application for you, that shows how you can implement this approach and allow changing the unit type of the Y axis (million or billions) and the number after the decimal points for the labels.

     

    Please let me know if you need any further assistance on the matter.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

    AxisDataTemplateAndFormatBinding.zip
Reply Children