Categories &

Functions List

Class Definition: PolarAreaChart

chartjs: PolarAreaChart

Polar area chart drawn by the Chart.js library.

Each dataset of a PolarAreaChart is a PolarAreaData object in its datasets property.

To view the PolarAreaChart object in your web browser, use its webserve () method. Alternatively, you can generate and/or save to a file the corresponding HTML code with the htmlstring () and htmlsave () methods and serve it online through a web server of your choice.

Each property is documented on its own, as in help PolarAreaChart.labels.

See also: PolarAreaData, Color, Fill, Html

Source Code: PolarAreaChart

The PolarAreaChart class contains the following properties:

A character vector defining the name of the Chart in the generated html code.

A cell array containing one or more PolarAreaData objects corresponding to the data input.

A numeric vector or a cellstring array with the data labels defined in labels.

A cell array containing one or more Option and Plugin objects. Not used at the moment.

The PolarAreaChart class offers the following public methods:

PolarAreaChart: obj = PolarAreaChart (data, labels)

PolarAreaChart: obj = PolarAreaChart (…, Name, Value)

obj = PolarAreaChart (data, labels) returns a PolarAreaChart object, in which data contains the radius of each segment and labels contain the labels of each segment. Each segment in a polar area chart has the same angle.

  • data must be a nonempty NxP numeric matrix, where each column corresponds to a separate dataset and each row corresponds to an element in labels. If data is a row vector and its length matches the number of elements in labels, then it is transposed to a column vector.
  • labels must be a nonempty numerical vector or cellstring array, where each element corresponds to a row in data. If labels is a character vector, then it is converted to a cellstring scalar.

obj = PolarAreaChart (…, Name, Value) returns a PolarAreaChart object with the properties of each dataset specified by one or more Name, Value pair arguments. Name can be any property name of a PolarAreaData object and Value must correspond to the data type(s) and values accepted by that property. Type help PolarAreaData for more details on the available properties.

Specifically for the properties that accept a Color object as their input value, besides the Color object you may also parse to the PolarAreaChart constructor the same values accepted by the constructor of the Color object. However, if you choose to manually modify the PolarAreaChart’s properties using the dot notation syntax, then you must assign a Color object to the chosen property. Type help Color for more details on the available syntax.

For properties that accept scalar values, you can pass a vector of the same type with each element corresponding to a different dataset. For properties that accept vectors, you can pass a matrix of the same type with each row corresponding to a different dataset. Otherwise, the same property value will be assigned to all datasets available in data. For properties accepting a character vector, you need to pass a cellstring array for multiple datasets, whereas for properties that can take mixed types of scalar values (i.e. either boolean and character vectors), you need to pass a cell array with each element corresponding to a different dataset.