Chart for WinRT
Creating a Candle Chart

To create a Candle chart, use the following code within the InitializeComponent() method:        

C#
Copy Code
c1Chart1.ChartType = ChartType.Candle;
HighLowOpenCloseSeries ds = new HighLowOpenCloseSeries() { Label = "s1" };
ds.SymbolStrokeThickness = 3;
ds.SymbolSize = new Size(20, 20);
ds.XValuesSource = new DateTime[] { new DateTime(2008,10,1), new DateTime(2008,10,2), new DateTime(2008,10,3), new DateTime(2008,10,6), new DateTime(2008,10,7), new DateTime(2008,10,8)
};
ds.OpenValuesSource = new double[] { 100, 102, 104, 100, 107, 102 };
ds.CloseValuesSource = new double [] { 102, 104, 100, 107, 102, 100 };
ds.HighValuesSource = new double [] { 102, 105, 105, 108, 109, 105 };
ds.LowValuesSource = new double[] { 99, 95, 95, 100, 96, 99, 98 }; 
c1Chart1.Data.Children.Add(ds);
}
   

 

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback