我有以下问题:
在我们的应用中有在运行时定义的子类别的报表列表...
报告的总体结果将显示在一个的ColumnSeries ,它工作正常。现在,我必须在LineSeries中显示子类别的结果以进行直接比较,这将不起作用。 这是我到目前为止(在后面的代码):Silverlight图表工具包:生成供LineSeries抛出异常
foreach (var item in ReportListViewModel.ReportSections)
{
var series = new LineSeries();
series.SetBinding(DataPointSeries.ItemsSourceProperty, new Binding("ItemList"));
series.IndependentValuePath = "Date";
series.DependentValuePath = item.BindingPath; // points to an existing entry in a Dictionary<string, double>
series.Title = item.Text;
chart.Series.Add(series);
}
它工作正常,但一旦数据被加载时,我得到一个InvalidOperationException异常,说明密谋值没有合适的轴被发现。
以下工作完全正常(即使它不正是我需要的):
foreach (...)
{
...
series.DependentValuePath = "Result" // Result is the dependent property of the ColumnSeries, and I tested it just to make sure it isn't me
...
}
可不可以给的“item.BindingPath”的值的例子吗? – SalvadorGomez
''部分[人格]“' 正如我所说,这是一个字典<字符串,双> {...,{”个性“,2.0},...} – Nuffin