Exemple #1
0
 void EnsureSeries(int count)
 {
     if (barSeries == null || barSeries.Length != count)
     {
         graph.ResetColorCycle();
         graph.GraphPane.CurveList.Clear();
         barSeries = new IPointListEdit[count];
         for (int i = 0; i < barSeries.Length; i++)
         {
             var color  = graph.GetNextColor();
             var values = controller.Capacity > 0
                 ? (IPointListEdit) new RollingPointPairList(controller.Capacity)
                 : new PointPairList();
             var barItem = new BarItem(labelBars ? controller.ValueLabels[i] : null, values, color);
             barItem.Bar.Fill.Type        = FillType.Solid;
             barItem.Bar.Border.IsVisible = false;
             graph.GraphPane.CurveList.Add(barItem);
             barSeries[i] = values;
         }
     }
 }
Exemple #2
0
 void EnsureSeries(int count)
 {
     if (lineSeries == null || lineSeries.Length != count)
     {
         graph.ResetColorCycle();
         graph.GraphPane.CurveList.Clear();
         lineSeries = new IPointListEdit[count];
         for (int i = 0; i < lineSeries.Length; i++)
         {
             var color  = graph.GetNextColor();
             var values = controller.Capacity > 0
                 ? (IPointListEdit) new RollingPointPairList(controller.Capacity)
                 : new PointPairList();
             var lineItem = new LineItem(labelLines ? controller.ValueLabels[i] : null, values, color, SymbolType.None, 1);
             lineItem.Line.IsAntiAlias     = true;
             lineItem.Line.IsOptimizedDraw = true;
             graph.GraphPane.CurveList.Add(lineItem);
             lineSeries[i] = values;
         }
     }
 }
Exemple #3
0
        void EnsureSeries(int count)
        {
            if (lineSeries == null || lineSeries.Length != count)
            {
                graph.ResetColorCycle();
                graph.GraphPane.CurveList.Clear();
                lineSeries = new IPointListEdit[count];
                var labelLines = controller.ValueLabels != null;
                if (labelLines && controller.ValueLabels.Length == 2 && count == 1)
                {
                    labelLines = false;
                    GraphHelper.SetAxisLabel(graph.GraphPane.XAxis, controller.ValueLabels[0]);
                    GraphHelper.SetAxisLabel(graph.GraphPane.YAxis, controller.ValueLabels[1]);
                }

                for (int i = 0; i < lineSeries.Length; i++)
                {
                    var color  = graph.GetNextColor();
                    var values = controller.Capacity > 0
                        ? (IPointListEdit) new RollingPointPairList(controller.Capacity)
                        : new PointPairList();
                    var lineItem = new LineItem(
                        labelLines ? controller.ValueLabels[i] : null,
                        values,
                        color,
                        controller.SymbolType,
                        controller.LineWidth);
                    lineItem.Line.IsAntiAlias     = true;
                    lineItem.Line.IsOptimizedDraw = true;
                    lineItem.Symbol.Fill.Type     = FillType.Solid;
                    lineItem.Symbol.IsAntiAlias   = true;
                    graph.GraphPane.CurveList.Add(lineItem);
                    lineSeries[i] = values;
                }
            }
        }