Top
You are looking at an outdated 7.5.0 version of this document. Switch to the 8.0.1 version to see the up to date information.

class anychart.charts.Funnel Improve this Doc

Extends: anychart.core.SeparateChart

Funnel Chart Class.
Note: Use method anychart.funnel to get an instance of this class:

Methods Overview

Miscellaneous
baseWidth()Getter for the width of the funnel in pixels or in percentage.
connectorLength()Getter for outside labels connector length.
connectorStroke()Getter for outside labels connectors stroke settings.
data()Gets current chart data.
fill()Getter for the funnel points fill in normal state.
getType()Returns chart type.
hatchFill()Getter for current hatch fill settings.
hatchFillPalette()Getter for chart hatch fill palette settings.
hover()Sets the hover state on a slice by index.
hoverFill()Getter for the funnel points fill in the hover state.
hoverHatchFill()Getter for current hover hatch fill settings.
hoverLabels()Getter for the funnel hover data labels.
hoverMarkers()Getter for funnel points data markers on hover.
hoverStroke()Getter for the funnel points stroke in the hover state.
labels()Getter for the current funnel labels.
markerPalette()Getter for chart markers palette settings.
markers()Getter for data markers.
neckHeight()Getter for the height of the neck.
neckWidth()Getter for the width of the neck.
overlapMode()Getter for overlap mode for labels.
palette()Getter for the current funnel palette.
pointsPadding()Getter for the padding between points.
stroke()Getter for the funnel points stroke in the normal state.
tooltip()Getter for tooltip settings.
unhover()Removes hover from all chart points.

Methods Description

baseWidth

Getter for the width of the funnel in pixels or in percentage.

Returns:

string number - Current width of the funnel.

Try it:

Setter for the width of the funnel in pixels or in percentage.

Params:

Name Type Default Description
value string | number
'90%'
Value to set

Returns:

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

Try it:

connectorLength

Getter for outside labels connector length.

Returns:

number string null - Outside labels connector length.

Try it:

Setter for outside labels connector length.

Params:

Name Type Default Description
value number | string
20
Value to set.

Returns:

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

Try it:

connectorStroke

Getter for outside labels connectors stroke settings.

Returns:

anychart.graphics.vector.Stroke function - Current stroke settings.
Setter for outside labels connectors stroke settings. Learn more about stroke settings.

Params:

Name Type Default Description
value anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | function | null
'black'
Stroke settings.
thickness number
1
Line thickness.
dashpattern string
Controls the pattern of dashes and gaps used to stroke paths.
lineJoin anychart.graphics.vector.StrokeLineJoin
Line join style.
lineCap anychart.graphics.vector.StrokeLineCap
Line cap style.

Returns:

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

Try it:

data

Gets current chart data.

Returns:

anychart.data.View - Current data view.

Try it:

Sets data for the current chart.

Params:

Name Type Description
value anychart.data.View | anychart.data.Mapping | anychart.data.Set | Array | string Value to set.
csvSettings Object.<string, (string|boolean)> If CSV string is passed by first param, you can pass CSV parser settings here as a hash map.

Returns:

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

fill

Getter for the funnel points fill in normal state.

Returns:

anychart.graphics.vector.Fill function - Current fill in the normal state.
Setter for the funnel points fill in the normal state. Learn more about coloring.

Params:

