I used the following code to generate HiLoOpenCloseSeries and CandleSeries, but got a wrong result
chart = new SfChart();
var dateAxis = new DateTimeAxis { Title = new ChartAxisTitle { Text = "Date" }, Minimum = new DateTime(2000, 1, 1), Maximum = new DateTime(2046, 1, 1), Interval = 5 };
var valueAsix = new NumericalAxis { Title = new ChartAxisTitle { Text = "Price" }};
chart.PrimaryAxis = dateAxis;
chart.SecondaryAxis = valueAsix;
chart.Series.Add(new HiLoOpenCloseSeries
{
ItemsSource = new ObservableCollection<ChartDataPoint>
{
new ChartDataPoint(new DateTime(2000, 1, 1), 873.8, 878.85, 855.5, 860.5),
new ChartDataPoint(new DateTime(2004, 1, 1), 861, 868.4, 835.2, 843.45),
new ChartDataPoint(new DateTime(2008, 1, 1), 846.15, 853, 838.5, 847.5),
new ChartDataPoint(new DateTime(2012, 1, 1), 846, 860.75, 841, 855),
new ChartDataPoint(new DateTime(2016, 1, 1), 841, 845, 827.85, 838.65),
new ChartDataPoint(new DateTime(2020, 1, 1), 873.8, 878.85, 855.5, 860.5),
new ChartDataPoint(new DateTime(2024, 1, 1), 861, 868.4, 835.2, 843.45),
new ChartDataPoint(new DateTime(2028, 1, 1), 846.15, 853, 838.5, 847.5),
new ChartDataPoint(new DateTime(2032, 1, 1), 846, 860.75, 841, 855),
new ChartDataPoint(new DateTime(2036, 1, 1), 841, 845, 827.85, 838.65),
new ChartDataPoint(new DateTime(2030, 1, 1), 873.8, 878.85, 855.5, 860.5),
new ChartDataPoint(new DateTime(2034, 1, 1), 861, 868.4, 835.2, 843.45),
new ChartDataPoint(new DateTime(2038, 1, 1), 846.15, 853, 838.5, 847.5),
new ChartDataPoint(new DateTime(2042, 1, 1), 846, 860.75, 841, 855),
new ChartDataPoint(new DateTime(2046, 1, 1), 841, 845, 827.85, 838.65),
}
});
Only the green are right, others show the same open close price, or open shows the close value, close shows the open value, CandleSeries is the same
Thanks
Attachment:
sfchart_e529ad2f.zip