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

class anychart.charts.Bullet Improve this Doc

Extends: anychart.core.Chart

Bullet chart class.
Note: Use method anychart#bullet to get an instance of this class.

Methods Overview

Specific settings
getType()Definition of the chart type.
Axes and Scales
axis()Axis settings.
range()Ranges settings.
scale()Scale settings.
Chart Coloring
markerPalette()Markers palette settings.
rangePalette()Range palette settings.
Data
data()Data settings.
Size and Position
isHorizontal()Definition of the horizontal layout.
layout()Layout settings.
Miscellaneous
draw()Drawing of bullet chart.

Methods Description

axis

Getter for default bullet chart axis settings.

Returns:

anychart.core.axes.Linear - Axis instance.

Try it:

Setter for default bullet chart axis settings.

Params:

Name Type Default Description
value Object | boolean | null
true
Axis settings to set.

Returns:

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

data

Getter for chart data.

Returns:

anychart.data.View - Returns current mapping.

Try it:

Setter for chart data.
Note: All data is markers values.

Params:

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

Returns:

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

draw

Starts the rendering of the chart into the container.

Returns:

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

Try it:

getType

Returns chart type.

Returns:

anychart.enums.ChartTypes - Current chart type.

Try it:

isHorizontal

Whether an bullet chart has horizontal layout. Layout is defined by method anychart.charts.Bullet#layout.

Returns:

boolean - Returns true if the bullet's layout is horizontal.

Try it:

layout

Getter for bullet chart layout.

Returns:

anychart.enums.Layout - Current chart layout.

Try it:

Setter for bullet chart layout.

Params:

Name Type Default Description
value string | anychart.enums.Layout
"horizontal"
Value to set.

Returns:

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

markerPalette

Getter for markers palette settings.

Returns:

anychart.palettes.Markers - Current palette.

Try it:

Setter for markers palette settings.
Note: Markers sets in data().

Params:

Name Type Default Description
value Array.<anychart.enums.MarkerType> | Object | anychart.palettes.Markers
["bar", "line", "x", "ellipse"]
Value to set.

Returns:

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

range

Getter for bullet chart ranges settings.

Params:

Name Type Default Description
index number
0
Chart range index.

Returns:

anychart.core.axisMarkers.Range - Range instance by index.

Try it:

Setter for bullet chart first range settings.

Params:

Name Type Description
value Object | boolean | null Value to set.

Returns:

anychart.charts.Bullet - Self instance for method chaining.
Setter for bullet chart ranges settings.

Params:

Name Type Default Description
index number
0
Index of range.
value Object | boolean | null
Value to set.

Returns:

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

rangePalette

Getter for range palette settings.

Returns:

anychart.palettes.DistinctColors - Current palette.

Try it:

Setter for range palette settings.

Params:

Name Type Default Description
value anychart.palettes.DistinctColors | Object | Array.<string>
{type: "distinct", items: ["#828282", "#a8a8a8", "#c2c2c2", "#d4d4d4", "#e1e1e1"]}
Value to set.

Returns:

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

scale

Getter for default bullet chart scale settings.

Returns:

anychart.scales.Base - Default chart scale value.

Try it:

Setter for default bullet chart scale settings.

Params:

Name Type Default Description
value anychart.scales.Base | anychart.enums.ScaleTypes | string
"linear"
Scale to set or Scale type.
Also accepts 'log', 'linear' and 'dateTime' strings.

Returns:

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