Hello,
Using Syncfusion.Maui 27.1.53. I'm seeing this behavior both in Android and iOS.
I have a chart with a FastLineSeries like this:
<chart:FastLineSeriesYAxisName="DataAxis"
XAxisName="DateTimeAxis"
ItemsSource="{Binding Data}"
XBindingPath="Date"
YBindingPath="DataValue"
Fill="{AppThemeBinding Light={StaticResource LightTextColor}, Dark={StaticResource DarkTextColor}}">
When the app starts it uses whichever color is applicable but when the theme changes the color does not unless you restart the app.
The other controls seem to be working but not FastLineSeries. I assume it is related to this:
AppThemeBinding doesn't work for Hint label | .NET MAUI Forums | Syncfusion
As mentioned in that thread, I've tried to set the style for FastLineSeries but I'm having no luck. Help, please.
Thanks,
Alan
Hi Alen,
We have reviewed your query and regret to inform you that, currently, we cannot set the AppThemeBinding for the FastLineSeries directly. However, you can achieve a similar effect by using AppThemeBinding in the PaletteBrushes property of the SfCartesianChart.
Here’s a simple code snippet:
<chart:SfCartesianChart.PaletteBrushes> <AppThemeBinding> <AppThemeBinding.Light> <x:Array Type="{x:Type Brush}"> <StaticResource Key="LightBrush1" /> <StaticResource Key="LightBrush2" /> <StaticResource Key="LightBrush3" /> <StaticResource Key="LightBrush4" /> </x:Array> </AppThemeBinding.Light> <AppThemeBinding.Dark> <x:Array Type="{x:Type Brush}"> <StaticResource Key="DarkBrush2" /> <StaticResource Key="DarkBrush1" /> <StaticResource Key="DarkBrush3" /> <StaticResource Key="DarkBrush4" /> </x:Array> </AppThemeBinding.Dark> </AppThemeBinding> </chart:SfCartesianChart.PaletteBrushes> |
We have also prepared a sample for your reference. If you need any further assistance, feel free to ask.
Thank you for your patience and understanding.
Regards,
Arul Jenith B.
Yes - that works!
Thanks,
Alan
Hi Alan Hoiland,
You're welcome.
We are glad to know that the reported problem
has been resolved. Please let us know if
you require any further assistance on this. We will be happy to assist you.
Regards,
Preethi R