kvision / pl.treksoft.kvision.chart / ChartOptions

ChartOptions

(js) data class ChartOptions

Chart options.

Constructors

(js)

<init>

Chart options.

ChartOptions(responsive: Boolean = true, responsiveAnimationDuration: Int = 0, aspectRatio: Int = 2, maintainAspectRatio: Boolean = true, onResize: ((chart: Chart, newSize: ChartSize) -> Unit)? = null, devicePixelRatio: Int? = null, hover: HoverOptions? = null, events: List<String>? = null, onHover: ((chart: Chart, event: MouseEvent, activeElements: Array<Any>) -> Any)? = null, onClick: ((event: MouseEvent, activeElements: Array<Any>) -> Any)? = null, animation: AnimationOptions? = null, layout: LayoutOptions? = null, legend: LegendOptions? = null, legendCallback: ((chart: Chart) -> String)? = null, title: TitleOptions? = null, tooltips: TooltipOptions? = null, elements: ElementsOptions? = null, scales: ChartScales? = null, showLines: Boolean? = null, spanGaps: Boolean? = null, cutoutPercentage: Int? = null, circumference: Double? = null, rotation: Double? = null, plugins: dynamic = null, scale: dynamic = null)

Properties

(js)

animation

val animation: AnimationOptions?
(js)

aspectRatio

val aspectRatio: Int
(js)

circumference

val circumference: Double?
(js)

cutoutPercentage

val cutoutPercentage: Int?
(js)

devicePixelRatio

val devicePixelRatio: Int?
(js)

elements

val elements: ElementsOptions?
(js)

events

val events: List<String>?
(js)

hover

val hover: HoverOptions?
(js)

layout

val layout: LayoutOptions?
(js)

legend

val legend: LegendOptions?
(js)

legendCallback

val legendCallback: ((chart: Chart) -> String)?
(js)

maintainAspectRatio

val maintainAspectRatio: Boolean
(js)

onClick

val onClick: ((event: MouseEvent, activeElements: Array<Any>) -> Any)?
(js)

onHover

val onHover: ((chart: Chart, event: MouseEvent, activeElements: Array<Any>) -> Any)?
(js)

onResize

val onResize: ((chart: Chart, newSize: ChartSize) -> Unit)?
(js)

plugins

val plugins: dynamic
(js)

responsive

val responsive: Boolean
(js)

responsiveAnimationDuration

val responsiveAnimationDuration: Int
(js)

rotation

val rotation: Double?
(js)

scale

val scale: dynamic
(js)

scales

val scales: ChartScales?
(js)

showLines

val showLines: Boolean?
(js)

spanGaps

val spanGaps: Boolean?
(js)

title

val title: TitleOptions?
(js)

tooltips

val tooltips: TooltipOptions?

Extension Functions

(js)

toJs

An extension function to convert configuration class to JS object.

fun ChartOptions.toJs(i18nTranslator: (String) -> String): dynamic