2022-09-12 07:13:52 +00:00
|
|
|
const ChartProps = [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'type',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Type of the chart.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'data',
|
|
|
|
type: 'any',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Data to display.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'options',
|
|
|
|
type: 'any',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Options to customize the chart.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'plugins',
|
|
|
|
type: 'any',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Used to custom plugins of the chart.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'width',
|
|
|
|
type: 'number',
|
|
|
|
default: '300',
|
|
|
|
description: 'Width of the chart in non-responsive mode.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'height',
|
|
|
|
type: 'number',
|
|
|
|
default: '150',
|
|
|
|
description: 'Height of the chart in non-responsive mode.'
|
2023-05-02 07:18:02 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'pt',
|
|
|
|
type: 'any',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Uses to pass attributes to DOM elements inside the component.'
|
2023-07-06 13:20:37 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'unstyled',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'When enabled, it removes component related styles in the core.'
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
const ChartEvents = [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'select',
|
|
|
|
description: 'Callback to invoke when a tab gets expanded.',
|
2022-09-12 07:13:52 +00:00
|
|
|
arguments: [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'originalEvent',
|
|
|
|
type: 'object',
|
|
|
|
description: 'Browser event'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'dataset',
|
|
|
|
type: 'object',
|
|
|
|
description: 'Selected dataset'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'element',
|
|
|
|
type: 'object',
|
|
|
|
description: 'Selected element'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'element._datasetIndex',
|
|
|
|
type: 'number',
|
|
|
|
description: 'Index of the dataset in data'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'element._index',
|
|
|
|
type: 'number',
|
|
|
|
description: 'Index of the data in dataset'
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'loaded',
|
|
|
|
description: 'Callback to invoke when chart is loaded.',
|
2022-09-12 07:13:52 +00:00
|
|
|
arguments: [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'chart',
|
|
|
|
type: 'object',
|
|
|
|
description: 'Chart instance.'
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
chart: {
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'Chart',
|
|
|
|
description: 'Chart components are based on Charts.js, an open source HTML5 based charting library.',
|
2022-09-12 07:13:52 +00:00
|
|
|
props: ChartProps,
|
|
|
|
events: ChartEvents
|
|
|
|
}
|
|
|
|
};
|