Pre loader

Tag: point marker label

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
6k views

What is the best way to add a label to the point marker? I was able to achieve this by creating a custom point marker and overriding the Draw method, but sometimes the spacing between the point marker and the text is a little off.

Here is what I did:

public override void Draw( IRenderContext2D context, IEnumerable<System.Windows.Point> centers )

looping through the centers and adding text

var size = _measuringGraphics.MeasureString( “my label”, new System.Drawing.Font( Core.Constants.UIConstant.GridFontFamily, 9 ) );
context.DrawText( new System.Windows.Rect( center, new System.Windows.Size( size.Width, size.Height ) ), Colors.Black, fontSize, “my label”);

Thanks,
Doug

Showing 1 result

Try SciChart Today

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

Start TrialCase Studies