2020-07-20 17:25:50 +02:00
|
|
|
<script>
|
2020-07-26 12:54:55 +02:00
|
|
|
import Chart, { getColorSchema } from "./Chart.svelte"
|
2020-07-20 17:25:50 +02:00
|
|
|
|
|
|
|
let type = "donut"
|
|
|
|
|
2020-07-26 12:54:55 +02:00
|
|
|
export let data = []
|
|
|
|
export let color = "britecharts"
|
2020-07-20 17:25:50 +02:00
|
|
|
export let height = 200
|
|
|
|
export let width = 200
|
|
|
|
export let margin = { top: 0, right: 0, bottom: 0, left: 0 }
|
|
|
|
|
|
|
|
export let externalRadius = 25
|
|
|
|
export let hasFixedHighlightedSlice = false
|
|
|
|
export let hasLastHoverSliceHighlighted = false
|
|
|
|
export let internalRadius = 25
|
|
|
|
export let isAnimated = true
|
|
|
|
export let radiusHoverOffset = 0
|
2020-07-26 12:54:55 +02:00
|
|
|
export let useLegend = true
|
|
|
|
|
|
|
|
$: colorSchema = getColorSchema(color)
|
2020-07-20 17:25:50 +02:00
|
|
|
</script>
|
|
|
|
|
2020-07-26 12:54:55 +02:00
|
|
|
<Chart
|
|
|
|
{type}
|
|
|
|
{useLegend}
|
|
|
|
{data}
|
|
|
|
{colorSchema}
|
|
|
|
{height}
|
|
|
|
{width}
|
|
|
|
{margin}
|
|
|
|
{externalRadius}
|
|
|
|
{hasFixedHighlightedSlice}
|
|
|
|
{hasLastHoverSliceHighlighted}
|
|
|
|
{internalRadius}
|
|
|
|
{isAnimated}
|
|
|
|
{radiusHoverOffset} />
|