Ejemplo n.º 1
0
        private void SetupChart(FastMultiChart.FastMultiChart chart, Color color)
        {
            chart.GetXScaleValue       = FastMultiChartUtils.GetDateTimeScaleValue;
            chart.GetXValue            = FastMultiChartUtils.GetDateTimeValue;
            chart.GetXDivisionValue    = FastMultiChartUtils.GetDateTimeDivisionValue;
            chart.GetMinXScaleDivision = FastMultiChartUtils.GetDateTimeMinScaleDivision;
            chart.GetMinYScaleDivision = FastMultiChartUtils.GetDoubleMinScaleDivision;
            chart.GetXStringValue      = FastMultiChartUtils.GetDateTimeStringValue;
            chart.GetXStringScaleValue = FastMultiChartUtils.GetDateTimeStringScaleValue;

            var blank = new BalanceByDate(DateTime.Now, 0);

            chart.Graphs[0].Series.Add(
                new Series(blank.Property(p => p.X), blank.Property(p => p.Y), new Pen(color, 2f)));
        }
Ejemplo n.º 2
0
        private void SetupChart(FastMultiChart.FastMultiChart chart, Color[] colors)
        {
            if (colors?.Length == 0)
            {
                throw new ArgumentException();
            }

            SetupChart(chartEquityDrawDown, colors.First());

            var blank = new BalanceByDate(DateTime.Now, 0);

            foreach (var color in colors.Skip(1))
            {
                chart.Graphs[0].Series.Add(
                    new Series(blank.Property(p => p.X), blank.Property(p => p.Y), new Pen(color, 2f)));
            }
        }
        private static void SetupChart(FastMultiChart.FastMultiChart chart, string extraSeriesName)
        {
            chart.GetXScaleValue       = FastMultiChartUtils.GetDateTimeScaleValue;
            chart.GetXValue            = FastMultiChartUtils.GetDateTimeValue;
            chart.GetXDivisionValue    = FastMultiChartUtils.GetDateTimeDivisionValue;
            chart.GetMinXScaleDivision = FastMultiChartUtils.GetDateTimeMinScaleDivision;
            chart.GetMinYScaleDivision = FastMultiChartUtils.GetDoubleMinScaleDivision;
            chart.GetXStringValue      = FastMultiChartUtils.GetDateTimeStringValue;
            chart.GetXStringScaleValue = FastMultiChartUtils.GetDateTimeStringScaleValue;
            var blank = new BalanceByDate(DateTime.Now, 0);

            chart.Graphs[0].Series.Add(new Series(blank.Property(p => p.X), blank.Property(p => p.Y),
                                                  new Pen(Color.FromArgb(80, 5, 5), 2f)));
            if (!string.IsNullOrEmpty(extraSeriesName))
            {
                chart.Graphs[0].Series.Add(new Series(blank.Property(p => p.X), blank.Property(p => p.Y),
                                                      new Pen(Color.FromArgb(5, 105, 5), 2f)));
            }
        }
 private static void SetupChart(FastMultiChart.FastMultiChart chart, string extraSeriesName)
 {
     chart.GetXScaleValue = FastMultiChartUtils.GetDateTimeScaleValue;
     chart.GetXValue = FastMultiChartUtils.GetDateTimeValue;
     chart.GetXDivisionValue = FastMultiChartUtils.GetDateTimeDivisionValue;
     chart.GetMinXScaleDivision = FastMultiChartUtils.GetDateTimeMinScaleDivision;
     chart.GetMinYScaleDivision = FastMultiChartUtils.GetDoubleMinScaleDivision;
     chart.GetXStringValue = FastMultiChartUtils.GetDateTimeStringValue;
     chart.GetXStringScaleValue = FastMultiChartUtils.GetDateTimeStringScaleValue;
     var blank = new BalanceByDate(DateTime.Now, 0);
     chart.Graphs[0].Series.Add(new Series(blank.Property(p => p.X), blank.Property(p => p.Y),
                                           new Pen(Color.FromArgb(80, 5, 5), 2f)));
     if (!string.IsNullOrEmpty(extraSeriesName))
     {
         chart.Graphs[0].Series.Add(new Series(blank.Property(p => p.X), blank.Property(p => p.Y),
                                               new Pen(Color.FromArgb(5, 105, 5), 2f)));
     }
 }