FlexChart CreateChart(List <Quote> data) { var chart = new FinancialChart() { Dock = DockStyle.Fill, ChartType = FinancialChartType.Candlestick }; chart.Margin = new Padding(10, 10, 10, 10); chart.PlotMargin = new Padding(50, 32, 10, 0); chart.DataSource = data; chart.Binding = "High,Low,Open,Close"; chart.BindingX = "Date"; chart.AxisX.Min = data[0].Date.ToOADate(); chart.AxisX.Max = data[data.Count / 4].Date.ToOADate(); chart.ToolTip.Content = null; chart.Series.Add(new FinancialSeries() { SymbolSize = 4 }); var dl = new DrawingLayer(chart); dl.StatusChanged += (s, e) => statusLbl.Text = dl.Status; return(chart); }
public FibonacciDrawing(DrawingLayer layer, PointF start, PointF end) { _layer = layer; _ser = new C1.Win.Chart.Finance.Fibonacci(); _ser.Style.StrokeWidth = 1; _ser.Style.StrokeColor = Color.Green; Update(start.X, start.Y, end.X, end.Y); _layer.Chart.Series.Add(_ser); }
public MovingAverageDrawing(DrawingLayer layer) { _layer = layer; _ma = new C1.Win.Chart.Finance.MovingAverage() { Binding = "Close", BindingX = "Date", Period = 7 }; _layer.Chart.Series.Add(_ma); }
public EllipseDrawing(DrawingLayer layer, PointF start, PointF end) : base(layer) { _annotation = CreateAnnotation(start, end); }
public TextDrawing(DrawingLayer layer, PointF start) : base(layer) { _annotation = CreateAnnotation(start); UpdateSize(); }
public DrawingBase(DrawingLayer layer) { _layer = layer; }