class anychart.charts.Mekko Improve this Doc
Extends: anychart.core.SeparateChart
Mekko chart class.
To get the chart use any of these methods:
Methods Overview
Specific settings | |
annotations() | Creates annotations. |
getType() | Definition of the chart type. |
Axes and Scales | |
getXAxesCount() | Returns the number of X-axes. |
getYAxesCount() | Returns the number of Y-axes. |
xAxis() | X-axis settings. |
xScale() | X-scale settings. |
yAxis() | Y-axis settings. |
yScale() | Y-scale settings. |
Chart Coloring | |
hatchFillPalette() | Hatch fill palette settings. |
palette() | Palette settings. |
Interactivity | |
crosshair() | Crosshair settings |
Series | |
getSeries() | Gets series by index. |
mekko() | Adds Mekko series. |
Size and Position | |
getPlotBounds() | Returns data bounds of the chart. |
Specific Series Settings | |
addSeries() | Adds series to the chart. |
getSeriesAt() | Returns series by index. |
getSeriesCount() | Returns the number of series in a chart. |
pointsPadding() | Settings for the space between space. |
removeAllSeries() | Removes all series from chart. |
removeSeries() | Removes one of series from chart by its id. |
removeSeriesAt() | Removes one of series from chart by its index. |
Methods Description
addSeries
Adds series to the chart.
Params:
Name | Type | Description |
---|---|---|
var_args | anychart.data.View | anychart.data.Set | Array | Chart series data. |
Returns:
Array.<anychart.core.mekko.series.Mekko> - Array of created series.Try it:
annotations
Getter for the annotations.
Returns:
anychart.core.annotations.PlotController - The plot annotations.Try it:
Setter for the annotations.
Params:
Name | Type | Description |
---|---|---|
annotationsList | Array | Annotations list to set. |
Returns:
anychart.charts.Mekko - Self instance for method chainingTry it:
crosshair
Setter for crosshair settings.
Detailed description
Sets chart crosshair settings depending on parameter type:
- null/boolean - disable or enable chart crosshair.
- object - sets chart crosshair settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
value | Object | boolean | null | false | Crosshair settings. |
Returns:
anychart.charts.Mekko - Self instance for method chaining.getPlotBounds
Gets data bounds of the chart.
Note: Works only after anychart.charts.Mekko#draw is called.
Note: Works only after anychart.charts.Mekko#draw is called.
Returns:
anychart.math.Rect - Data bounds of the chart.Try it:
getSeries
Gets series by its id.
Params:
Name | Type | Description |
---|---|---|
id | number | string | Id of the series. |
Returns:
anychart.core.mekko.series.Mekko - An instance of the created series.Try it:
getSeriesAt
Getter for the series by its index.
Params:
Name | Type | Description |
---|---|---|
index | number | Index of the series. |
Returns:
anychart.core.mekko.series.Mekko - An instance of the created series.Try it:
getSeriesCount
getType
getXAxesCount
Returns the number of X-axes.
Returns:
number - Number of X-axes.getYAxesCount
Returns the number of Y-axes.
Returns:
number - Number of Y-axes.hatchFillPalette
Getter for hatch fill palette settings.
Returns:
anychart.palettes.HatchFills - Chart hatch fill palette. See listing
var hatchFillPalette = chart.hatchFillPalette();
Setter for hatch fill palette settings.
Params:
Name | Type | Description |
---|---|---|
value | Array.<anychart.graphics.vector.HatchFill.HatchFillType> | Object | anychart.palettes.HatchFills | Chart hatch fill palette settings to set. |
Returns:
anychart.charts.Mekko - Self instance for method chaining.Try it:
mekko
Adds Mekko series.
Params:
Name | Type | Description |
---|---|---|
data | anychart.data.View | anychart.data.Set | Array | Data for the series. |
csvSettings | Object.<string, (string|boolean)> | If CSV string is passed, you can pass CSV parser settings here as a hash map. |
Returns:
anychart.core.mekko.series.Mekko - An instance of the created series.Try it:
palette
Getter for the series colors palette.
See listing
var palette = chart.palette();
Setter for the series colors palette.
Note: You can use predefined palettes from anychart.palettes.
Params:
Name | Type | Description |
---|---|---|
value | anychart.palettes.RangeColors | anychart.palettes.DistinctColors | Object | Array.<string> | Value to set. |
Returns:
anychart.charts.Mekko - Self instance for method chaining.pointsPadding
Getter for points padding.
Returns:
number - Points padding See listing
var pointsPadding = chart.pointsPadding();
Setter for points padding.
Params:
Name | Type | Default | Description |
---|---|---|---|
value | number | 0 | Value to set. |
Returns:
anychart.charts.Mekko - Self instance for method chaining.Try it:
removeAllSeries
Removes all series from chart.
Returns:
anychart.charts.Mekko - Self instance for method chaining.Try it:
removeSeries
Removes one of series from chart by its id.
Params:
Name | Type | Description |
---|---|---|
id | number | string | Series id. |
Returns:
anychart.charts.Mekko - Self instance for method chaining.Try it:
removeSeriesAt
Removes one of series from chart by its index.
Params:
Name | Type | Description |
---|---|---|
index | number | Series index. |
Returns:
anychart.charts.Mekko - Self instance for method chaining.Try it:
xAxis
Getter for chart X-axis.
Params:
Name | Type | Default | Description |
---|---|---|---|
index | number | 0 | Chart axis index. If not set - creates a new instance and adds it to the end of array. |
Returns:
anychart.core.axes.Linear - Axis instance by index.Try it:
Setter for chart X-axis.
Detailed description
You can use multiple axes for a chart.
Sets chart X-axis settings depending on parameter type:
- null/boolean - disable or enable chart X-axis.
- object - sets chart X-axis settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
value | Object | boolean | null | true | Chart axis settings to set. |
Returns:
anychart.charts.Mekko - Self instance for method chaining.Setter for chart X-axis by index.
Detailed description
Sets chart X-axis settings depending on parameter type:
- null/boolean - disable or enable chart X-axis by index.
- object - sets chart X-axis settings by index.
Params:
Name | Type | Default | Description |
---|---|---|---|
index | number | 0 | Chart axis index. |
value | Object | boolean | null | Chart axis settings to set. |
Returns:
anychart.charts.Mekko - Self instance for method chaining.xScale
Getter for default chart X scale.
Returns:
anychart.scales.Ordinal - Default chart scale value.Try it:
Setter for default chart X scale.
Detailed description
Note: This scale will be passed to all scale dependent chart elements if they don't have their own scales.
Params:
Name | Type | Default | Description |
---|---|---|---|
value | anychart.enums.ScaleTypes | anychart.scales.Ordinal | "ordinal" | X Scale to set. |
Returns:
anychart.charts.Mekko - Self instance for method chaining.Try it:
yAxis
Getter for chart Y-axis.
Params:
Name | Type | Default | Description |
---|---|---|---|
index | number | 0 | Chart axis index. If not set - creates a new instance and adds it to the end of array. |
Returns:
anychart.core.axes.Linear - Axis instance by index.Try it:
Setter for chart Y-axis.
Detailed description
You can use multiple axes for a chart.
Sets chart Y-axis settings depending on parameter type:
- null/boolean - disable or enable chart Y-axis.
- object - sets chart Y-axis settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
value | Object | boolean | null | true | Chart axis settings to set. |
Returns:
anychart.charts.Mekko - Self instance for method chaining.Setter for chart Y-axis by index.
Detailed description
Sets chart Y-axis settings depending on parameter type:
- null/boolean - disable or enable chart Y-axis by index.
- object - sets chart Y-axis settings by index.
Params:
Name | Type | Default | Description |
---|---|---|---|
index | number | 0 | Chart axis index. |
value | Object | boolean | null | Chart axis settings to set. |
Returns:
anychart.charts.Mekko - Self instance for method chaining.yScale
Setter for default chart Y scale.
Detailed description
Note: This scale will be passed to all scale dependent chart elements if they don't have their own scales.
Params:
Name | Type | Default | Description |
---|---|---|---|
value | anychart.enums.ScaleTypes | anychart.scales.Base | "linear" | Y Scale to set. |
Returns:
anychart.charts.Mekko - Self instance for method chaining.Try it: