I would like to position the marker label, that you see above, inside the columns. Is this possible? And, if so, I would like to be able to do this with code behind.
Hello flowerdj,
Here is a code sample:
<Grid> <Grid.Resources> <Style TargetType="igWebChart:ColumnChartDataPointTemplate"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="igWebChart:ColumnChartDataPointTemplate"> <Border Background="{TemplateBinding Fill}"> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" Foreground="White" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataPoint.Value}" /> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style>
</Grid.Resources>
<igWebChart:XamWebChart> <igWebChart:XamWebChart.Series> <igWebChart:Series ChartType="Column" StrokeThickness="3"> <igWebChart:Series.DataPoints> <igWebChart:DataPoint Value="5" /> <igWebChart:DataPoint Value="6" /> <igWebChart:DataPoint Value="7" /> </igWebChart:Series.DataPoints> </igWebChart:Series> </igWebChart:XamWebChart.Series> </igWebChart:XamWebChart> </Grid>
Position the text anywhere you like.
I have attached a sample which sets the data point style of a series with the press of a button.
There is also some commented code which sets the template of only one data point for the series.