diff --git a/src/plugins/highcharts/__stories__/Venn.stories.tsx b/src/plugins/highcharts/__stories__/Venn.stories.tsx new file mode 100644 index 00000000..3e68c94d --- /dev/null +++ b/src/plugins/highcharts/__stories__/Venn.stories.tsx @@ -0,0 +1,23 @@ +import React from 'react'; + +import {Meta, Story} from '@storybook/react'; +import Highcharts from 'highcharts'; +import venn from 'highcharts/modules/venn'; + +import {ChartKit} from '../../../components/ChartKit'; +import {data} from '../mocks/venn'; + +import {ChartStory} from './components/ChartStory'; + +export default { + title: 'Plugins/Highcharts/Venn', + component: ChartKit, +} as Meta; + +venn(Highcharts); + +const Template: Story = () => { + return ; +}; + +export const UnsafeTooltip = Template.bind({}); diff --git a/src/plugins/highcharts/mocks/venn.ts b/src/plugins/highcharts/mocks/venn.ts new file mode 100644 index 00000000..6c5abdc3 --- /dev/null +++ b/src/plugins/highcharts/mocks/venn.ts @@ -0,0 +1,51 @@ +import type {HighchartsWidgetData} from '../types'; + +export const data: HighchartsWidgetData = { + data: { + graphs: [ + { + name: 'hey', + data: [ + { + sets: ['Good'], + value: 2, + }, + { + sets: ['Fast'], + value: 2, + }, + { + sets: ['Cheap'], + value: 2, + }, + { + sets: ['Good', 'Fast'], + value: 1, + name: 'More expensive', + }, + { + sets: ['Good', 'Cheap'], + value: 1, + name: 'Will take time to deliver', + }, + { + sets: ['Fast', 'Cheap'], + value: 1, + name: 'Not the best quality', + }, + { + sets: ['Fast', 'Cheap', 'Good'], + value: 1, + name: "They're dreaming", + }, + ], + }, + ], + }, + config: {}, + libraryConfig: { + chart: { + type: 'venn', + }, + }, +};