I'm currently testing out IG's DataVisualizaion and Charting tools, xamDataChart looks very nice, and I'm wondering if it can emulate, in xaml, a sort of DataTemplate wrapper for a Series (Line particularly). I've had success with a different Charting toolkit with an external wrapper class, and it's code looked something like this:
<multiChart:MultiChart> <multiChart:MultiChart.SeriesTemplate> <DataTemplate> <chartingToolkit:LineSeries /> </DataTemplate> </multiChart:MultiChart.SeriesTemplate> </multiChart:MultiChart>
The DataTemplate's the crucial part, as I do not know how many series I'll need to render until runtime. I don't see any kind of DataTemplate in the XamDataChart class, would there be another way to achieve this kind of behavior?
Hi,
Please see this post.
http://community.infragistics.com/forums/p/40011/242380.aspx#242380
Its possible it may need a small adjustment for the WPF version due to some different ways that DataContext is handled. Let me know if you have any problems or questions. I'll try to test this out later today myself and see if it needs any WPF adjustments.
We have been considering adding this feature natively. If you are interested in it, you could make a feature request to lodge your vote for it.
Hope this helps!
-Graham
The version I linked is a bit complicated, but very flexible, because it does everything with attached properties. You could also approach it with a just wrapper class instead which may simplify some things, but decrease the flexibility an amount.
Have you defined the System namespace on the root element?
It should look like this:
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:System="clr-namespace:System;assembly=mscorlib"
rather, Capital S.
Hi Graham
Sadly your sample don't goes with our scenario.We want to display a history of various values like temperatures, pressures and switching states (light on/off). All values are stored in a datatable with the columns ValueID, Value and TimeStamp. So each stored values has an independent timestamp. A transformation of the data from datatable into list format, like in the sample TestSeries[].TestSeriesItem.TestData[].TestDataItem, is easy therefore.
To this I have adjusted class TestDataItem and xaml as follows: public class TestDataItem{ public DateTime TimeStamp { get; set; } public double Value { get; set; }}
<ig:CategoryDateTimeXAxis x:Name="xAxis" ItemsSource="{Binding ElementName=xamDataChart1, Path=Series[(System:Int32)0].ItemsSource}" DateTimeMemberPath="TimeStamp" DisplayType="Continuous" Label="{}{TimeStamp:HH:mm:ss}"/>
In order that the first series will shows properly. In the following series the values are displayed in the fit Y-position and X-order but at the timestamps (Y-position) of the first series.
Is there any answer to that problem?
My second question is: how can I adjust the X-axis range (max/min) explizit for each series.
Thanking you in anticipation
Toni
If you are running the latest Service Release of the product. The CategoryDateTimeXAxis should have a MinimumValue and MaximumValue that you can use to establish the axis range. These properties were not in the Volume release of the product though. They also exist in your YAxis.
I'm not sure I completely understand your scenario, but it may more correct for you to create a seperate CategoryDateTimeXAxis per series and syncrhonize their MinimumValue and MaximumValue.
I believe in the sample code that I posted you can achieve this by instead creating the axis on the actual property of the series:
<ig:LineSeries.XAxis>
<ig:CategoryDateTimeXAxis ... />
</ig:LineSeries.XAxis>
If you can share some sort of example data and information about how you want it to look, I can give you additional guidance.
It seems to go! Except the synchronization of CategoryDateTimeXAxis.In my trial version (actual version 10.3) CategoryDateTimeXAxis has not a MinimumValue or MaximumValue property. Can you tell me, where I can download the Service Release for the actual trial version?(In "My IG"/"My Keys and Downloads" I can only download the Service Release for a registered version)
Unfortunately I don't believe you can currently download a service release for a trial product. If you contact developer support or product management, they may be able to get you a work around.