Bunifu Polar Chart

Overview

Bunifu polar chart is a circular graph which display a two-dimensional data series in polar coordinates. The x values states the category of data which are automatically created in an angle while the y value defines the distance of the data points from the center of the graph, with the center of the graph usually starting at 0. It is a form of graph that allows a visual comparison between several quantitative or qualitative aspects of a situation.

Getting started

This section explains you the steps required to start creating a simple bar chart and demonstrate the basic usage of the chart control.

Step 1: Drag the canvas control to the form from the toolbox. In the property section set both XAxesGridLines and YAxesGridlines properties to have a false value

Step 2: From the toolbox drag and drop the Bunifu Polar component to the form

Step 3: Add data to the Polar component as demonstrated in quick tips

Step 4: On the target property of the Polar component select bunifuCanvas1 as the target component

Step 5: Run the application

Code

C#
VB
C#
void renderPolarChart()
{
Bunifu.Charts.WinForms.ChartTypes.BunifuPolarAreaChart bunifuPolarChart = new Bunifu.Charts.WinForms.ChartTypes.BunifuPolarAreaChart();
/*
* For this example we will use random numbers
*/
var r = new Random();
/*
* Add your data from your source - accepts double list
* Below is an example from a random number
*/
List<double> data = new List<double>();
for (int i = 0; i < 5; i++)
{
data.Add(r.NextDouble());
}
/*
* Set your data
*/
bunifuPolarChart.Data = data;
/*
* Specify the target canvas
*/
bunifuPolarChart.TargetCanvas = bunifuChartCanvas1;
/*
* Hide grid lines
*/
bunifuChartCanvas1.XAxesGridLines = false;
bunifuChartCanvas1.YAxesGridLines = false;
/*
* Add labels to your canvas
* Label count should correspond to data count for charts like Bar charts
*/
bunifuChartCanvas1.Labels = new string[] { "Label1", "Label2", "Label3", "Label4", "Label5" };
/*
* Beautify the chart by sepcifying the colors
* Color count should correspond to data count
*/
List<Color> bgColors = new List<Color>();
for (int i = 0; i < data.Count; i++)
{
bgColors.Add(Color.FromArgb(r.Next(256), r.Next(256), r.Next(256)));
}
bunifuPolarChart.BackgroundColor = bgColors;
}
VB
Private Sub renderPolarChart()
Dim bunifuPolarChart As Bunifu.Charts.WinForms.ChartTypes.BunifuPolarAreaChart = New Bunifu.Charts.WinForms.ChartTypes.BunifuPolarAreaChart()
'
' For this example we will use random numbers
'
Dim r = New Random()
'
' Add your data from your source - accepts double list
' Below is an example from a random number
'
Dim data As List(Of Double) = New List(Of Double)()
For i As Integer = 0 To 5 - 1
data.Add(r.NextDouble())
Next
'
' Set your data
'
bunifuPolarChart.Data = data
'
' Specify the target canvas
'
bunifuPolarChart.TargetCanvas = bunifuChartCanvas1
'
' Hide grid lines
'
bunifuChartCanvas1.XAxesGridLines = False
bunifuChartCanvas1.YAxesGridLines = False
'
' Add labels to your canvas
' Label count should correspond to data count for charts like Bar charts
'
bunifuChartCanvas1.Labels = New String() {"Label1", "Label2", "Label3", "Label4", "Label5"}
'
' Beautify the chart by sepcifying the colors
' Color count should correspond to data count
'
Dim bgColors As List(Of Color) = New List(Of Color)()
For i As Integer = 0 To data.Count - 1
bgColors.Add(Color.FromArgb(r.[Next](256), r.[Next](256), r.[Next](256)))
Next
bunifuPolarChart.BackgroundColor = bgColors
End Sub

Polar Stylings & Customization

BackgroundColor

Gets and sets a color value property to the polar segment background

BorderColor

Gets and sets a color value property to the polar segment borders

BorderWidth

Gets and sets an integer value that can modify the width of the polar segment border.

BorderAlign

Polar Interactivity

HoverBackgroundColor

Gets and sets a color value property to apply on the polar background in the event of a mouse hover on a polar segment.

HoverBorderColor

Gets and sets a color value property to apply on the bar’s border in the event of a mouse hover on a polar segment.

HoverBorderWidth

Gets and sets an integer value that can modify the width of the bar’s border when the mouse hovers on a polar segment.

Working with Data

Working with Data

TargetCanvas

Gets and sets the canvas that will render Bunifu polar chart

Data

Gets and sets an array of numbers as the datasets for Bunifu polar chart

Label

Gets and sets the text to draw on the chart’s legend