ComponentOne Chart for WPF and Silverlight
Chart for WPF and Silverlight / Chart Features / Markers Labels / Simple Bound Markers
In This Topic
    Simple Bound Markers
    In This Topic

    You can easily create a simple bound marker by setting five properties. The XAML markup below demonstates this:

    Copy Code
    <!-- simple bound marker -->
    <c1:ChartPanelObject x:Name="obj" Attach="DataX"
                         Width="60" Height="50">
            <TranslateTransform Y="-50"/>
        <Grid DataContext="{Binding RelativeSource={x:Static RelativeSource.Self},Path=Parent}" Opacity="0.8">
            <Path Data="M0.5,0.5 L23,0.5 23,23 11.61165,29.286408 0.5,23 z" Stretch="Fill" Fill="#FFF1F1F1" Stroke="DarkGray" StrokeThickness="1"/>
            <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                <TextBlock Text="Value" Margin="2 0"/>
                <TextBlock x:Name="label" Text="{Binding DataPoint.Y, StringFormat=c2}" FontWeight="Bold" Margin="2"/>

    Note that you're setting the following properties:

    The application will resemble the following image:







    See Also