Beispiel #1
0
        protected override void DrawSample(RadarChartSample sample, double dx, double dy, double currentAngle)
        {
            var ellipse = new Ellipse();

            ellipse.SetBinding(Shape.StrokeProperty, new Binding(nameof(RadialChart.SamplePointStroke))
            {
                Source = Control
            });
            ellipse.SetBinding(Shape.StrokeThicknessProperty, new Binding(nameof(RadialChart.SamplePointStrokeThickness))
            {
                Source = Control
            });
            ellipse.SetBinding(Shape.FillProperty, new Binding(nameof(RadialChart.SamplePointFill))
            {
                Source = Control
            });
            ellipse.Width  = Control.SamplePointDiameter;
            ellipse.Height = Control.SamplePointDiameter;
            Panel.SetZIndex(ellipse, 999);
            AngleDictionary.Add(ellipse, currentAngle);
            SampleDictionary.Add(ellipse, sample);

            Canvas.SetLeft(ellipse, dx - Control.SamplePointDiameter / 2);
            Canvas.SetTop(ellipse, dy - Control.SamplePointDiameter / 2);
            Canvas.Children.Add(ellipse);
        }
Beispiel #2
0
 protected override void ClearCanvas()
 {
     AngleDictionary.Clear();
     SampleDictionary.Clear();
     Canvas.Children.Clear();
 }