Creating and diplaying histograms for SQL DB table RRS feed

  • Question

  • Hello All:

    In my C# program, I would like to extract the data from a SQL Database table (whcih is done) and would like to create histogram for that data. Could anyone please let me know how is it done in C#?



    Thursday, May 10, 2018 6:49 PM

All replies

  • https://social.msdn.microsoft.com/Forums/office/en-US/home?category=officedev

    It's probably where you need to post.

    Friday, May 11, 2018 5:33 AM
  • I think that you can also use a Chart control. Add one (named “chart1”) to your form, and execute this sample:

       int[] d = new[] { 10, 70, 40, 80, 30 };

       var s = chart1.Series[0];

       s.ChartType = SeriesChartType.RangeColumn;

       foreach( var i in d ) s.Points.AddY( i );


    Use your data instead of the d array, or give details.

    Friday, May 11, 2018 7:08 AM
  • This is the C# forum. We only answer C#-specific questions here. Please identify the UI technology you are using so your question can be moved to the appropriate forums.

    Michael Taylor http://www.michaeltaylorp3.net

    Friday, May 11, 2018 2:46 PM