Pre loader

Highlighting selected

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


I have implemented a custom Chartmodifier:—part-6—select-data-points-via-mouse-drag

Now I want to highligt(for example other Color) the line between the Start and Endpoint.
How can I do this?

  • You must to post comments
Best Answer

Hi Daniel,

There are two places where we draw to the screen during the custom Data-Point Selection ChartModifier:

  • The first is private Point SetReticulePosition(Rectangle rectangle, Point startPoint, Point endPoint, bool isMaster)
  • The second is public override void OnParentSurfaceRendered(SciChartRenderedMessage e)

During SetReticulePosition, we are using the ModifierSurface – a WPF Canvas on top of the chart – to position a simple UIElement. If you wanted to add a Line here you can do also.

During OnParentSurfaceRendered, we draw the points for selection after the user has released the mouse. Here we use SciChart’s bitmap drawing engine to draw ellipses. Other methods available on IRenderContext2D include

  • DrawLine – lines of variable stroke width
  • DrawQuad – draw a rectangle
  • DrawEllipse – draw an ellipse shape
  • CreateBrush – Create a brush for fills
  • CreatePen – Create a Pen for drawing lines
  • CreateSprite – Create a Sprite for drawing repeated small bitmaps
  • FillPolygon – Fill an area with a brush
  • FillRectangle – Fill a rectangle area
  • FillEllipse – Fill an ellipse shape
  • DrawText – Draw some text to the render surface

If you use one of these two you can draw to the chart surface during the modifier operation.

Hope that helps,


  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.