@mozaic-ds/chart
Version:
<p align="center"> <img alt="ADEO Design system - Chart library" src="./.storybook/assets/adeo-design-system-chart-banner.svg" /> </p>
92 lines (86 loc) • 2.24 kB
text/typescript
// MixedBarLineChart.stories.ts
import type { Meta, StoryObj } from '@storybook/vue3';
import MixedBarLineChart from './MixedBarLineChart.vue';
const meta = {
title: 'Charts/MixedBarLine',
component: MixedBarLineChart
} satisfies Meta<typeof MixedBarLineChart>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Default = {
args: {
width: '500px',
height: '400px',
tooltipFirstLineLabel: 'content',
tooltipSecondLineLabel: 'content2',
disableAccessibility: false,
newPatternsOrder: [0, 1, 0, 1, 2, 3],
colourSet: 0,
barUnit: '',
lineUnit: '€',
xAxisTitle: 'X Axis',
yLeftAxisTitle: 'Y1 Axis',
yRightAxisTitle: 'Y2 Axis',
barDatasets: [
{
type: 'bar',
label: 'Bar Label 1',
data: [10, 20, 30, 40],
borderColor: 'rgb(255, 99, 132)',
backgroundColor: 'rgba(255, 99, 132, 0.2)'
}
],
lineDatasets: [
{
type: 'line',
label: 'Line Label 1',
data: [5, 15, 20, 25],
borderColor: 'rgb(54, 162, 235)'
}
],
labels: ['Label 1', 'Label 2', 'Label 3', 'Label 4']
}
} satisfies Story;
export const Multiple_Data = {
args: {
width: '500px',
height: '400px',
tooltipFirstLineLabel: 'content',
tooltipSecondLineLabel: 'content2',
disableAccessibility: false,
newPatternsOrder: [0, 1, 0, 1, 2, 3],
colourSet: 0,
lineUnit: '€',
barDatasets: [
{
type: 'bar',
label: 'Bar Label 1',
data: [10, 20, 30, 40],
borderColor: 'rgb(255, 99, 132)',
backgroundColor: 'rgba(255, 99, 132, 0.2)'
},
{
type: 'bar',
label: 'Bar Label 2',
data: [20, 20, 30, 40],
borderColor: 'rgb(255, 99, 132)',
backgroundColor: 'rgba(255, 99, 132, 0.2)'
}
],
lineDatasets: [
{
type: 'line',
label: 'Line Label 1',
data: [50, 150, 20, 250],
borderColor: 'rgb(54, 162, 235)'
},
{
type: 'line',
label: 'Line Label 2',
data: [1, 8, 6, 24],
borderColor: 'rgb(54, 162, 235)'
}
],
labels: ['Label 1', 'Label 2', 'Label 3', 'Label 4']
}
} satisfies Story;