user222427
user222427

Reputation:

C# dynamically growing line graph

Does anybody have a good example of a dynamically growing line graph, what i have is a program tracking users input and this input will grow varying amounts day to day but i need to graph it. Any tips of suggestions would be awesome.

Upvotes: 1

Views: 929

Answers (1)

Joel B
Joel B

Reputation: 13110

NPlot is a free charting library for .NET which should handle what you are looking for (and a whole lot more). It'll handle the resize for you automatically when set up properly. Go here for the download and here are some examples of what it can do. The download itself also comes with a few tutorial projects demonstrating what it can do.

Simply add a reference to the NPlot.dll from your project and then add a PlotSurface2D to your form. Set the AutoScaleAutoGeneratedAxes property of your plot to true

plotSurface.AutoScaleAutoGeneratedAxes = true;

then each time you add a new data point to the plotSurface, the axis will automatically resize for you.

Upvotes: 2

Related Questions