【发布时间】:2016-06-24 13:53:09
【问题描述】:
我一直在使用http://d3future.codeplex.com/提供的D3版本
它在股票图表上运行良好,但在 AddLineGraph 上出现错误。 以下代码来自其他网络帖子。
似乎某些版本的 DynamicDataDisplay.dll (v2/v3/v4) 可以使用该语句工作/编译。
任何帮助将不胜感激。
public partial class MainWindow : Window
{
public ObservableDataSource<Point> source1 = null;
public MainWindow()
{
InitializeComponent();
//this.Loaded += MainWindow_Loaded;
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
source1 = new ObservableDataSource<Point>();
//Set identity mapping of point
source1.SetXYMapping(p => p);
plotter3.AddLineGraph(source1, 4, "Data Row");
//Fits the chart within ViewPort
plotter3.Viewport.FitToView();
// Start computation in 2nd thread
Thread simThread = new Thread(new ThreadStart(Computation));
simThread.IsBackground = true;
simThread.Start();
}
}
【问题讨论】:
-
错误是 'ChartPlotter' 不包含 AddLineGraph 的定义,并且没有扩展方法 'AddLineGraph' 接受类型为'ChartPlotter'的第一个参数。
标签: c# wpf dynamic-data-display