Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
710
Markers disappear on ScatterSeries
posted

I have a chart that has a ScatterSeries with  NumericXAxis and NumericYAxis.  The MarketTemplate is set to:

  <DataTemplate
      x:Key="MAMarker">
      <Ellipse
        Stretch="Fill"
        HorizontalAlignment="Stretch"
        VerticalAlignment="Stretch"
        Fill="{Binding Path=Item, Converter={StaticResource MAResultToColor}}"
        Stroke="{Binding Path=Series.ActualMarkerOutline}"
        StrokeThickness="0.5"
        MinWidth="10"
        MinHeight="10">
        <ToolTipService.ToolTip>
          <StackPanel
            Orientation="Vertical">
            <TextBlock
              Text="{Binding Path=Item.Frequency, StringFormat='Value: {0}'}" />
          </StackPanel>
        </ToolTipService.ToolTip>
      </Ellipse>
    </DataTemplate>

The chart has 720 x values with 4 points per x value: a total of 2880 points to chart. I dynamically add points to the chart. The problem is as I add points to the chart, a few of the existing markers intermittently display and then disappear.  Does anyone have an explanation for this?  My co-workers describe this as a Christmas lights effect because they appear to be blinking.

Your help is much appreciated.


  • 30692
    Offline posted

    Hi,

    The default scatter chart uses full templatable elements (that you are using to neat effect here), but these can be somewhat slow to add and maintain in Silverlight's layout tree. This is why the normal Scatter Series aggressively tries to hide less interesting points when your number of values exceeds the MaximumMarkers property on ScatterSeries. It will try to hid points that are occluded or are in high density areas so that outliers can be examined, etc.

    You can modify this behavior by increasing the MaximumMarkers property on the series to a higher value. However, you may find that with a larger value your series will perform less than adequately, depending on data volume. Unfortunately, as the number of templatable objects increase Silverlight/WPFs ability to handle them with good performance has a marked decrease.

    We have a CTP of a new series in 12.1 (HighDensityScatterSeries) that battles this problem by not using templatable objects to do its rendering. But, you lose out on your ability to define the individual appearance of the points using a template.

    Let me know if the performance is acceptable when you raise MaximumMarkers to encompass the extra points you would like to display. If the answer is no, you may need to make a feature request or explore custom series implementation. Armed with the exact requirements for how the individual data items should affect the appearance of their Markers you may be able to put something purpose built together to avoid relying on Silverlight's templating/layout engine.

    -Graham