AnyChart
API Reference
Still have questions?
Contact support
Top
You are looking at an outdated v7 version of this document. Switch to the v8 version to see the up to date information.

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:

NameTypeDescription
var_argsanychart.data.View | anychart.data.Set | ArrayChart series data.

Returns:

Array.<anychart.core.mekko.series.Mekko> - Array of created series.

annotations

Getter for the annotations.

Returns:

anychart.core.annotations.PlotController - The plot annotations.
Setter for the annotations.

Params:

NameTypeDescription
annotationsListArrayAnnotations list to set.

Returns:

anychart.charts.Mekko - Self instance for method chaining

crosshair

Getter for crosshair settings.

Returns:

anychart.core.ui.Crosshair - Crosshair settings.
Setter for crosshair settings.

Params:

NameTypeDefaultDescription
valueObject | 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.

Returns:

anychart.math.Rect - Data bounds of the chart.

getSeries

Gets series by its id.

Params:

NameTypeDescription
idnumber | stringId of the series.

Returns:

anychart.core.mekko.series.Mekko - An instance of the created series.

getSeriesAt

Getter for the series by its index.

Params:

NameTypeDescription
indexnumberIndex of the series.

Returns:

anychart.core.mekko.series.Mekko - An instance of the created series.

getSeriesCount

Returns the number of series in a chart.

Returns:

number - Number of series.

getType

Returns chart type.

Returns:

string - Chart type.

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:

NameTypeDescription
valueArray.<anychart.graphics.vector.HatchFill.HatchFillType> | Object | anychart.palettes.HatchFillsChart hatch fill palette settings to set.

Returns:

anychart.charts.Mekko - Self instance for method chaining.

mekko

Adds Mekko series.

Params:

NameTypeDescription
dataanychart.data.View | anychart.data.Set | ArrayData for the series.
csvSettingsObject.<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.

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:

NameTypeDescription
valueanychart.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:

NameTypeDefaultDescription
valuenumber
0
Value to set.

Returns:

anychart.charts.Mekko - Self instance for method chaining.

removeAllSeries

Removes all series from chart.

Returns:

anychart.charts.Mekko - Self instance for method chaining.

removeSeries

Removes one of series from chart by its id.

Params:

NameTypeDescription
idnumber | stringSeries id.

Returns:

anychart.charts.Mekko - Self instance for method chaining.

removeSeriesAt

Removes one of series from chart by its index.

Params:

NameTypeDescription
indexnumberSeries index.

Returns:

anychart.charts.Mekko - Self instance for method chaining.

xAxis

Getter for chart X-axis.

Params:

NameTypeDefaultDescription
indexnumber
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.
Setter for chart X-axis.

Params:

NameTypeDefaultDescription
valueObject | boolean | null
true
Chart axis settings to set.

Returns:

anychart.charts.Mekko - Self instance for method chaining.
Setter for chart X-axis by index.

Params:

NameTypeDefaultDescription
indexnumber
0
Chart axis index.
valueObject | 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.
Setter for default chart X scale.

Params:

NameTypeDefaultDescription
valueanychart.enums.ScaleTypes | anychart.scales.Ordinal
"ordinal"
X Scale to set.

Returns:

anychart.charts.Mekko - Self instance for method chaining.

yAxis

Getter for chart Y-axis.

Params:

NameTypeDefaultDescription
indexnumber
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.
Setter for chart Y-axis.

Params:

NameTypeDefaultDescription
valueObject | boolean | null
true
Chart axis settings to set.

Returns:

anychart.charts.Mekko - Self instance for method chaining.
Setter for chart Y-axis by index.

Params:

NameTypeDefaultDescription
indexnumber
0
Chart axis index.
valueObject | boolean | null
Chart axis settings to set.

Returns:

anychart.charts.Mekko - Self instance for method chaining.

yScale

Getter for default chart Y scale.

Returns:

anychart.scales.Base - Default chart scale value.
Setter for default chart Y scale.

Params:

NameTypeDefaultDescription
valueanychart.enums.ScaleTypes | anychart.scales.Base
"linear"
Y Scale to set.

Returns:

anychart.charts.Mekko - Self instance for method chaining.