Top

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.
Data
noData()NoData settings.
Export
exports()Exports 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 chaining

Try it:

crosshair

Getter for crosshair settings.

Returns:

anychart.core.ui.Crosshair - Crosshair settings.

Try it:

Setter for crosshair settings.

Params:

Name Type Default Description
value Object | boolean | null
false
Crosshair settings.

Returns:

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

exports

Getter for the export charts.

Returns:

anychart.core.utils.Exports - Exports settings.
See listing
var exports = chart.exports();
Setter for the export charts.

Params:

Name Type Description
value Object Export settings.

Returns:

anychart.core.Chart - Self instance for method chaining.

Try it:

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.

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

Returns the number of series in a chart.

Returns:

number - Number of series.

Try it:

getType

Returns chart type.

Returns:

string - Chart type.

Try it:

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:

noData

Getter for noData settings.

Returns:

anychart.core.NoDataSettings - NoData settings.

Try it:

Setter for noData settings.
Learn more about "No data" feature

Params:

Name Type Description
value Object NoData settings.

Returns:

anychart.core.Chart - Self instance for method chaining.

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.

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.

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.

Params:

Name Type Default Description
value Object | string | 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.

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.

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

Getter for default chart Y scale.

Returns:

anychart.scales.Base - Default chart scale value.

Try it:

Setter for default chart Y scale.

Params:

Name Type Default Description
value Object | string | anychart.enums.ScaleTypes | anychart.scales.Base
"linear"
Y Scale to set.

Returns:

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

Try it: