Skip to main content

ColumnChart

A column chart. Sets an inverted BarPlot. In a ColumnChart the value axis is the Y axis and the category axis is the X axis.

Extends

Methods

$_generateXAxes()

$_generateXAxes(): { xAxes: ValueAxis[]; xAxesAtEnd: ValueAxis[]; xAxesAtStart: ValueAxis[]; } | { xAxes: CategoryAxis[]; xAxesAtEnd: CategoryAxis[]; xAxesAtStart: CategoryAxis[]; }

Generate the X axes for XYChart to draw. By default these are value axes; if inverted is set on this chart they are category axes.

Returns

{ xAxes: ValueAxis[]; xAxesAtEnd: ValueAxis[]; xAxesAtStart: ValueAxis[]; } | { xAxes: CategoryAxis[]; xAxesAtEnd: CategoryAxis[]; xAxesAtStart: CategoryAxis[]; }

Inherited from

CategoryValueChart.$_generateXAxes


$_generateYAxes()

$_generateYAxes(): { yAxes: ValueAxis[]; yAxesAtEnd: ValueAxis[]; yAxesAtStart: ValueAxis[]; } | { yAxes: CategoryAxis[]; yAxesAtEnd: CategoryAxis[]; yAxesAtStart: CategoryAxis[]; }

Generate the Y axes for XYChart to draw. By default these are category axes; if inverted is set on this chart they are value axes.

Returns

{ yAxes: ValueAxis[]; yAxesAtEnd: ValueAxis[]; yAxesAtStart: ValueAxis[]; } | { yAxes: CategoryAxis[]; yAxesAtEnd: CategoryAxis[]; yAxesAtStart: CategoryAxis[]; }

Inherited from

CategoryValueChart.$_generateYAxes


$getAxisLabels()

$getAxisLabels(va, isXAxis): any[]

Overrides XYChart's $getAxisLabels to add support for category axes.

Parameters

va

AxisCommon

isXAxis

boolean

Returns

any[]

Inherited from

CategoryValueChart.$getAxisLabels


bind()

bind<T>(event, listener, insertAtStart?): EventGenerator

Bind a listener to the named event, optionally inserting the listener at the head of the queue for the given event.

Type Parameters

T

T = any

The type of the payload you expect to be passed to your callback. Using this is helpful to ensure your callbacks are typed correctly.

Parameters

event

any

Name of the event to bind

listener

(payload, evt?) => any

Function to bind to the event

insertAtStart?

boolean

Defaults to false. If true, this handler is inserted at the head of the list of listeners for the given event.

Returns

EventGenerator

Inherited from

CategoryValueChart.bind


bindAll()

bindAll<T>(events, listener, insertAtStart?): EventGenerator

Bind a listener to all of the named events, optionally inserting each one at the head of the queue for the given event.

Type Parameters

T

T = any

The type of the payload you expect to be passed to your callback. Using this is helpful to ensure your callbacks are typed correctly.

Parameters

events

any[]

listener

(payload, evt?) => any

insertAtStart?

boolean

Returns

EventGenerator

Inherited from

CategoryValueChart.bindAll


bindUnchecked()

bindUnchecked<T>(event, listener, insertAtStart?): EventGenerator

Bind an event listener. This method can be used with a type parameter by call sites; although it's not necessary it can be helpful to use this to ensure you've thought about what the payload to your event handler is going to be.

Type Parameters

T

T = any

The type of the payload you expect to be passed to your callback. Using this is helpful to ensure your callbacks are typed correctly.

Parameters

event

string

Name of the event(s) to bind to.

listener

(a, e?) => any

Function to bind to the given event(s)

insertAtStart?

boolean

Whether or not to insert this listener at the head of the listener queue. Defaults to false.

Returns

EventGenerator

Inherited from

CategoryValueChart.bindUnchecked


exportImage()

exportImage(options, onready): void

Returns an image export of the chart. All CSS classes, and operational attributes are stripped. Crosshair elements are also removed.

Parameters

options

ImageExportOptions

onready

ImageReadyFunction

Returns

void

Inherited from

CategoryValueChart.exportImage


exportSVG()

exportSVG(width?, height?): string

Returns an SVG export of the chart. All CSS classes, and operational attributes are stripped. Crosshair elements are also removed.

Parameters

width?

number

Optional width for the output SVG.

height?

number

Optional height for the output SVG.

Returns

string

Inherited from

CategoryValueChart.exportSVG


getTitle()

getTitle(): string

Gets the chart's title, if defined.

Returns

string

Inherited from

CategoryValueChart.getTitle


getZoom()

getZoom(): number

Gets the current zoom level.

Returns

number

Inherited from

CategoryValueChart.getZoom


load()

load(options, onload?): void

Loads chart data from a data object, URL, VisuallyJs model or Selection, in the latter two cases optionally with a filter.

Parameters

options
data?

ObjectData[]

dataSource?

DataSource

dataSourceFilter?

ChartModelFilter

url?

string

onload?

(chart) => any

Returns

void

Inherited from

CategoryValueChart.load


reload()

reload(): void

Reload the chart, without changing any of the options.

Returns

void

Inherited from

CategoryValueChart.reload


setZoom()

setZoom(z): number

Sets the current zoom level. Clamped to the current zoom range.

Parameters

z

number

The zoom level to set.

Returns

number

Inherited from

CategoryValueChart.setZoom


unbind()

unbind(eventOrListener?, listener?): EventGenerator

Unbind the given event listener, or all listeners. If you call this method with no arguments then all event listeners are unbound.

Parameters

eventOrListener?

Either an event name, or an event handler function

string | Function

listener?

Function

If eventOrListener is defined, this is the event handler to unbind.

Returns

EventGenerator

Inherited from

CategoryValueChart.unbind