Hello all , i am very new to c# visual studio ,In my winforms app i have created a dataset from Trial.Accdb database & in it i have added a Scalarquery() which return count of 1 particular column , now i want to use this query as data-source to show as a chart in my winform .Please help me how to achieve this

and here is form load event code
private void FrmDashBoard_Load(object sender, EventArgs e)


Name:  sql select.jpg
Views: 714
Size:  30.6 KBName:  target datasource.jpg
Views: 683
Size:  32.9 KBName:  chart details.jpg
Views: 650
Size:  27.8 KB

Or based on the above requirement i am not able modify the below code to full fill the same requirement:
private void Form1_Load(object sender, EventArgs e)
            var series1 = new System.Windows.Forms.DataVisualization.Charting.Series
                Name = "Series1",
                Color = System.Drawing.Color.Green,
                IsVisibleInLegend = false,
                IsXValueIndexed = true,
                ChartType = SeriesChartType.Line


            for (int i = 0; i < 1000; i++)
                series1.Points.AddXY(i, Result(i));

        private int Result(int i)
            var result = 20 * i + i * i;
            return result;