I'm using a Dynamic Data Display (v0.4) plot and I want add a circle marker at a specific data point of series to highlight the position of the maximum value of the plot.
Taking into account the very small amount of documentation and examples provided by the developers of Dynamic Data Display, does anybody know how to add a marker at a specific point?
UPDATE
Since v0.4 does not have d3:CircleMarkerGraph
and I would like to use this version instead of v0.3 (reverting also requires code adjustment), I've tried the following:
View:
<d3:ChartPlotter x:Name="spectrumPlot" />
<d3:LineGraph x:Name="spectrumLineGraph" DataSource="{Binding SpectrumPlotData}"/>
<d3:MarkerPointsGraph x:Name="spectrumMarkers" DataSource="{Binding SpectrumMarkersData}" />
</d3:ChartPlotter>
Viewmodel:
private IPointDataSource _spectrumMarkersData;
public IPointDataSource SpectrumMarkersData
{
get { return _spectrumMarkersData; }
set
{
_spectrumMarkersData = value;
OnPropertyChanged("SpectrumMarkersData");
}
}
private void UpdatePlotData()
{
EnumerableDataSource<double> xDataSource, yDataSource;
xDataSource = new EnumerableDataSource<double>(SignalProcessor.Instance.GetXAxisSpectrum()); xDataSource.SetXMapping(X => X);
yDataSource = new EnumerableDataSource<double>(SignalProcessor.Instance.GetYAxisSpectrum()); yDataSource.SetYMapping(Y => Y);
SpectrumPlotData = new CompositeDataSource(xDataSource, yDataSource);
SpectrumMarkersData = new CompositeDataSource(xDataSource, yDataSource);
}
I would expect a marker at every point in the spectrum plot, but none appears. Does anyone know what I am doing wrong?