I have created a RadCartesianChart that shows live data coming in from a machine in a factory that charts the weight of each unit.
Using this xaml:
<
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:CategoricalAxis
/>
</
telerik:RadCartesianChart.HorizontalAxis
>
With this code-behind:
RadObservableCollection<
double
> dbl = new RadObservableCollection<
double
>();
this.chart.Series[0].ItemsSource = dbl;
Then as data comes in, I add doubles to the dbl variable. This all works well but my horizontal axis starts with no datapoints, therefore no demarcation ticks, and the spread of the first datapoints is ridiculously wide, until it reaches a hundred and then I start removing the zeroeth point and adding the next one at the end. Then it maintains a stable appearance.
I have written a hack by adding 100 datapoints with "0" value like this:
dbl = new RadObservableCollection<
double
>() { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
But I wonder if there isn't a "proper" way to get the desired result.
Bob Graham