logo

/github|v4.4.3

Class

new NestedPieChart(props)

EXTENDS
  • Chart
PARAMETERS
NameTypeDescription

props

Object

PROPERTIES
NameTypeDescription

el

HTMLElement

The target element to create chart.

options

[ Object ]

Options for making NestedPie Chart.

PROPERTIES
NameTypeDescription

chart

[ Object ]

PROPERTIES
NameTypeDescription

title

[ stringObject ]

Chart title text or options.

animation

[ booleanObject ]

Whether to use animation and duration when rendering the initial chart.

width

[ numberstring ]

Chart width. 'auto' or if not write, the width of the parent container is followed. 'auto' or if not created, the width of the parent container is followed.

height

[ numberstring ]

Chart height. 'auto' or if not write, the width of the parent container is followed. 'auto' or if not created, the height of the parent container is followed.

series

[ Object ]

PROPERTIES
NameTypeDescription

selectable

boolean = false

Whether to make selectable series or not.

dataLabels

[ Object ]

Set the visibility, location, and formatting of dataLabel. For specific information, refer to the DataLabels guide on github.

aliasName

[ Object ]

Chart options are specified based on the alias name. 'radiusRange', 'angleRange', 'clockwise', 'dataLabels' is available. For specific information, refer to the NestedPie Chart guide on github.

legend

[ Object ]

PROPERTIES
NameTypeDescription

align

[ string ]

Legend align. 'top', 'bottom', 'right', 'left' is available.

showCheckbox

[ string ]

Whether to show checkbox.

visible

[ boolean ]

Whether to show legend.

width

[ number ]

Width of legend.

item

[ Object ]

and options of the legend item. For specific information, refer to the Legend guide on github.

exportMenu

[ Object ]

PROPERTIES
NameTypeDescription

visible

[ boolean ]

Whether to show export menu.

filename

[ string ]

File name applied when downloading.

tooltip

[ Object ]

PROPERTIES
NameTypeDescription

offsetX

[ number ]

Offset value to move title horizontally.

offsetY

[ number ]

Offset value to move title vertically.

formatter

[ Function ]

Function to format data value.

template

[ Function ]

Function to create custom template. For specific information, refer to the Tooltip guide on github.

responsive

[ Object ]

Rules for changing chart options. For specific information, refer to the Responsive guide on github.

PROPERTIES
NameTypeDescription

animation

[ booleanObject ]

Animation duration when the chart is modified.

rules

[ Array ]

Rules for the Chart to Respond.

lang

[ Object ]

Options for changing the text displayed on the chart or i18n languages.

PROPERTIES
NameTypeDescription

noData

[ Object ]

No Data Layer Text.

theme

[ Object ]

Chart theme options. For specific information, refer to the NestedPie Chart guide on github.

PROPERTIES
NameTypeDescription

chart

[ Object ]

Chart font theme.

noData

[ Object ]

No Data Layer Text theme.

series

[ Object ]

Series theme.

title

[ Object ]

Title theme.

legend

[ Object ]

Legend theme.

tooltip

[ Object ]

Tooltip theme.

exportMenu

[ Object ]

ExportMenu theme.

data

Object

Data for making NestedPie Chart.

PROPERTIES
NameTypeDescription

categories

[ Array ]

Categories.

series

Array.<Object>

Series data.

PROPERTIES
NameTypeDescription

name

string

Series name.

data

number

Series data.

parentName

[ string ]

Value specifying parent data when using group nested pie chart.

series

categories

Instance Methods

addSeries(data, dataInfo)

Add series.

PARAMETERS
NameTypeDescription

data

Object

Data to be added.

PROPERTIES
NameTypeDescription

name

string

Series name.

data

Array.<Object>

Array of data to be added.

dataInfo

Object

Which name of chart to add.

PROPERTIES
NameTypeDescription

name

string

Chart series name.

EXAMPLES
chart.addSeries(
  {
    name: 'newSeries',
    data: [
      { name: 'A', data: 10 },
      { name: 'B', data: 20 },
    ],
  },
  {
    name: 'series name'
  });

hideSeriesDataLabel()

Hide series data label.

EXAMPLES
chart.hideSeriesDataLabel();

hideTooltip()

Hide tooltip.

EXAMPLES
chart.hideTooltip();

setData(data)

Convert the chart data to new data.

PARAMETERS
NameTypeDescription

data

Object

Data to be set

EXAMPLES
chart.setData({
  categories: ['A', 'B'],
  series: [
    {
      name: 'browsers',
      data: [
        {
          name: 'Chrome',
          data: 50,
        },
        {
          name: 'Safari',
          data: 20,
        },
      ]
    },
    {
      name: 'versions',
      data: [
        {
          name: '1',
          data: 50,
        },
        {
          name: '2',
          data: 20,
        },
      ]
    }
  ]
});

setOptions(options)

Convert the chart options to new options.

PARAMETERS
NameTypeDescription

options

Object

Chart options.

EXAMPLES
chart.setOptions({
  chart: {
    width: 500,
    height: 'auto',
    title: 'Energy Usage',
  },
  series: {
    alias2: {
      radiusRange: [20%, 50%],
    },
  },
  tooltip: {
    formatter: (value) => `${value}kWh`,
  },
});

showSeriesDataLabel()

Show series data label.

EXAMPLES
chart.showSeriesDataLabel();

showTooltip(seriesInfo)

Show tooltip.

PARAMETERS
NameTypeDescription

seriesInfo

Object

Information of the series for the tooltip to be displayed.

PROPERTIES
NameTypeDescription

seriesIndex

number

Index of series.

alias

number

alias name.

EXAMPLES
chart.showTooltip({seriesIndex: 1, alias: 'name'});

updateOptions(options)

Update chart options.

PARAMETERS
NameTypeDescription

options

Object

Chart options.

EXAMPLES
chart.updateOptions({
  chart: {
    height: 'auto',
    title: 'Energy Usage',
  },
  series: {
    alias1: {
      showDot: true,
    },
  },
});
Resizable