Pre loader

Draw series by mouse

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
0

I want add some line series my with mouse. Left click down for start, move mouse to draw line and mouse up to finish. The problem, that SciChartSurface do not raise MouseDown event ever. And another issue get mouse position according axis values.

What the best way draw line series with mouse?

Version
v5
  • You must to post comments
1
0

We have a sample which does just this in our Customer Examples Github page:

Custom Modifiers Sandbox contains a SimpleFreeDrawModifier, which shows how to use the Chart Modifier API to free-draw on a chart by mouse click.

There is an accompanying set of articles here: https://support.scichart.com/index.php?/Knowledgebase/Article/View/17234/32/

Best regards,
Andrew

  • You must to post comments
0
0

Thank you for quick answer. SimpleFreeDrawModifier works fine except XAxis.GetDataValue(e.MousePoint.X) function, it returns incorrect value. I have find, that XAxis.GetDataValue(e.MousePoint.X- 50) returns closer to correct value, but not for any zoom. How to fix this bug?

Images
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.

Try SciChart Today

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

Start TrialCase Studies