Pre loader

Polar Chart Custom Modifier

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 to create a custom modifier for a polar chart.
But I failed immediately!
First I wanted to add a simple 10×10 px ellipse.
But the ellipse doesn’t appear on the chart!

public override void OnModifierMouseDown(ModifierMouseArgs e)
{
    var translatedPont = ParentSurface.RootGrid.TranslatePoint(e.MousePoint, ParentSurface.ModifierSurface);

    var point = new Ellipse
    {
        Width = 10,
        Height = 10,
        Stroke = Brushes.White,
        StrokeThickness = 1,
        Fill = Brushes.Gray
    };

    ParentSurface.ModifierSurface.Children.Add(point);

    point.MeasureArrange();

    var leftCoordinate = translatedPont.X - point.ActualWidth / 2;
    var topCoordinate = translatedPont.Y - point.ActualHeight / 2;

    Canvas.SetLeft(point, leftCoordinate);
    Canvas.SetTop(point, topCoordinate);
...
Version
6
  • You must to post comments
Showing 0 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