Click here to Skip to main content
15,895,256 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I've used windows form chart to create a chart dynamically but I've this problem; when x value goes to higher values the y label values can't be updated.

I create the chart with this function:

C#
func(){
        _counter++;
            Dispatcher.Invoke(new Action(()=>{
                series.Points.Add(100 * Math.Sin((.0002 * _counter)));
                if (_counter > 1000)
                {
                    series.Points.RemoveAt(0);
                    chart1.Invalidate();
                }
            }));
}

this code is called 10000 times. when I start removing points from the start of the chart the y label value remains on 0 to 20 , but function values for x>1000 are more than 20 so nothing is shown. how can I fix it?
Posted
Updated 8-Feb-14 20:35pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900