none
How to create chart/graph in c#?

    Question

  •  

    Hi,

     

    I want to create chart/graph in c#(windows application).

     

    How can i do it?

     

    Please help me. Its very urgent.

     

    Thanks,

    Shobha

    Thursday, April 03, 2008 11:32 AM

Answers

All replies

  • If you add a reference and click on COM tab, see if you have "Microsoft Chart Control" (MSCHRT20.OCX) it ships with vb6 but can be freely downloaded, use google. 

     

    drop the control on your form and add something like...

     

            private void Form1_Load(object sender, EventArgs e)
            {
                object[] vpArr = new object[5] {7, 6, 8, 3, 5};           
                axMSChart1.ChartData = vpArr;
            }

    There are some rather nice 3d options available in the charttype property, like

    axMSChart1.chartType = VtChChartType3dBar

    which lets you freely rotate by holding down control and moving the mouse.

     

    hth

     

    Wednesday, April 09, 2008 11:48 AM
  • Wednesday, April 09, 2008 12:05 PM
  • There is no built-in charting system in .NET. You will have to download a 3rd party

     

    http://www.google.ca/search?hl=en&q=free+.net+chart&meta=

     

    http://www.google.ca/search?hl=en&q=.net+charting&meta=

     

     

    If you want to do it yourself then take a look at GDI+. Since it's urgent, I don't think you want to do it yourself.

    Wednesday, April 09, 2008 1:43 PM
  • Hi,

    You can use the Microsoft Chart Control. You can add it on to your toolbox through the steps:
    right click on toolBox->Choose Items...->COM->Microsoft Chart Control from the list

    You can also find a lot of sample code on the CodeProject, here are some of them:

    Cristi Potlog's Chart Control for .NET
    A flexible charting library for .NET


    Best Regards
    Zhi-xin Ye

     

    Wednesday, April 09, 2008 2:54 PM
  • this will help you http://codereflex.net/charts-graphs-in-c-sharp/
    Thursday, September 22, 2011 10:06 AM
  • thanx i got a solution for chart...
    • Proposed as answer by programminfree Tuesday, August 14, 2012 10:10 PM
    • Unproposed as answer by programminfree Tuesday, August 14, 2012 10:10 PM
    Friday, September 23, 2011 5:26 AM
  • you can use ms chart for this purpose.

    For basic-code help Click here

    kind Regards

    Ravjot


    Sunday, July 01, 2012 8:37 AM
  • If you are using .NET Framework 3.5 or higher you can go for Microsoft Chart Control that comes inbuilt with visual Studio 2010. You can also se this in VS 2008. Check this out for a simple example on how to do this.

    If you are using .NET Framework 2.0 or lesser versions, then you have to go for some third party libraries like ZedGraph etc.

    • Proposed as answer by programminfree Tuesday, August 14, 2012 10:16 PM
    Tuesday, August 14, 2012 10:16 PM