
Dear Support team,
I want to show data from a dataset in actipro charts, I have tried diffrent methods,one is here, but I could not find any solution. it does not show any error and niether it shows any results.
Thanks,
Soraya
<charts:XYChart x:Name="XyChart">
<charts:AreaSeries x:Name="AreaSeries" XPath="{Binding Path=Name}" YPath="{Binding Path=No1}" YAxis="{Binding Source={x:Reference DgGrid}}"/>
</charts:XYChart>
public partial class MainWindow : Window
{
private List<string> Namen = new List<string>{ "sam", "mark", "Norah", "Max" };
private List<int> Values = new List<int> { 1, 2, 3, 4 };
public MainWindow()
{
InitializeComponent();
Table1();
}
private void Table1()
{
DataTable table1 = new DataTable("Customers");
table1.Columns.Add("Name");
table1.Columns.Add("No1");
table1.Columns.Add("No2");
table1.Rows.Add("sam", 1, 3.3);
table1.Rows.Add("mark", 2, 1.2);
table1.Rows.Add("Norah", 3, 2.2);
table1.Rows.Add("Max", 4, 1.2);
DataSet set = new DataSet("TABLE");
set.Tables.Add(table1);
DgGrid.ItemsSource = set.Tables["Customers"].DefaultView;
}
}