Chart for WinRT
Creating a Hi-Lo-Open-Close Chart

Create a Hi-Lo-Open-Close chart in code by inserting the following code in your InitializeComponent() method:

C#
Copy Code
c1Chart1.ChartType = ChartType.HighLowOpenClose;
 
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(2014,10,2), new DateTime(2014,10,3), new DateTime(2014,10,6), new DateTime(2014,10,7), new DateTime(2014,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