예제 #1
0
        /// <summary>
        /// Generates the datas.
        /// </summary>
        public override void GenerateDatas()
        {
            ScatterPoints.Clear();
            if (!IsPointsGenerated)
            {
                Parts.Clear();
            }
            Point endPoint   = new Point(0, 0);
            Point startPoint = new Point(0, 0);

            if (this.Points != null && this.SeriesContainer != null && this.Points.Count > 0)
            {
                CalculateMinAndMax();
                ChartPoint oldPoint = new ChartPoint()
                {
                    XValue = double.MinValue, YValue = double.MinValue
                };
                IntializePoints();
                foreach (ChartPoint point in this.Points)
                {
                    if (CheckValuePoint(oldPoint, point))
                    {
                        Point linePoint = NormalizePoint(new Point(point.XValue, point.YValue));
                        ScatterPoints.Add(linePoint);
                        oldPoint = point;
                    }
                }
                if (this.RenderingMode == RenderingMode.Default)
                {
                    if (!IsPointsGenerated)
                    {
                        for (int i = 0; i < ScatterPoints.Count; i++)
                        {
                            ScatterPart scatterPart = new ScatterPart(ScatterPoints[i]);
                            Binding     sizeBinding = new Binding();
                            sizeBinding.Path   = new PropertyPath("ScatterSize");
                            sizeBinding.Source = this;
                            scatterPart.SetBinding(ScatterPart.SizeProperty, sizeBinding);
                            SetBindingForStrokeandStrokeThickness(scatterPart);
                            this.Parts.Add(scatterPart);
                        }
                        IsPointsGenerated = true;
                    }
                    else
                    {
                        int i = 0;
                        foreach (ScatterPart part in this.Parts)
                        {
                            part.X1 = ScatterPoints[i].X;
                            part.Y1 = ScatterPoints[i].Y;
                            part.Refresh();
                            i++;
                        }
                    }
                }
            }
            else
            {
                Parts.Clear();
            }

            if (this.SeriesContainer != null)
            {
                this.SeriesContainer.Invalidate();
            }

            IsRefreshed = false;
        }
예제 #2
0
        /// <summary>
        /// Generates the datas.
        /// </summary>
        public override void GenerateDatas()
        {
            BubblePoints.Clear();
            if (!IsPointsGenerated)
                Parts.Clear();
            Point endPoint = new Point(0, 0);
            Point startPoint = new Point(0, 0);
            if (PointsSource != null)
                SizeValues = this.GetReflectionValues(this.SizePath, PointsSource, SizeValues, false);

            if (this.Points != null && this.SeriesContainer != null && this.Points.Count > 0)
            {
                CalculateMinAndMax();
                ChartPoint oldPoint = new ChartPoint() { XValue = double.MinValue, YValue = double.MinValue };
                IntializePoints();
                foreach (ChartPoint point in this.Points)
                {
                    if (CheckValuePoint(oldPoint, point))
                    {
                        Point linePoint = NormalizePoint(new Point(point.XValue, point.YValue));
                        BubblePoints.Add(linePoint);
                        oldPoint = point;
                    }
                }
                if (this.RenderingMode == RenderingMode.Default)
                {
                    if (!IsPointsGenerated)
                    {
                        for (int i = 0; i < BubblePoints.Count; i++)
                        {
                            ScatterPart scatterPart = new ScatterPart(BubblePoints[i]);
                            scatterPart.Size = SizeValues[i];
                            SetBindingForStrokeandStrokeThickness(scatterPart);
                            this.Parts.Add(scatterPart);
                        }
                        IsPointsGenerated = true;
                    }
                    else
                    {
                        int i = 0;
                        foreach (ScatterPart part in this.Parts)
                        {
                            part.X1 = BubblePoints[i].X;
                            part.Y1 = BubblePoints[i].Y;
                            part.Refresh();
                            i++;
                        }
                    }
                }
            }
            else
            {
              Parts.Clear();
            }

            if (this.SeriesContainer != null)
                this.SeriesContainer.Invalidate();
            IsRefreshed = false;
        }
예제 #3
0
        /// <summary>
        /// Generates the datas.
        /// </summary>
        public override void GenerateDatas()
        {
            ScatterPoints.Clear();
            if (!IsPointsGenerated)
                Parts.Clear();
            Point endPoint = new Point(0, 0);
            Point startPoint = new Point(0, 0);

            if (this.Points != null && this.SeriesContainer != null && this.Points.Count > 0)
            {
                CalculateMinAndMax();
                ChartPoint oldPoint = new ChartPoint() { XValue = double.MinValue, YValue = double.MinValue };
                IntializePoints();
                foreach (ChartPoint point in this.Points)
                {
                    if (CheckValuePoint(oldPoint, point))
                    {
                        Point linePoint = NormalizePoint(new Point(point.XValue, point.YValue));
                        ScatterPoints.Add(linePoint);
                        oldPoint = point;
                    }
                }
                if (this.RenderingMode == RenderingMode.Default)
                {
                    if (!IsPointsGenerated)
                    {
                        for (int i = 0; i < ScatterPoints.Count; i++)
                        {
                            ScatterPart scatterPart = new ScatterPart(ScatterPoints[i]);
                            Binding sizeBinding = new Binding();
                            sizeBinding.Path = new PropertyPath("ScatterSize");
                            sizeBinding.Source = this;
                            scatterPart.SetBinding(ScatterPart.SizeProperty, sizeBinding);
                            SetBindingForStrokeandStrokeThickness(scatterPart);
                            this.Parts.Add(scatterPart);
                        }
                        IsPointsGenerated = true;
                    }
                    else
                    {
                        int i = 0;
                        foreach (ScatterPart part in this.Parts)
                        {
                            part.X1 = ScatterPoints[i].X;
                            part.Y1 = ScatterPoints[i].Y;
                            part.Refresh();
                            i++;
                        }
                    }
                }

            }
            else
            {
                Parts.Clear();
            }

            if (this.SeriesContainer != null)
                this.SeriesContainer.Invalidate();

            IsRefreshed = false;
        }