开发者

How to bind an amChart (Stock Chart) to a DataTable?

开发者 https://www.devze.com 2023-01-27 07:26 出处:网络
I\'ve managed to bind an amChart Line Chart to a DataTable by assigning the member DataItemsSource of the LineChartGraph to mytable.DefaultView.

I've managed to bind an amChart Line Chart to a DataTable by assigning the member DataItemsSource of the LineChartGraph to mytable.DefaultView.

I'm trying to do the same with an amChart Stock Chart. However the Graph object does not have a DataItemsSource. It has instead a DataSetID memb开发者_开发百科er that points to a DataSet defined as part of the StockChart control. Anyways... Any suggestion?

Thanks!


After some trial and error, it turned out that you can bind ItemsSource to a DataTable. Judging by the number of responses I've gotten... it looks like not that many people use this control. It's surprising b/c it's absolutely great.. and free.

<ams:StockChart ... >
   ...
   <ams:StockChart.DataSets>
      <ams:DataSet ItemsSource="{Binding Table}" ... />
      ...
   </ams:StockChart.DataSets>
   ...
</ams:StockChart>
0

精彩评论

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