Beispiel #1
0
        protected ChartPoint[][] ChangeDataToPoints(ChartData data, Painter painter)
        {
            int            x;
            PaintArguments paintArguments = new PaintArguments(painter, data, chartMargin);

            ChartPoint[][] point = new ChartPoint[data.CalculateRowCount()][];

            foreach (DataSeries dataSeries in data.Series)
            {
                point[data.Series.IndexOf(dataSeries)] = new ChartPoint[dataSeries.Point.Count];
                x = paintArguments.AxisXLocation + data.Series.IndexOf(dataSeries) * CalculateInterval(painter, data);

                foreach (DataPoint dataPoint in dataSeries.Point)
                {
                    float y = dataPoint.Value / paintArguments.Ratio;
                    if (dataPoint.IsValid == true)
                    {
                        point[data.Series.IndexOf(dataSeries)][dataSeries.Point.IndexOf(dataPoint)] =
                            new ChartPoint(x, (int)(painter.Height - y - paintArguments.AxisYLocation));
                    }
                }
            }
            return(point);
        }
Beispiel #2
0
 protected virtual void DrawCore(Painter painter, ChartData data)
 {
     DrawFram(painter, data, chartType);
 }
Beispiel #3
0
 public void Draw(Painter painter, ChartData data)
 {
     Draw(painter, data, new Margin());
 }
Beispiel #4
0
 public void Draw(Painter painter, ChartData data, Margin chartMargin)
 {
     DrawCore(painter, data);
 }
Beispiel #5
0
 protected virtual int CalculateInterval(Painter painter, ChartData data)
 {
     return(0);
 }