Pre loader

Tag: PointMarkerTemplate

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0 votes
10k views

I managed to be able to render the EllipsePointMarkers, but here is the thing: It only works when I declare the PointMarker in my view model inside the constructor of the XyScatterRenderableSeriesViewModel. The Style with the PointerMarkerTemplate is NOT APPLIED for some reason. Could this be a bug? Please note that in the following code in the view model I specify the color to be “Red” (ARGB(255, 255, 0, 0) but in xaml the template specifies yellow for the fill and stroke.

I absolutely need the PointMarker Template to work because I want to be able to change the color and thickness of the Scatter points during runtime via UI (function in my custom legend).

The following are code snippets from my view model and the corresponding xaml:

ChartSeries.Add(new XyScatterRenderableSeriesViewModel()
                {
                    DataSeries = dataSeries,
                    //Stroke = color,
                    //StrokeThickness = 10,
                    IsVisible = isVisible,
                    AntiAliasing = useAntiAliasing,
                    IsSelected = isSelected,
                    XAxisId = "DateTimeAxis",
                    YAxisId = yAxisId,
                    PointMarker = new EllipsePointMarker()
                    {
                        Fill = Color.FromArgb(255, 255, 0, 0),
                        Stroke = Color.FromArgb(255, 255, 0, 0),
                        StrokeThickness = 5
                    }

                });


<UserControl.Resources>

    <Style TargetType="{x:Type s:XyScatterRenderableSeries}">
        <Setter Property="PointMarkerTemplate">
            <Setter.Value>
                <ControlTemplate>
                    <s:EllipsePointMarker Fill="Yellow" Stroke="Yellow" StrokeThickness="15"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <s:EffectConverter x:Key="EffectConverter"/>

    <DropShadowEffect x:Key="LegendDropShadow" BlurRadius="10" Direction="-45" ShadowDepth="5" Color="Black"/>

    <SolidColorBrush x:Key="LegendTextBrush"  Color="#5F5F5F"/>

    <resources:VisibilityToBooleanConverter x:Key="VisibilityToBooleanConverter"/>

    <resources:CustomCategoryDateTimeAxisLabelProvider x:Key="LabelProvider"/>

</UserControl.Resources>
  • bbmat asked 5 years ago
  • last active 5 years ago
Showing 1 result

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies