Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/plugins/highcharts/__stories__/Venn.stories.tsx
Original file line number Diff line number Diff line change
@@ -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<any> = () => {
return <ChartStory data={data} />;
};

export const UnsafeTooltip = Template.bind({});
51 changes: 51 additions & 0 deletions src/plugins/highcharts/mocks/venn.ts
Original file line number Diff line number Diff line change
@@ -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',
},
},
};