Hi Telerik Team.
The CandlestickSeries seems to have an odd behavior for negative values. The attached image shows a graph where the candlestick values should decrease linearly from left to right, but they stop at around y=0.
What is a workaround for this?
I use Telerik Version 2012.2.912.40, WPF
Code:
<
telerik:RadCartesianChart
>
<
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:LinearAxis
/>
</
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:CategoricalAxis
/>
</
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:CandlestickSeries
x:Name
=
"Series0"
HighBinding
=
"High"
OpenBinding
=
"Open"
CloseBinding
=
"Close"
LowBinding
=
"Low"
CategoryBinding
=
"X"
>
</
telerik:CandlestickSeries
>
</
telerik:RadCartesianChart
>
public
partial
class
MainWindow : Window
{
public
MainWindow()
{
InitializeComponent();
this
.Loaded +=
new
RoutedEventHandler(MainWindow_Loaded);
}
void
MainWindow_Loaded(
object
sender, RoutedEventArgs e)
{
var chartData =
new
List<MyChartDataClass>();
for
(
int
i = 0; i < 35; i++)
{
var cdc =
new
MyChartDataClass()
{
X = i,
High = 5 - i,
Open = 4 - i,
Close = 3 - i,
Low = 2 - i,
};
chartData.Add(cdc);
}
Series0.ItemsSource = chartData;
}
}
public
class
MyChartDataClass
{
public
int
X {
get
;
set
; }
public
double
Close {
get
;
set
; }
public
double
Low {
get
;
set
; }
public
double
Open {
get
;
set
; }
public
double
High {
get
;
set
; }
}