Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Winforms / GDI+ Draw curve for a chart

In my Winforms application I have a small chart. Nothing fancy just a bunch of x/y points I connect with lines.

It would be nice to draw a curve instead of a lines to connect these points. But since mathematics was never my strong side I have no idea how to do that.

Any kind of sample or advice would be helpful.

like image 586
TalkingCode Avatar asked Oct 26 '22 05:10

TalkingCode


1 Answers

This is very simple - no need for any math - just use Graphics.DrawCurve instead of DrawPolygon/DrawLine (see the very good help on this function).

like image 117
Random Dev Avatar answered Nov 02 '22 14:11

Random Dev