import React from 'react';
import { SunburstChart } from 'reaviz';
import { heatmapSimpleData } from 'reaviz-data-utils';
import { SunburstSeries } from 'reaviz';
import { SunburstArc } from 'reaviz';
import { SunburstArcLabel } from 'reaviz';
import { Gradient } from 'reaviz';
import chroma from 'chroma-js';
export default {
tags: ['snapshot'],
title: 'Charts/Sunburst Chart',
component: SunburstChart,
subcomponents: {
SunburstSeries,
SunburstArc,
SunburstArcLabel
}
};
const exampleColorScheme = chroma
.scale(['#2d60e8', '#0037b5'])
.correctLightness()
.colors(12);
export const Simple = () => (
);
export const Gradients = ({ colorScheme = exampleColorScheme }) => (
} />}
/>
}
/>
);
export const NoAnimation = () => (
}
/>
);
export const Autosize = () => (
);
export const MultiLevel = ({
data = [
{
key: 'Network',
data: [
{
key: 'Traffic',
data: [
{ key: 'HTTP', data: 100 },
{ key: 'HTTPS', data: 200 }
]
}
]
},
{
key: 'FileTransfer',
data: [
{
key: 'Protocol',
data: [
{ key: 'FTP', data: 50 },
{ key: 'SFTP', data: 70 }
]
}
]
},
{
key: 'Database',
data: [
{
key: 'Queries',
data: [
{ key: 'SELECT', data: 150 },
{ key: 'INSERT', data: 20 }
]
}
]
},
{
key: 'Authentication',
data: [
{
key: 'Methods',
data: [
{ key: 'OAuth', data: 60 },
{ key: 'SAML', data: 25 }
]
}
]
},
{
key: 'Storage',
data: [
{
key: 'Types',
data: [
{ key: 'SSD', data: 300 },
{ key: 'HDD', data: 100 }
]
}
]
}
],
colorScheme = exampleColorScheme
}) => (
}
/>
);