xamlwindows-store-appswinrt-xamlsilverlight-toolkitwinrt-xaml-toolkit

WinRT-xaml-Toolkit: Line Series with median Line


Is there a way to implement a median Line using this lib?

The only way I think could work is adding a new LineSeries and add a median for each Value in my Data-LineSeries

Something like this:

    <charting:Chart>
        <charting:Chart.Series >
            <charting:LineSeries ItemsSource="{Binding Articles}"  Title="Test Title" Height="400" Width="400" IndependentValuePath="dateTime" DependentValuePath="price"  >

            </charting:LineSeries>
---Pseudo----
            <charting:LineSeries x:Name="Median" ItemsSource="{Binding Articles}" Title="Median" IndependentValuePath="dateTime" DependentValuePath="median">

            </charting:LineSeries>
        </charting:Chart.Series>
    </charting:Chart>

This would cause me to add the median Value of my Product to each Article which is..kinda unnecessary.

Is there an easier way to do this? Or even a way which fills the space between Data and Median with a certain color (e.g. http://www.jidesoft.com/images/line-chart-gradient-fill.png)?

Thanks in Advance


Solution

  • I don't think there are any built in statistical functions in the DataVisualization library that I ported from Silverlight Toolkit, but you can provide your own data source separate from your Articles one that has any range of values you want.

    I also can't recall if the filled style of the data series visualization is implemented, but you could try to create a modified version of the LineSeries one that does support Fill or check the source if any such property is already available. It might be doable by simply changing the Style of the series.