Help / Developing an application or site / Controls, windows and pages / Controls: Available types / Chart control / Types of charts
  • Overview
  • Characteristics of a Sunburst chart
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
The Sunburst chart is a Pie chart containing several levels of hierarchical data.
This type of chart presents two benefits:
  • On one hand, it allows for an organized display of several data.
  • On the other hand, this type of chart is interactive: clicking a section lets you get details about the sub-level of this section.
Characteristics of a Sunburst chart
In this chart:
1. Chart title.
The characteristics of the chart title can be defined in the "Details" tab of the control description ("Edit chart title").
You can define the chart title, its position and style.
2. Size of the hole
A Sunburst chart can have a hole in the middle. The size of the hole can be defined in the "General" tab of the control description.
3. Chart section
At each level, the values displayed represent a section.
The end user can click a section of the chart to see the details of this section: the clicked section becomes the center of the chart and all its sub-levels are represented around it. And so on, ... A click in the center of the chart moves one level up.
The display of details is automatic: it is managed by the control.
  • You can display the labels of the sections (category labels) perpendicularly: use grParameter with the grSunburstCaptionPerpendicularSection constant.
    WEBDEV - Server codePHP Section labels (category labels) are always displayed perpendicular to the orientation of the section. This option is not configurable.
  • To define the starting angle of the first section, use grSunburstStartAngle.
  • To pull out a section (or all the sections), use grSunburstPullOut.
4. Tooltip
The value of the data hovered by the mouse is displayed in a tooltip.
Other characteristics:
  • A radial color gradient by level is automatically managed by default. You have the ability to define the color of a section with grSunburstSectionColor.
  • To limit the number of levels displayed, use grParameter with the grSunburstMaxLevel constant.
  • The following WLanguage functions are specific to this type of chart:
    grSunburstAddDataAdds a data to a Sunburst chart.
    grSunburstGetDataRetrieves a numeric value from a Sunburst chart.
    grSunburstPullOutPulls out a section (or all the sections) in a Sunburst chart.
    grSunburstRootSectionChanges or specifies the path of the root in a Sunburst chart.
    grSunburstSectionColorChanges the color of a section in a Sunburst chart.
    grSunburstStartAngleSpecifies the starting angle of the first section in a Sunburst chart.
Remark: This type of chart does not accept negative values.
Related Examples:
WD Chart Training (WINDEV): WD Chart
[ + ] This example presents the different uses of the Chart control.
Different types of charts are presented:
- Pie
- Sunburst
- Line
- Scatter
- Column
- Area
- etc.

The main features presented here are the possibility to customize of charts from the code, as well as to fill the chart from an HFSQL data file, or in the editor.
Minimum version required
  • Version 20
This page is also available for…
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help