Simply use doughnut chart to show comparison. A doughnut chart is derived from a pie chart the difference is doughnut chart has no middle area. Doughnut chart is great at showing part to a whole 

Best usage: Use doughnut chart when you have fewer items to display so it does not squeeze making items invisible. 

How to display doughnut chart using Bunifu Dataviz

Simply locate Bunifu Dataviz control in your toolbox and drag it to the location on your form where you would like to display it. 

We will use button click event handler to display our chart called render_doughnut

C# code

private void render_doughnut_Click(object sender, EventArgs e)


   var r = new Random();

   var canvas = new Bunifu.DataViz.Canvas();

   var datapoint = new Bunifu.DataViz.DataPoint(Bunifu.DataViz.BunifuDataViz._type.Bunifu_doughnut);

   datapoint.addLabely("SUN", r.Next(0, 100).ToString());

   datapoint.addLabely("MON", r.Next(0, 100).ToString());

   datapoint.addLabely("TUE", r.Next(0, 100).ToString());

   datapoint.addLabely("WED", r.Next(0, 100).ToString());

   datapoint.addLabely("THU", r.Next(0, 100).ToString());

   datapoint.addLabely("FRI", r.Next(0, 100).ToString());

   datapoint.addLabely("SAT", r.Next(0, 100).ToString());

   // Add data sets to canvas


   //render canvas



VB.NET code

Private Sub render()
    Dim canvas As Bunifu.DataViz.WinForms.Canvas = New Bunifu.DataViz.WinForms.Canvas()
    Dim datapoint1 As Bunifu.DataViz.WinForms.DataPoint
    datapoint1 = New Bunifu.DataViz.WinForms.DataPoint(Bunifu.DataViz.WinForms.BunifuDataViz._type.Bunifu_doughnut)
    Dim random As Random = New Random()
    datapoint1.addLabely("MON", random.[Next](0, 50).ToString())
    datapoint1.addLabely("TUE", random.[Next](0, 50).ToString())
    datapoint1.addLabely("WED", random.[Next](0, 50).ToString())
    datapoint1.addLabely("THU", random.[Next](0, 50).ToString())
    datapoint1.addLabely("FRI", random.[Next](0, 50).ToString())
    datapoint1.addLabely("SAT", random.[Next](0, 50).ToString())
    datapoint1.addLabely("SUN", random.[Next](0, 50).ToString())
End Sub

void render()
 Bunifu.DataViz.WinForms.Canvas canvas = new Bunifu.DataViz.WinForms.Canvas();
            Bunifu.DataViz.WinForms.DataPoint datapoint1;


            datapoint1 = new Bunifu.DataViz.WinForms.DataPoint(Bunifu.DataViz.WinForms.BunifuDataViz._type.Bunifu_doughnut);

            Random random = new Random();

            datapoint1.addLabely("MON", random.Next(0, 50).ToString());
            datapoint1.addLabely("TUE", random.Next(0, 50).ToString());
            datapoint1.addLabely("WED", random.Next(0, 50).ToString());
            datapoint1.addLabely("THU", random.Next(0, 50).ToString());
            datapoint1.addLabely("FRI", random.Next(0, 50).ToString());
            datapoint1.addLabely("SAT", random.Next(0, 50).ToString());
            datapoint1.addLabely("SUN", random.Next(0, 50).ToString());




In order to display Bunifu Doughnut chart we need the following controls:

  • Bunifu Data Viz - This is the container for our chart
  • Bunifu Canvas - This is the middle layer between the data viz (container) and the dataset
  • Bunifu Data Point - This will contain the data that we want to represent as pairs of X and Y coordinates

On running the code you should see something like this:

That's it!

We hope Bunifu Dataviz will help you bring out the best data visualization for your data in your application. 

Should you have feedback or suggestions please send us via chat on the bottom right corner of the screen. 

Did this answer your question?