Name Type Default Description
value anychart.graphics.vector.Fill | function
// return the fill from the default pallete.
function() {
  return this.sourceColor;
};
or Fill, or fill-function, which should look like this:function() { // this: { // index : number - the index of the current point // sourceColor : anychart.graphics.vector.Fill - fill of the current point // } return myFill; //anychart.graphics.vector.Fill };.

Returns:

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

Try it:

getType

Returns chart type.

Returns:

anychart.enums.ChartTypes - Current chart type.

Try it:

hatchFill

Getter for current hatch fill settings.
Setter for hatch fill settings.

Params:

Name Type Default Description
patternFillOrType anychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function | anychart.graphics.vector.HatchFill.HatchFillType | string | boolean
false
PatternFill or HatchFill instance or type of hatch fill.
color string
Color.
thickness number
Thickness.
size number
Pattern size.

Returns:

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

Try it:

hatchFillPalette

Getter for chart hatch fill palette settings.

Returns:

anychart.palettes.HatchFills - Current chart hatch fill palette.
Setter for chart 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.Funnel - Self instance for method chaining.

Try it:

hover

Sets the hover state on a slice by index.

Params:

Name Type Description
index number Slice index.

Returns:

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

Try it:

hoverFill

Getter for the funnel points fill in the hover state.

Returns:

anychart.graphics.vector.Fill function - Current fill in the hover state.
Setter for the funnel points fill in the hover state. Learn more about coloring.

Params:

Name Type Default Description
value anychart.graphics.vector.Fill | function
// return lighter fill of the default pallete.
function() {
  return anychart.color.lighten(this.sourceColor);
};
or Fill, or fill-function, which should look like:function() { // this: { // index : number - the index of the current point // sourceColor : anychart.graphics.vector.Fill - fill of the current point // } return myFill; //anychart.graphics.vector.Fill };.

Returns:

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

Try it:

hoverHatchFill

Getter for current hover hatch fill settings.

Returns:

anychart.graphics.vector.PatternFill anychart.graphics.vector.HatchFill function - Current hover hatch fill.
Setter for hover hatch fill settings.

Params:

Name Type Default Description
patternFillOrType anychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill | function | anychart.graphics.vector.HatchFill.HatchFillType | string | boolean
false
PatternFill or HatchFill instance or type of hatch fill.
color string
Color.
thickness number
Thickness.
size number
Pattern size.

Returns:

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

Try it:

hoverLabels

Getter for the funnel hover data labels.

Returns:

anychart.core.ui.LabelsFactory - Current labels instance.

Try it:

Setter for the funnel hover data labels.

Params:

Name Type Description
value Object | boolean | null Funnel hover data labels settings.

Returns:

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

hoverMarkers

Getter for funnel points data markers on hover.

Returns:

anychart.core.ui.MarkersFactory - Markers instance.

Try it:

Setter for funnel points data markers on hover.

Params:

Name Type Description
value Object | boolean | null | string Series data markers settings.

Returns:

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

hoverStroke

Getter for the funnel points stroke in the hover state.

Returns:

anychart.graphics.vector.Stroke function - Current stroke in the hover state.
Setter for the funnel points stroke in the hover state. Learn more about stroke settings.

Params:

Name Type Default Description
value anychart.graphics.vector.Stroke | function
// return stroke from the default pallete.
function() {
  return anychart.color.darken(this.sourceColor);
};
or Stroke, or stroke-function, which should look like:function() { // this: { // index : number - the index of the current point // sourceColor : anychart.graphics.vector.Stroke - stroke of the current point // } return myStroke; //anychart.graphics.vector.Stroke };.

Returns:

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

Try it:

Setter for the funnel points stroke in the hover state. Learn more about stroke settings.

Params:

Name Type Default Description
value anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | function | null
Stroke settings.
thickness number
1
Line thickness.
dashpattern string
Controls the pattern of dashes and gaps used to stroke paths.
lineJoin anychart.graphics.vector.StrokeLineJoin
Line join style.
lineCap anychart.graphics.vector.StrokeLineCap
Line cap style.

Returns:

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

Try it:

labels

Getter for the current funnel labels.

Returns:

anychart.core.ui.LabelsFactory - LabelsFactory instance.

Try it:

Setter for the funnel labels.

Params:

Name Type Default Description
value Object | boolean | null
true
Chart data labels settings.

Returns:

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

markerPalette

Getter for chart markers palette settings.

Returns:

anychart.palettes.Markers - Current chart markers palette.
Setter for chart markers palette settings.

Params:

Name Type Description
value anychart.palettes.Markers | Object | Array.<anychart.enums.MarkerType> Chart marker palette settings to set.

Returns:

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

Try it:

markers

Getter for data markers.

Returns:

anychart.core.ui.MarkersFactory - Markers instance.

Try it:

Setter for data markers.

Params:

Name Type Default Description
value Object | boolean | null | string
false
Data markers settings.

Returns:

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

neckHeight

Getter for the height of the neck.

Returns:

string number - Current height of the neck.

Try it:

Setter for the height of the neck.

Params:

Name Type Default Description
value string | number
'25%'
Value to set.

Returns:

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

Try it:

neckWidth

Getter for the width of the neck.

Returns:

string number - Current height of the neck.

Try it:

Setter for the width of the neck.

Params:

Name Type Default Description
value string | number
'30%'
Value to set.

Returns:

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

Try it:

overlapMode

Getter for overlap mode for labels.

Returns:

anychart.enums.LabelsOverlapMode - Overlap mode flag.

Try it:

Setter for overlap mode for labels.

Params:

Name Type Default Description
value anychart.enums.LabelsOverlapMode | string | boolean
'noOverlap'
Value to set.

Returns:

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

palette

Getter for the current funnel palette.
Setter for a funnel palette.

Params:

Name Type Description
value anychart.palettes.RangeColors | anychart.palettes.DistinctColors | Object | Array.<string> Color palette instance.

Returns:

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

pointsPadding

Getter for the padding between points.

Returns:

string number - Current padding.
Setter for the padding between points.

Params:

Name Type Default Description
value string | number
5
Value to set.

Returns:

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

Try it:

stroke

Getter for the funnel points stroke in the normal state.

Returns:

anychart.graphics.vector.Stroke function - Current stroke in the normal state.
Setter for the funnel points stroke in the normal state. Learn more about stroke settings.

Params:

Name Type Default Description
value anychart.graphics.vector.Stroke | function
// return stroke from the default pallete.
function() {
  return anychart.color.darken(this.sourceColor);
};
or Stroke, or stroke-function, which should look like:function() { // this: { // index : number - the index of the current point // sourceColor : anychart.graphics.vector.Stroke - stroke of the current point // } return myStroke; //anychart.graphics.vector.Stroke };.

Returns:

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

Try it:

Setter for the funnel points stroke in the normal state. Learn more about stroke settings.

Params:

Name Type Default Description
value anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | function | null
Stroke settings.
thickness number
1
Line thickness.
dashpattern string
Controls the pattern of dashes and gaps used to stroke paths.
lineJoin anychart.graphics.vector.StrokeLineJoin
Line join style.
lineCap anychart.graphics.vector.StrokeLineCap
Line cap style.

Returns:

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

Try it:

tooltip

Getter for tooltip settings.

Returns:

anychart.core.ui.Tooltip - Tooltip instance.

Try it:

Setter for tooltip settings.

Params:

Name Type Default Description
value Object | boolean | null
true
Tooltip settings.

Returns:

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

unhover

Removes hover from all chart points.

Returns:

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

Try it: