How do I display a timeline with amCharts for WP7
-
27-10-2019 - |
Question
I'm trying do display a time line in wp7 using amCharts quickCharts.
<amq:SerialChart DataSource="{Binding MyData}"
CategoryValueMemberPath="Date"
AxisForeground="White"
PlotAreaBackground="Black"
GridStroke="Gray"
Margin="1"
>
<amq:SerialChart.Graphs>
<amq:LineGraph ValueMemberPath="Score"
Title="Scores"
Brush="Blue"/>
</amq:SerialChart.Graphs>
</amq:SerialChart>
MyData
is an ObservableCollection<ScoreDate>
where ScoreDate
is defined as
public class ScoreDate
{
public int Score{get;set;}
public DateTime Date{get;set;}
}
Problem is, that the X-Axis is just plotted as individual values, skipping periods without data, and not as events on a distributed timeline as I need it to be.
Any way to make amCharts do that?
Solution
Apparently this is no easy feat as the amcharts for wp7 is too simple and apparently abandoned.
What I ended up doing was just creating my own graph with a PolyLine on a Canvas, databound to a PointCollection.
Got the graph right pretty fast.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow