change Y value of a point in MS Chart

Posted on 2009-12-18
Last Modified: 2012-05-09

I have an area chart on a form.  When the program is running the points in the chart are changed from time to time. I do the following to change Y value of a point, but the chart isn't getting changed.  What have I missed?

myChart.Series["mySeries"].Points[ 1].SetValueY(100]);

Question by:sdc248
    LVL 11

    Accepted Solution

    you probably have to call myChart.Update() (I think that's the method...) in order for your chart control to redraw with the new information otherwise the visual won't change even though you did change your point's value.

    Author Comment

    myChart.Update() didn't work but myChart.Points.ResumeUpdates() did.  I have no idea what was going on but am glad it's working...

    Author Closing Comment

    myChart.Update() didn't do the trick, somehow. But it makes sense and it showed me the right direction to find the solution.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
    More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now