# RGraph: HTML5 canvas graph library - Pie chart

The Pie chart can be used when you need to represent value as part of a whole. It is commonly used to represent percentages, relative magnitudes or relative frequencies. If your intent is to compare a particular value (slice) against the whole of the Pie chart, then it can be quite effective. If however you want to compare two seperate segments, then it can get more difficult. If this is the case, you may want to consider a bar chart for example.

The colours can of course be customised, as can the borders (using the same color as the background and a line width of about 5 gives the effect of segment separation. The chart can also have a drop shadow if you want one, but this shouldn't be used in conjunction with segment seperation.

The first pie chart has a fade-in effect. This not part of the RGraph library but is very easy to implement.

- Pie chart API documentation