Skip to content

Pie chart

Aleksey edited this page May 27, 2022 · 2 revisions

Original mermaid js pie chart documentation

A pie chart (or a circle chart) is a circular statistical graphic, which is divided into slices to illustrate numerical proportion. In a pie chart, the arc length of each slice (and consequently its central angle and area), is proportional to the quantity it represents. While it is named for its resemblance to a pie which has been sliced, there are variations on the way it can be presented. The earliest known pie chart is generally credited to William Playfair's Statistical Breviary of 1801 -Wikipedia

To create a pie chart use Create method of PieChart class

var pie = PieChart.Create("Goods", showData: true);

Adding values

To add value simply call Add method

pie.Add("Some",  44);   // int
pie.Add("Someq", 44.0); // double
pie.Add("Somes", 44m);  // decimal
pie.Add("Somse", 44f);  // float

Generating syntax

string markdownSyntax = pie.Render();
Clone this wiki locally