Changes
Charts
,/* Xamarin Chart Customizing {{Version/XamarinSince|4.8}} */
== Xamarin Chart Customizing {{Version/XamarinSince|4.8}} ==
Since Client Version 4.8 it is also supported for Xamarin to customize charts. As there is currently no standard Chart xaml, it needs to be customized in any existing xaml, e.g. in UBIKPropertyArea. Please consider using the proper BindingContextTo achieve that, namely the Value of the related Chart property. The IntToDateTimeIntervalConverter following components should be added to the ReourceDisctionary to use it in the DateTimeAxisTemplatecreated. ==== Axis Templates ====Templates for the Numeric, Category, and DateTime Axis, as well as Template Selectors for the Primary and Secondary Axis, including bindings to the related Chart [[Charts#ChartAxis|ChartAxis]] properties, need to must be added to the Resources as follows:defined in the example below. ==== Template Selectors ====The templates should be referred to in the PrimaryAxisTemplateSelector and ChartAxisTemplateSelector, which must also be defined in the Resources. The boolean IsPrimaryAxis determines whether it's the primary or secondary axis. ==== Converter ====The IntToDateTimeIntervalConverter should be added to the ReourceDisctionary to use it in the DateTimeAxisTemplate for a proper conversion of the integer provided by the server to a DateTimeIntervalType that can be processed by the Syncfusion Chart control. {{hint|Make sure to use the proper BindingContext, namely the Value of the related Chart property. It is recommended to use it e.g. on the parent Grid containing all Chart related code.}}
<source lang = "XML">
</source>
==== Chart Control ====
To display the Chart itself and to use the resources defined above, an extended Chart control is required with bindings to the Primary and Secondary Axis Template Selectors, Series, and Thresholds [[Charts#ChartData|ChartData]] properties. To access further and to make use of all [[Charts#Chart_properties|Chart properties]], related Syncfusion components can be added to the chart control and use [[Charts#Chart_properties|Chart properties]] as bindings as defined in the example below. For more information and examples, please refer to the [https://help.syncfusion.com/xamarin/charts/overview Syncfusion Xamarin Charts documentation].
<source lang = "XML">
xmlns:chart="clr-namespace:Syncfusion.SfChart.XForms;assembly=Syncfusion.SfChart.XForms"