Place label inside symbol

Hi,
I have an adornment with a connector line and a custom label. I would like to place the label inside of a diamond symbol (which is at the end of the connector line). The label correctly shows at the end of the connector line, but the symbol does not. Is there a way to have the symbol appear at the end of the connector line with the label inside?

1 Reply

DV Divya Venkatesan Syncfusion Team March 2, 2018 09:26 AM UTC

Hi Sean, 
 
Thanks for using Syncfusion products. 
 
You can show the label inside symbol in adornment by using LabelTemplate of ChartAdornmentInfo. Please refer the below code snippets.  
 
Code Snippet for LabelTemplate: 
 
<DataTemplate  x:Key="labelTemplate"> 
    <Grid> 
        <Grid.RowDefinitions> 
            <RowDefinition Height="15" /> 
        </Grid.RowDefinitions> 
 
        <Rectangle Grid.Row="0" x:Name="Rect" Width="15" Height="25" Fill="Maroon" RenderTransformOrigin="0.5,0.3"> 
            <Rectangle.RenderTransform> 
                <RotateTransform Angle="135" /> 
            </Rectangle.RenderTransform> 
        </Rectangle> 
 
        <TextBlock Grid.Row="0" Text="{Binding}" FontSize="11" Foreground="White" 
                   HorizontalAlignment="Center" VerticalAlignment="Top"/> 
    </Grid> 
</DataTemplate> 
 
Code snippet for setting LabelTemplate: 
 
<syncfusion:ColumnSeries.AdornmentsInfo> 
    <syncfusion:ChartAdornmentInfo LabelTemplate="{StaticResource labelTemplate}"/> 
</syncfusion:ColumnSeries.AdornmentsInfo> 
 
Please find the output screenshot below, 
 
 
You can refer the following user guide link for more details about customizing Adornments 
 
We have prepared a sample for this which can be downloaded from the following link. 
 
 
Please let us know, if you need any further assistance on this. 
 
Regards, 
Divya Venkatesan 
 


Loader.
Up arrow icon