Package io. kvision. chart
Full-featured chart component based on chart.js library.
Types
AnimationOptions
Link copied to clipboard
data class AnimationOptions(duration: Int, easing: Eeasing, onProgress: (obj: Chart.ChartAnimationObject) -> Unit?, onComplete: (obj: Chart.ChartAnimationObject) -> Unit?)
Content copied to clipboard
ArcOptions
Link copied to clipboard
data class ArcOptions(backgroundColor: Color?, borderColor: Color?, borderWidth: Int)
Content copied to clipboard
ChartOptions
Link copied to clipboard
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, <ERROR CLASS>, activeElements: Array<Any>) -> Any?, onClick: (<ERROR CLASS>, 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)
Content copied to clipboard
ChartScales
Link copied to clipboard
data class ChartScales(type: ScalesType?, display: Boolean, position: Position?, gridLines: GridLineOptions?, scaleLabel: ScaleTitleOptions?, ticks: TickOptions?, xAxes: List<dynamic>?, yAxes: List<dynamic>?)
Content copied to clipboard
Configuration
Link copied to clipboard
data class Configuration(type: ChartType, dataSets: List<DataSets>, labels: List<String>?, options: ChartOptions?, plugins: List<dynamic>?)
Content copied to clipboard
DataSets
Link copied to clipboard
data class DataSets(cubicInterpolationMode: InterpolationMode?, backgroundColor: List<Color>?, borderWidth: List<Int>?, borderColor: List<Color>?, borderCapStyle: List<LineCap>?, borderDash: List<Int>?, borderDashOffset: Int?, borderJoinStyle: List<LineJoin>?, borderSkipped: List<Position>?, data: List<dynamic>?, fill: Boolean?, hoverBackgroundColor: List<Color>?, hoverBorderColor: List<Color>?, hoverBorderWidth: List<Int>?, label: String?, lineTension: Number?, steppedLine: Boolean?, pointBorderColor: List<Color>?, pointBackgroundColor: List<Color>?, pointBorderWidth: List<Int>?, pointRadius: List<Int>?, pointHoverRadius: List<Int>?, pointHitRadius: List<Int>?, pointHoverBackgroundColor: List<Color>?, pointHoverBorderColor: List<Color>?, pointHoverBorderWidth: List<Int>?, pointStyle: List<PointStyle>?, xAxisID: String?, yAxisID: String?, type: ChartType?, hidden: Boolean?, hideInLegendAndTooltip: Boolean?, showLine: Boolean?, stack: String?, spanGaps: Boolean?, barPercentage: Number?, barThickness: dynamic, borderAlign: dynamic, categoryPercentage: Number?, hitRadius: List<Int>?, hoverRadius: Number?, maxBarThickness: Number?, minBarLegth: Number?, order: Number?, pointRotation: List<Int>?, radius: List<Int>?, rotation: List<Int>?, weight: Number?)
Content copied to clipboard
ElementsOptions
Link copied to clipboard
data class ElementsOptions(point: PointOptions?, line: LineOptions?, arc: ArcOptions?, rectangle: RectangleOptions?)
Content copied to clipboard
GridLineOptions
Link copied to clipboard
data class GridLineOptions(display: Boolean, color: Color?, borderDash: List<Int>?, borderDashOffset: Int, lineWidth: Int, drawBorder: Boolean, drawOnChartArea: Boolean, drawTicks: Boolean, tickMarkLength: Int, zeroLineWidth: Int, zeroLineColor: Color?, zeroLineBorderDash: List<Int>?, zeroLineBorderDashOffset: Int, offsetGridLines: Boolean, circular: Boolean?, z: Number?)
Content copied to clipboard
HoverOptions
Link copied to clipboard
data class HoverOptions(mode: InteractionMode, animationDuration: Int, intersect: Boolean, axis: String)
Content copied to clipboard
InteractionMode
Link copied to clipboard
InterpolationMode
Link copied to clipboard
LayoutOptions
Link copied to clipboard
LayoutPaddingObject
Link copied to clipboard
data class LayoutPaddingObject(top: Int?, right: Int?, bottom: Int?, left: Int?)
Content copied to clipboard
LegendAlign
Link copied to clipboard
LegendLabelOptions
Link copied to clipboard
data class LegendLabelOptions(boxWidth: Int, fontSize: Int, fontStyle: FontStyle?, fontColor: Color?, fontFamily: String?, padding: Int, generateLabels: (chart: Any) -> Any?, filter: (legendItem: Chart.ChartLegendLabelItem, data: Chart.ChartData) -> Any?, usePointStyle: Boolean)
Content copied to clipboard
LegendOptions
Link copied to clipboard
data class LegendOptions(display: Boolean, position: Position, fullWidth: Boolean, reverse: Boolean, onClick: (<ERROR CLASS>, legendItem: Chart.ChartLegendLabelItem) -> Unit?, onHover: (<ERROR CLASS>, legendItem: Chart.ChartLegendLabelItem) -> Unit?, labels: LegendLabelOptions?, align: LegendAlign?, onLeave: (<ERROR CLASS>, legendItem: Chart.ChartLegendLabelItem) -> Unit?)
Content copied to clipboard
LineOptions
Link copied to clipboard
data class LineOptions(cubicInterpolationMode: InterpolationMode, tension: Double, backgroundColor: Color?, borderWidth: Int, borderColor: Color?, borderCapStyle: LineCap?, borderDash: List<Any>?, borderDashOffset: Int, borderJoinStyle: LineJoin?, capBezierPoints: Boolean, fill: Boolean, stepped: Boolean)
Content copied to clipboard
PointOptions
Link copied to clipboard
data class PointOptions(radius: Int, pointStyle: PointStyle, backgroundColor: Color?, borderWidth: Int, borderColor: Color?, hitRadius: Int, hoverRadius: Int, hoverBorderWidth: Int)
Content copied to clipboard
PointStyle
Link copied to clipboard
RectangleOptions
Link copied to clipboard
data class RectangleOptions(backgroundColor: Color?, borderColor: Color?, borderWidth: Int, borderSkipped: Position)
Content copied to clipboard
ScalesType
Link copied to clipboard
ScaleTitleOptions
Link copied to clipboard
TickOptions
Link copied to clipboard
data class TickOptions(callback: (value: Any, index: Any, values: Any) -> dynamic?, display: Boolean, fontSize: Int, fontStyle: FontStyle?, fontColor: Color?, fontFamily: String?, reverse: Boolean, minor: dynamic, major: dynamic, lineHeight: Number?, padding: Number?, z: Number?)
Content copied to clipboard
TitleOptions
Link copied to clipboard
TooltipAlign
Link copied to clipboard
TooltipCallback
Link copied to clipboard
data class TooltipCallback(beforeTitle: (item: Array<Chart.ChartTooltipItem>, data: Chart.ChartData) -> dynamic?, title: (item: Array<Chart.ChartTooltipItem>, data: Chart.ChartData) -> dynamic?, afterTitle: (item: Array<Chart.ChartTooltipItem>, data: Chart.ChartData) -> dynamic?, beforeBody: (item: Array<Chart.ChartTooltipItem>, data: Chart.ChartData) -> dynamic?, beforeLabel: (tooltipItem: Chart.ChartTooltipItem, data: Chart.ChartData) -> dynamic?, label: (tooltipItem: Chart.ChartTooltipItem, data: Chart.ChartData) -> dynamic?, labelColor: (tooltipItem: Chart.ChartTooltipItem, chart: Chart) -> Chart.ChartTooltipLabelColor?, labelTextColor: (tooltipItem: Chart.ChartTooltipItem, chart: Chart) -> String?, afterLabel: (tooltipItem: Chart.ChartTooltipItem, data: Chart.ChartData) -> dynamic?, afterBody: (item: Array<Chart.ChartTooltipItem>, data: Chart.ChartData) -> dynamic?, beforeFooter: (item: Array<Chart.ChartTooltipItem>, data: Chart.ChartData) -> dynamic?, footer: (item: Array<Chart.ChartTooltipItem>, data: Chart.ChartData) -> dynamic?, afterFooter: (item: Array<Chart.ChartTooltipItem>, data: Chart.ChartData) -> dynamic?)
Content copied to clipboard
TooltipOptions
Link copied to clipboard
data class TooltipOptions(enabled: Boolean, custom: (a: Any) -> Unit?, mode: InteractionMode, intersect: Boolean, position: TooltipPosition, callbacks: TooltipCallback?, filter: (item: Chart.ChartTooltipItem, data: Chart.ChartData) -> Boolean?, itemSort: (itemA: Chart.ChartTooltipItem, itemB: Chart.ChartTooltipItem) -> Number?, backgroundColor: Color?, titleFontSize: Int, titleFontStyle: FontStyle?, titleFontColor: Color?, titleFontFamily: String?, titleSpacing: Int, titleMarginBottom: Int, bodyFontSize: Int, bodyFontStyle: FontStyle?, bodyFontColor: Color?, bodyFontFamily: String?, bodySpacing: Int, footerFontSize: Int, footerFontStyle: FontStyle?, footerFontColor: Color?, footerFontFamily: String?, footerSpacing: Int, footerMarginTop: Int, xPadding: Int, yPadding: Int, caretPadding: Int, caretSize: Int, cornerRadius: Int, multiKeyBackground: Color?, displayColors: Boolean, borderColor: Color?, borderWidth: Int, titleAlign: TooltipAlign?, bodyAlign: TooltipAlign?, footerAlign: TooltipAlign?)
Content copied to clipboard
TooltipPosition
Link copied to clipboard
Functions
chart
Link copied to clipboard
toJs
Link copied to clipboard
fun Configuration.toJs(i18nTranslator: (String) -> String): Chart.ChartConfiguration
Content copied to clipboard