I’m integrating Charts for WPF (XYChart / LineSeries) into an existing WPF application that has a lot of chart “report definitions” based on DataTable column names.
In standard WPF binding, a DataTable.DefaultView (DataView) works well as an ItemsSource, because each item is a DataRowView and WPF can resolve column names as binding paths (via ICustomTypeDescriptor). For example, WPF controls can bind to Path=Time or Path=Value when the columns exist.
With Actipro XYChart series, I’m able to set ItemsSource to a DataView, but XPath="Time" / YPath="Value" results in an empty chart even though the DataView contains rows and the columns exist. This makes it seem like XPath/YPath path resolution is not using the WPF binding engine / TypeDescriptor and instead relies on reflection against CLR properties (which DataRowView doesn’t expose for columns).
Question
Is there a supported way for Actipro Charts to resolve XPath/YPath using the same semantics as WPF binding (i.e., support DataRowView column names via ICustomTypeDescriptor), or to support indexer paths like Item[Time] / Item[Value]?
This is important for scenarios where the data source is tabular and dynamic, and where we already have many report definitions based on DataTable column names. Requiring projection into CLR point types is workable, but it adds overhead and complexity for a large set of existing reports.
Any guidance or best practice would be appreciated. If this is not supported, could you confirm whether it’s by design and if there’s a recommended alternative for binding to DataTable/DataView?
Thanks,
Bob