I'm having difficulty to display the data on the chart where the data are changed dynamically.
The graph would not populate the data according to the changes made.
Below is the snippet of the code, kindly guide if i did anything wrong.
p/s: The GetData will get the changes of data to be plot on the graph
XAML:
ViewModel.cs
The graph would not populate the data according to the changes made.
Below is the snippet of the code, kindly guide if i did anything wrong.
p/s: The GetData will get the changes of data to be plot on the graph
XAML:
<
chartView:LineSeries
Stroke
=
"Red"
StrokeThickness
=
"2"
ItemsSource
=
"{Binding ListValue}"
ValueBinding
=
"Value"
CategoryBinding
=
"Category"
>
ViewModel.cs
private
List<SampleClass> tempList;
public
List<SampleClass> ListValue
{
:
:
}
public
void
GetData(
string
tempValue)
{
SampleClass item =
new
SampleClass ();
item.Value= tempValue;
item.Category = m_counter++;
tempList.Add(item);
ListValue= tempList;
}