Hello,
is it possible to show a data point tracker using custom series like in the code example below? Do I have to override functions from the base class Series, additionally to the functions shown in the custom series tutorial?
<ig:XamDataChart.Series>
<custom:ContourAreaSeries x:Name="customSeries"Title="ContourAreaSeries" ToolTip="{}{Series.Title}: {Item.Value}" ItemsSource="{StaticResource data}" XAxis="{Binding ElementName=xAxis}" YAxis="{Binding ElementName=yAxis}"> </custom:ContourAreaSeries>
<ig:CategoryItemHighlightLayer x:Name="TackingLayer"Opacity="1" MarkerTemplate="{StaticResource DataTrackerTemplate}"UseInterpolation="True" TransitionDuration="0:00:00.1" Canvas.ZIndex="11" />
<ig:ItemToolTipLayer x:Name="ToolTipLayer"Canvas.ZIndex="12" UseInterpolation="True" TransitionDuration="0:00:00.1" />
<ig:CrosshairLayer x:Name="CrosshairLayer"Opacity="1" Thickness="1" Canvas.ZIndex="15"UseInterpolation="True" TransitionDuration="0:00:00.1"/>
</ig:XamDataChart.Series>
I use a custom series with a CategoryXAxis and a NumericYAxis.
Thank you
Hello Thomas,
In your XAML example, you show the ContourAreaSeries which comes from our "Creating a Custom Series" documentation. This series is based on a scatter series so it doesn't really work with CategoryXAxis. But you said your custom series uses CategoryXAxis. Does your data source have items with a single numeric value or two numeric values? Basically I need to know if your data is treated as a Category Series or a Scatter Series.
Hello Rob,
I want to use the DataChart to plot elevation profiles. So the data has a single numeric height value. Right now I use the index of the value in the binded list to interpolate the x value. Either a CategoryXAxis or a NumericXAxis would be applicable for me. However, based on the task, a NumericXAxis might be the one to prefer.
I also have problems using the Overview Pane. No data from the chart will be rendered within the preview.
Thank you for your help.
Hi Thomas,
Actually, based on the info you gave it would be better to use a CategoryXAxis as it is easier to implement the data point trackers with. I've been discussing this with our engineers and we're working on a sample that demonstrates how to implement a custom series to use a tracker such as the ItemTooltipLayer. I'll let you know when it's ready.
As for the OverviewPlusDetailPane(OPD), rendering your custom series into this requires that the series overrides the RenderThumbnail method. Inside this method you would render the series again for use inside the OPD. http://help.infragistics.com/doc/WPF/2014.1/CLR4.0/?page=InfragisticsWPF4.Controls.Charts.XamDataChart.v14.1~Infragistics.Controls.Charts.Series~RenderThumbnail.html
I'm glad this was able to help you out. It should prove useful to the community as well.
Hello Rob, hello Martin,
thank you for your help. The sample you provided works fine for me. I had to do some minor changes and added the thumbnail rendering.
Thanks,
Thomas
In order to use hover interaction layers (e.g. ItemToolTipLayer, CrosshairLayer) with custom series, you need to inherit from Series base class and then override a few methods in your custom series class. I attached solution with an example of how to support hover interaction layers in custom series. I implemented the custom series as scatter point series but you can modify series rendering method and provide different visualization of data items bound to the series.
Also, I added support for interpolation of item highlighting between two closest data points to a mouse location. I attached an image that explains how implementation of data points works in the custom scatter series.
The custom series implementation is using performance optimized algorithms for calculating closest points and interpolation of data point tracker. In addition, you can increase chart performance even more if you disable interpolation (UseInterpolation=false) on all hover layers but then there will be not interpolation of data point tracker.
In summary, my sample solution provides:
- Custom scatter series that uses NumericXAxis and NumericYAxis with optional support for interpolation of data point tracker between 2 data points closest to mouse location
- Custom ScatterItemHighlightingLayer to display data point tracker
- Standard ItemTooltipLayer to display tool tips
- Standard CrosshairLayer to display crosshair lines
In case, you want to use standard ScatterSeries or BubbleSeries with the custom series, you should set TargetSeries property (on all hover layers) to the custom series because only custom series supports hover layers.
Let me know if you have more questions about this implementation.
Martin
Just want to update you and let you know that we're still working on that sample. I have emailed our developers to see where we are at on this.