This question is locked. New answers and comments are not allowed.
Hi! I've tried to integrate your chart control in my application, and have faced the following problem. In my app i have the following data class:
I'm using MVVM for my app and have the following property in my ViewModel:
On my page, i have the following XAML code:
And as a result I have the attached screenshot. I'm pretty sure, that that my data is OK, because I was using the other chart component with it. Maybe, I just misunderstand something about your chart component?
[Table( Name =
"Statistics"
)]
public
class
StatItem {
public
StatItem() {
}
public
StatItem( StatType type,
int
id,
float
value )
:
this
( type, id, value, DateTime.UtcNow ) {
}
public
StatItem( StatType type,
int
id,
float
value, DateTime dateTime ) {
Type = type;
ItemId = id;
Value = value;
DateTime = dateTime;
}
[Column( IsPrimaryKey =
true
, IsDbGenerated =
true
, CanBeNull =
false
, AutoSync = AutoSync.OnInsert )]
public
int
Id {
get
;
set
; }
[Column]
public
StatType Type {
get
;
set
; }
[Column]
public
int
ItemId {
get
;
set
; }
[Column]
public
float
Value {
get
;
set
; }
[Column]
public
DateTime DateTime {
get
;
set
; }
public
string
DateTimeNormal {
get
{
return
DateTime.ToShortDateString(); } }
}
I'm using MVVM for my app and have the following property in my ViewModel:
public
ObservableCollection<StatItem> BodyParameters
On my page, i have the following XAML code:
<
chart:RadCartesianChart
x:Name
=
"chart"
Height
=
"200"
Margin
=
"7"
>
<
chart:RadCartesianChart.HorizontalAxis
>
<
chart:LinearAxis
/>
</
chart:RadCartesianChart.HorizontalAxis
>
<
chart:RadCartesianChart.VerticalAxis
>
<
chart:LinearAxis
/>
</
chart:RadCartesianChart.VerticalAxis
>
<!--<
chart:RadCartesianChart
x:Name
=
"BodyParamChart"
Height
=
"200"
Margin
=
"7"
AxisForeground
=
"White"
Background
=
"SteelBlue"
FontSize
=
"11"
CategoryValueMemberPath
=
"DateTimeNormal"
GridStroke
=
"Transparent"
IsEnabled
=
"False"
DataSource
=
"{Binding BodyParameters}"
PlotAreaBackground
=
"SteelBlue"
>-->
<
chart:RadCartesianChart.Series
>
<
chart:LineSeries
Path
=
Statistics
}"
x:Name
=
"BodyParamChart"
Stroke
=
"Orange"
ValueBinding
=
"Value"
CategoryBinding
=
"DateTimeNormal"
ItemsSource
=
"{Binding BodyParameters}"
StrokeThickness
=
"2"
>
</
chart:LineSeries
>
</
chart:RadCartesianChart.Series
>
</
chart:RadCartesianChart
>