kvision / pl.treksoft.kvision.chart / TooltipOptions

TooltipOptions

data class TooltipOptions

Chart tooltip options.

Constructors

<init>

TooltipOptions(enabled: Boolean = true, custom: ((a: Any) -> Unit)? = null, mode: InteractionMode = InteractionMode.NEAREST, intersect: Boolean = true, position: TooltipPosition = TooltipPosition.AVERAGE, callbacks: TooltipCallback? = null, filter: ((item: Chart.ChartTooltipItem, data: Chart.ChartData) -> Boolean)? = null, itemSort: ((itemA: Chart.ChartTooltipItem, itemB: Chart.ChartTooltipItem) -> Number)? = null, backgroundColor: Color? = null, titleFontSize: Int = 12, titleFontStyle: FontStyle? = null, titleFontColor: Color? = null, titleFontFamily: String? = null, titleSpacing: Int = 2, titleMarginBottom: Int = 6, bodyFontSize: Int = 12, bodyFontStyle: FontStyle? = null, bodyFontColor: Color? = null, bodyFontFamily: String? = null, bodySpacing: Int = 2, footerFontSize: Int = 12, footerFontStyle: FontStyle? = null, footerFontColor: Color? = null, footerFontFamily: String? = null, footerSpacing: Int = 2, footerMarginTop: Int = 6, xPadding: Int = 6, yPadding: Int = 6, caretPadding: Int = 2, caretSize: Int = 5, cornerRadius: Int = 6, multiKeyBackground: Color? = null, displayColors: Boolean = true, borderColor: Color? = null, borderWidth: Int = 0)

Chart tooltip options.

Properties

backgroundColor

val backgroundColor: Color?

bodyFontColor

val bodyFontColor: Color?

bodyFontFamily

val bodyFontFamily: String?

bodyFontSize

val bodyFontSize: Int

bodyFontStyle

val bodyFontStyle: FontStyle?

bodySpacing

val bodySpacing: Int

borderColor

val borderColor: Color?

borderWidth

val borderWidth: Int

callbacks

val callbacks: TooltipCallback?

caretPadding

val caretPadding: Int

caretSize

val caretSize: Int

cornerRadius

val cornerRadius: Int

custom

val custom: ((a: Any) -> Unit)?

displayColors

val displayColors: Boolean

enabled

val enabled: Boolean

filter

val filter: ((item: Chart.ChartTooltipItem, data: Chart.ChartData) -> Boolean)?

footerFontColor

val footerFontColor: Color?

footerFontFamily

val footerFontFamily: String?

footerFontSize

val footerFontSize: Int

footerFontStyle

val footerFontStyle: FontStyle?

footerMarginTop

val footerMarginTop: Int

footerSpacing

val footerSpacing: Int

intersect

val intersect: Boolean

itemSort

val itemSort: ((itemA: Chart.ChartTooltipItem, itemB: Chart.ChartTooltipItem) -> Number)?

mode

val mode: InteractionMode

multiKeyBackground

val multiKeyBackground: Color?

position

val position: TooltipPosition

titleFontColor

val titleFontColor: Color?

titleFontFamily

val titleFontFamily: String?

titleFontSize

val titleFontSize: Int

titleFontStyle

val titleFontStyle: FontStyle?

titleMarginBottom

val titleMarginBottom: Int

titleSpacing

val titleSpacing: Int

xPadding

val xPadding: Int

yPadding

val yPadding: Int

Extension Functions

createInstance

fun <T> Any?.createInstance(vararg args: dynamic): T

Helper function for creating JavaScript objects from dynamic constructors.

toJs

fun TooltipOptions.toJs(): dynamic

An extension function to convert configuration class to JS object.