hai dani.

can u pls help me how to create piechart in c.

thanks in advance

Many ways.
Review your trignometry, Sine, Cosine to be exact.
There are ways to do it without trig, but trig is the simplest!

You can also do it with two bitmaps. One contains an image.
The second contains an alpha gradient. Ranging from 0% and the other 100%. The alpha percentile indicates how wide to cut the notch in the pie! Essentially the two pie pieces are alpha blit into each other and the background.

On Windows, simply use the Chart control.

commented: this sort of bullshit answer belongs in a Visual Studio .NET forum -3
commented: I know how easy it is to just say: "blabla, simply use bla.", What if he isn't on Windows, or what if he even doesn't know the Windows API? -4

In standard C? Use characters to draw the pie chart (such as asterisk or pound sign). You can hard code the circle, or use one of the circle algorithms such as this. To draw lines in the circle, use one of the line algorithms such as this.

This sounds like a fun project! ;)
Best of luck.

commented: interesting links +14

a pie char you must use graphics function or maybe like draw one by * but that will get somewhat confusing because u have to make it according to your % stuff

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.