ChartOptions

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

Chart options.

Constructors

ChartOptions
Link copied to clipboard
fun ChartOptions(responsive: Boolean = true, responsiveAnimationDuration: Int = 0, aspectRatio: Int = 2, maintainAspectRatio: Boolean = true, onResize: (chart: Chart, newSize: Chart.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

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

Extensions

toJs
Link copied to clipboard
fun ChartOptions.toJs(i18nTranslator: (String) -> String): dynamic
An extension function to convert configuration class to JS object.