Hi Damian,
Thanks for using Syncfusion controls.
Please find the response below.
Query 1 : Is it possible to hide adornment label (with custom LabelContentPath)for empty data? I can hide it using converter in LabelTemplate but then when I modify the data in runtime the adornments did not appear.
We have analyzed your query, we would like to inform you that when we set SegmentLabelContent as LabelContentPath, DataContext for LabelTemplate is ChartAdornment. So that it have not updated the converter in runtime. We have resolved this by binding the property in ChartAdornemt in TextBlock Text directly and collapsed the panel visibility by using converter. Please refer the below code snippet.
Code snippet [XAML]:
|
<DataTemplate x:Key="labelTemplate">
<StackPanel Orientation="Horizontal"
Visibility="{Binding YData,Converter={StaticResource labelConv1}}"
Background="{Binding Interior}">
<TextBlock Text="{Binding XData}" />
<TextBlock Text=" : " />
<TextBlock Text="{Binding YData}" />
</StackPanel>
</DataTemplate> |
We have prepared a sample based on this, please find the sample from the following location.
Query 2 : Also is it possible to have series brush label background for custom LabelContentPath?
We can achieve your requirement by binding Interior property in background as per the below code snippet.
Code snippet [XAML]:
|
<StackPanel Orientation="Horizontal"
Visibility="{Binding YData,Converter={StaticResource labelConv1}}"
Background="{Binding Interior}"> |
Please let us know if you have any queries.
Thanks,
Muneesh Kumar G.