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
90
Need help connecting SQL stored procedure to UltraChart
posted

I am admittedly new to this, but after much reading I am stumped how to get the data from my stored procedure to appear on a scatter chart within UltraChart.

Here is what I am doing.  Just sample data I made up.  THE REAL DATA WILL COME FROM A STORED PROCEDURE.  If that makes a difference

 

Here is where I have created a sql datasource in Visual Studio and select the table above

 

 

Next I set the UltraChart datasource to be the Sql datasource above

Now it this point when i ran it it crashed.  Here is the message

 

Then I went in to the Chart Wizard and added a chart area and two axes.  Here I set the X-axis

 

Then set Y

 

And then at least when I ran it it did not crash, but no data was shown.  See below.

How do i connect my X data with the X-axis and Y-data with the Y-axis?  Can I do it in the wizard or do I have to do it in the code?

Please also keep in mind this is all just test data trying to get anything to work.  The actual data will be coming from a stored procedure whose output looks like this

 

TIA for your help.

Parents
  • 26458
    Offline posted

    You can stick with your original approach of assigning the sql datasource directly to the chart.
    You just have to set two additional properties for it to work:
    chart.ScatterChart.ColumnX = 0
    chart.ScatterChart.ColumnY = 1

    By default the chart will look for numeric data in columns 1 and 2, but yours is in columns 0 and 1. This should fix the error.

Reply Children