Chart
Chart visualizes data in an application. The type of chart you use will depend on your use case and the type of data you need to display.
Import
js
import { MpChart } from '@mekari/pixel3'
Playground
API
MpChart
Props
Events
Slots
Name | Type | Default |
---|---|---|
id | string | - |
title | string | - |
type | bar | line | pie | doughnut | radar | bar |
width-chart | string | 100% |
height-chart | string | 256px |
width-container | string | 100% |
height-container | string | 100% |
data | object |
{
labels: '',
dataSets: []
} |
options | object | {} |
color-pattern | categorical | comparison | light shade | dark shade | categorical |
color-start | number | 1 |
color-ratio | number | 0.2 |
legend-position | bottom | right | top | left | bottom |
legend-direction | left | center | right | left |
tooltip-margin-top | number | 0 |
tooltip-margin-left | number | 0 |
tooltip-options | object |
{
offsetTop: 0,
offsetLeft: 0
} |
is-show-legend | boolean | true |
is-show-tooltip | boolean | true |
is-show-data-labels | boolean | false |
is-horizontal | boolean | false |
is-stacked | boolean | false |
is-area | boolean | false |
is-debug | boolean | false |
is-show-background-hover | boolean | false |
is-show-gauge-pointer | boolean | false |