Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
My 1st attempt at Infragistics' chart control.. Please help!
posted

I'm trying to create a chart within my WPF web application. I'm getting the data from my database using "SELECT * " query and storing the result in a dataset.

Then I have the following code to create the chart:

code-behind:

 

// Get the data and store in the dataset

DataSet deviceDS = IGDocumentation.GetData.GetDevicesROI("YOGITHA\\SQLEXPRESS");

          Series seriesNetProfit = new Series();

          seriesNetProfit.DataSource = deviceDS.Tables["NewDeviceROI"];

          seriesNetProfit.DataMapping = "NetProfit";

          seriesNetProfit.ChartType = ChartType.Line;

          this.xamChart1.Series.Add(seriesNetProfit);

 

XAML:

<igCA:XamChart  Name="xamChart1" DataContext="{Binding ElementName=xamChart1}" />

 

The chart that I'm getting consists of the values of one column ("NetProfit") of my dataset.

 

I'm trying to figure out how to get the values out of two columns ("NetProfit" and "DeviceCost") and use those as X and Y coordinates for the plot. But I can't figure out how to edit my code above to accomplish that. 

 

Any ideas?

Thanks