Bunifu Pie chart
Create beautiful pie charts for your dashboards with Bunifu Pie charts.
Last updated
Create beautiful pie charts for your dashboards with Bunifu Pie charts.
Last updated
Bunifu Pie chart is a chart component that generates a circular statistical graphic, in which the data is divided into slices representing the numerical proportion. Each sector corresponds to a proportional portion of the total. Consider the following example that uses Bunifu Pie Chart for data visualization:
This section explains the steps required to start creating a simple pie chart:
Step 1: Drag the canvas
control to the form from the toolbox.
Step 2: Access the canvas label property and add the following values in the collection editor window.
Step 3: From the toolbox, drag and drop the BunifuPieChart
to the form.
Step 4: To begin, go to the pie chart property section and set the label property to, for example, Market Value of Cloud Infrastructure.
Step 5: Access BunifuPieChart's
Data property and populate the double collection editor with the following values:
Step 6: On the target property of the Pie component, select bunifuCanvas1
as the target component where it will be rendered.
Step 7: Set a list of colors in the BackgroundColor/colors property to specify the back color for each sector in the pie chart. For instance, the following is a list of colors assigned to the sectors in the color collection editor.
copy the following set of colors one by one to the color editor:
38, 68, 120
140, 193, 104
112, 173, 71
68, 114, 196
255, 192, 0
67, 104, 43
Step 7: Advance to the canvas properties and set the value of the XAxesGridLines and YAxesGridLines properties to false. Also, set the properties ShowXAxis and ShowYAxis to false.
Step 8: Run the application.
Pie chart legends are often located on either the bottom, right or left side of the pie chart. By setting the LegendPostion property of the canvas to value right, we can place the legends to the right of the pie, rather than above it.
We can code and render a pie chart without using the design view. Here's how to do it:
Let us examine Bunifu Pie charting properties.
This property gets or sets a collection of values that will be visualized on the pie chart. The order in which data values are added to the property corresponds to the order in which the canvas's label values are input.
Here is an example of how to use code to populate the pie chart with data at run-time.
This property gets or sets the canvas on which the pie chart will be displayed.
Take note of the following properties to be modified on the canvas:
a) Set the ShowXAxis and ShowYAxis to false
.
b) Additionally, set the properties XAxesGridLines and YAxesGridLines to false
.
c) Assign the LegendPosition property to a value that is either bottom, left, or right.
This property gets or sets the pie's background color value. We can specify the colors using the Red Green Blue (RGB) color format as well as the Alpha, Red, Green, and Blue (ARGB) color values in the color collection editor. The background color of each sector is set by adding color sets to the color selection editor.
Each color set will correspond with the order of the data provides in the Data
property the sector of the pie chart.
Let's provide each sector with its own background color as shown below via code:
This property gets or sets a color set to a pie chart sector/slice border. The sample form illustrates a pie chart with the border color set to:
Alternatively, we can set each pie sector to have its own border color by adding additional color sets to its color collection editor.
Take note that the order in which the border colors in the color collection editor are set will correspond to the order in which the data in the Data property is defined.
This property gets and sets an integer value that changes the width of the pie sector boundary. The greater the value, the denser the sector borders.
This property sets a back color value to a pie chart sector/slice on which the mouse pointer is suspended.
This property changes the color of the border around a pie sector that the mouse pointer is hovering over.
This property specifies an integer value that alters the boundary width of a targetted pie chart sector over which the mouse pointer is hovering.
Bunifu pie chart is an excellent visual chart design that communicates one important fact with the fewest visual clues possible: that the circle (the "pie") reflects some sort of whole, made up of slices. Add up all the slices and you get the complete pie. Enlarge one part, and other parts will need to shrink.
It's easy to take advantage of people's inept use of pie charts. However, when used the right way, they are very powerful: they are easy to read, familiar, and pleasant to look at. Therefore, absolute care must be taken not to overload the chart with data, but to retain the salient feature of the chart readability through the use of sparse data.