This question is locked. New answers and comments are not allowed.
I have a chart that is data-bound to an ObservableCollection of objects in my ViewModel. Once a second "OnPropertyChanged" is triggered where the chart updates itself. This seems to work well for drawing the actual charting area. The problem occurs with the axis labels and ticks, where the chart renders far too many of them into the view. Seemingly sporadically, the chart will adjust how these labels are drawn and that sometimes alleviates the problem, but generally speaking they are completely unreadable. The LabelFitMode property is ostensibly useless, as all three options (none, multiline, rotate) will eventually overlap/smash the labels.
If I could force the chart to readjust it's labels every time my data binding is updated that would be great, but the UpdateLayout() methods seem to have no effect to this end. I've also tried manually calculating the label intervals for the axises after the binding update occurs. With an elapsed time axis this has some limited success, but for large values (15000+), the first label is drawn and none of the others:
Here's the XAML:
I've seen very little documentation specific to the Windows Phone 7 charts online, and even on this site I am constantly routed to WPF/Silverlight support forums where often the solution seems to be modifying the behavior of AutoRange or something akin to that. I have thus far found no property in the WP7 chart control where I can specify what this should be.
Help would be greatly appreciated.
If I could force the chart to readjust it's labels every time my data binding is updated that would be great, but the UpdateLayout() methods seem to have no effect to this end. I've also tried manually calculating the label intervals for the axises after the binding update occurs. With an elapsed time axis this has some limited success, but for large values (15000+), the first label is drawn and none of the others:
Here's the XAML:
<
chart:RadCartesianChart
x:Name
=
"InstantaneousChart"
<br>
Grid.Row="1"><
br
>
<
chart:RadCartesianChart.HorizontalAxis
><
br
>
<
chart:DateTimeCategoricalAxis
LabelFitMode
=
"None"
<br>
PlotMode="OnTicks"<
br
>
LastLabelVisibility="Visible"/><
br
>
</
chart:RadCartesianChart.HorizontalAxis
><
br
>
<
chart:RadCartesianChart.VerticalAxis
><
br
>
<
chart:LinearAxis
LabelFitMode
=
"MultiLine"
<br>
LastLabelVisibility="Visible"/><
br
>
</
chart:RadCartesianChart.VerticalAxis
><
br
>
<
chart:RadCartesianChart.Series
><
br
>
<
chart:AreaSeries
Stroke
=
"GreenYellow"
<br>
Fill="Green"<
br
>
StrokeThickness="4"<
br
>
CategoryBinding="timeInSeconds"<
br
>
ValueBinding="binValue"<
br
>
ItemsSource="{Binding InstantaneousData}"<
br
>
ClipToPlotArea="True"<
br
>
DataBindingComplete="InstantaneousChart_BindingUpdated"><
br
>
</
chart:AreaSeries
><
br
>
</
chart:RadCartesianChart.Series
><
br
>
<
chart:RadCartesianChart.Behaviors
><
br
>
<
chart:ChartPanAndZoomBehavior
ZoomMode
=
"None"
PanMode
=
"None"
/><
br
>
</
chart:RadCartesianChart.Behaviors
><
br
>
</
chart:RadCartesianChart
>
I've seen very little documentation specific to the Windows Phone 7 charts online, and even on this site I am constantly routed to WPF/Silverlight support forums where often the solution seems to be modifying the behavior of AutoRange or something akin to that. I have thus far found no property in the WP7 chart control where I can specify what this should be.
Help would be greatly appreciated.