SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components

1 vote
8k views

I can’t seem to directly set the font color of a VerticalLineAnnotation.
I found this link which shows how to set it directly, but that doesn’t seem to do anything either (is it broken again?)
Here is some of my code:

    <Style x:Key="sliceStyle" TargetType="s:VerticalLineAnnotation">
        <Setter Property="ShowLabel" Value="True"/>
        <Setter Property="Stroke" Value="#ff4"/>
        <Setter Property="IsEditable" Value="True"/>
        <Setter Property="Foreground" Value="#225"/>
        <Setter Property="LabelPlacement" Value="Axis"/>
        <Style.Triggers>
            <Trigger Property="IsSelected" Value="True">
                <Setter Property="Stroke" Value="Blue"/>
            </Trigger>
        </Style.Triggers>
    </Style>
                            <s:SciChartSurface.ChartModifier>
                            <s:ModifierGroup>
                                <s:VerticalSliceModifier Name="sliceModifier">
                                    <s:VerticalSliceModifier.VerticalLines>
                                        <s:VerticalLineAnnotation Style="{StaticResource sliceStyle}" X1="1" />
                                        <s:VerticalLineAnnotation  X1="3" Stroke="#ff4" IsEditable="True" LabelPlacement="Axis" ShowLabel="True" >
                                            <s:AnnotationLabel LabelPlacement="TopRight" Text="initially3" Foreground="Green"/>
                                        </s:VerticalLineAnnotation>
                                    </s:VerticalSliceModifier.VerticalLines>
                                </s:VerticalSliceModifier>
                            </s:ModifierGroup>
                        </s:SciChartSurface.ChartModifier>

Thanks for any insight!

  • dwoerner asked 6 years ago
  • last active 6 years ago
Showing 1 result
This template supports the sidebar's widgets. Add one or use Full Width layout.