Pre loader

Pointmarker styles do not work for subclassed XyScatterRenderableSeriesViewModel


My issue is that the Pointmarker does not draw when I attempt to implement a custom renderable series view model. I’ve isolated it to the fact I am subclassing because the same code will draw if I replace my custom subclass with the base class.

I subclassed XyScatterRenderableSeriesViewModel like so:

public class CustomSeriesViewModel : XyScatterRenderableSeriesViewModel
    public CustomSeriesViewModel ()
    : base()

It is created like this:

return new CustomSeriesViewModel ()
            // Note: the Pointmarker is created in the Xaml. See styles.
            StyleKey = "CustomSeriesStyle",
            DataSeries = dataSeries,
            IsSelected = true,

And added into a list of type List IRenderableSeriesViewModel

If I replace the line new CustomSeriesViewModel () with new XyScatterRenderableSeriesViewModel(), the Pointmarker is drawn successfully. This is confusing to me, as there’s no other code in the subclass than the constructor, so I would expect it to be substitutable.

The style is responsible for defining the Pointmarker and looks like this:

 <Style x:Key="CustomSeriesStyle" TargetType="s:BaseRenderableSeries" >
    <Setter Property="s:TooltipModifier.TooltipTemplate" Value="{StaticResource CustomTooltipTemplate}" />
    <Setter Property="s:TooltipModifier.TooltipContainerStyle" Value="{StaticResource CustomTooltipStyle}" />
    <Setter Property="PointMarker">
                            <Ellipse Width="13" Height="13" Fill="White"/>
                            <Ellipse Width="9" Height="9" Fill="{StaticResource CustomBrush}"/>
  • Andrew Burnett-Thompson
    Hi John, we will investigate this and get back to you. Thanks for a clear bug report.
  • John Chow
    Resolved, issue was somewhere else
  • You must to post comments
Showing 0 results

Try SciChart Today

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

Start TrialCase Studies