开发者

WPF Charting with Dynamic Data Display: How can I show a regression line?

I'm using Dynamic Data Display (D3) to render a few simple LineSeries on a chart:

<d3:ChartPlotter>
    <d3:CursorCoordinateGraph/>开发者_运维问答
    <d3:LineGraph DataSource="{Binding SelectedGraphValues}"/>
    <!-- ... Snip ...-->
</d3:ChartPlotter>   

here is a small example graph:

WPF Charting with Dynamic Data Display: How can I show a regression line?

* image from http://dynamicnotions.blogspot.com/2009/05/linear-regression-in-c.html

Is there a simple way to do this with D3? Or do I have to make the calculations myself? I just want to check before I reinvent the wheel here :-)

D3 is a very neat library, altough it's lacking a bit in documentation...


After some research and going through samples from DynamicDataDisplay, I guess it's not built in (could've been though, there's a lot of stuff in that library!)

So I just created a new LineGraph and a new ObservableDataSource to bind it to, and calculated the regression myself.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