Hello,
I am trying to display a line series based on time, and from reading in the forums it seems that it is not an available option, as the Label parameter maps only to strings.
Using the 2011.1 release I noticed a DateTimeAxis and DateTimeDataPoint element, but no examples of their use and failed to use them in a naive way.
Could you approve my assumption or give a simple example of a DateTime chart?
Most basic example would be:
<Chart:XamWebChart> <Chart:XamWebChart.Series> <Chart:Series ChartType="Line" DataSource="{Binding Values}" DataMapping="Label=Date; Value=Value"> </Chart:Series> </Chart:XamWebChart.Series> </Chart:XamWebChart>
Thanks
It appears that this link no longer works, and I can't find this specific example. Could you please confirm where this example is located?
Hi Vladimir,
Unfortunately at this time there is no way to use Binding and DataMapping with the DateTimeAxis. If this is something you would like to see in the future, feel free to enter a feature request here:
http://devcenter.infragistics.com/Protected/RequestFeature.aspx
Thanks,
Marisa
It sure helped, thank you!
A minor thing: it seems that the DataPoints property does not support binding (as in {Binding}) or assignment of an ObservableCollection, but only consecutive .Add()s of DataPoints. Currently it is not an issue to work around it, but I am wondering if there is a simpler way?
Vladimir
Hi there,
Our DateTime Labels sample found here http://samples.infragistics.com/sldv/RunSamples.aspx?cn=web-chart#/web-chart/datetime-labels gives a very simple example of how to create a chart using the DateTimeAxis and DateTimeDataPoint element. The code is available to view in the combobox of the sample.
Hope this helps,