@mantine-vue/charts 3.2.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/esm/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/internal/echarts.ts","../src/internal/component.ts","../src/internal/colors.ts","../src/internal/options.ts","../src/charts.ts","../src/ChartTooltip/ChartTooltip.ts","../src/ChartLegend/ChartLegend.ts","../src/utils/get-series-labels/get-series-labels.ts"],"sourcesContent":["import { use } from 'echarts/core'\nimport {\n BarChart as EBarChart,\n EffectScatterChart,\n FunnelChart as EFunnelChart,\n GaugeChart,\n GraphChart,\n HeatmapChart as EHeatmapChart,\n LineChart as ELineChart,\n PieChart as EPieChart,\n RadarChart as ERadarChart,\n SankeyChart as ESankeyChart,\n ScatterChart as EScatterChart,\n TreemapChart as ETreemapChart,\n} from 'echarts/charts'\nimport {\n AriaComponent,\n CalendarComponent,\n DatasetComponent,\n DataZoomComponent,\n GraphicComponent,\n GridComponent,\n LegendComponent,\n MarkLineComponent,\n PolarComponent,\n RadarComponent,\n TitleComponent,\n ToolboxComponent,\n TooltipComponent,\n TransformComponent,\n VisualMapComponent,\n} from 'echarts/components'\nimport { CanvasRenderer, SVGRenderer } from 'echarts/renderers'\n\nlet registered = false\n\nexport function registerECharts(): void {\n if (registered) {\n return\n }\n\n use([\n EBarChart,\n EffectScatterChart,\n EFunnelChart,\n GaugeChart,\n GraphChart,\n EHeatmapChart,\n ELineChart,\n EPieChart,\n ERadarChart,\n ESankeyChart,\n EScatterChart,\n ETreemapChart,\n AriaComponent,\n CalendarComponent,\n DatasetComponent,\n DataZoomComponent,\n GraphicComponent,\n GridComponent,\n LegendComponent,\n MarkLineComponent,\n PolarComponent,\n RadarComponent,\n TitleComponent,\n ToolboxComponent,\n TooltipComponent,\n TransformComponent,\n VisualMapComponent,\n CanvasRenderer,\n SVGRenderer,\n ])\n\n registered = true\n}\n","import { computed, defineComponent, h, ref, type Component, type PropType } from 'vue'\nimport type { EChartsOption } from 'echarts'\nimport VChart from 'vue-echarts'\nimport { registerECharts } from './echarts'\n\nregisterECharts()\n\nexport type OptionBuilder = (props: Record<string, unknown>) => EChartsOption\n\nexport function createChartComponent(name: string, buildOption: OptionBuilder): Component {\n return defineComponent({\n name: `Mantine${name}`,\n inheritAttrs: false,\n props: {\n option: Object as PropType<EChartsOption>,\n height: { type: [Number, String], default: 300 },\n width: { type: [Number, String], default: '100%' },\n loading: Boolean,\n autoresize: { type: Boolean, default: true },\n renderer: { type: String as PropType<'canvas' | 'svg'>, default: 'canvas' },\n initOptions: Object as PropType<Record<string, unknown>>,\n },\n emits: ['click', 'dblclick', 'mouseover', 'mouseout', 'legendselectchanged', 'datazoom'],\n setup(props, { attrs, emit, expose }) {\n const chart = ref<InstanceType<typeof VChart>>()\n const option = computed(() => ({ ...buildOption(attrs), ...props.option }))\n expose({\n getEchartsInstance: () => chart.value?.chart,\n resize: () => chart.value?.resize(),\n setOption: (next: EChartsOption) => chart.value?.setOption(next),\n })\n const size = (value: string | number) => (typeof value === 'number' ? `${value}px` : value)\n const rootAttributes = computed(() =>\n Object.fromEntries(\n Object.entries(attrs).filter(\n ([key]) =>\n ['id', 'dir', 'role', 'tabindex', 'title'].includes(key) ||\n key.startsWith('aria-') ||\n (key.startsWith('data-') && key !== 'data'),\n ),\n ),\n )\n return () =>\n h(\n 'div',\n {\n ...rootAttributes.value,\n class: ['mantine-Chart-root', `mantine-${name}-root`, attrs.class],\n style: [{ width: size(props.width), height: size(props.height) }, attrs.style],\n },\n [\n h(VChart, {\n ref: chart,\n option: option.value,\n autoresize: props.autoresize,\n loading: props.loading,\n initOptions: { ...props.initOptions, renderer: props.renderer },\n class: 'mantine-Chart-container',\n onClick: (event: unknown) => emit('click', event),\n onDblclick: (event: unknown) => emit('dblclick', event),\n onMouseover: (event: unknown) => emit('mouseover', event),\n onMouseout: (event: unknown) => emit('mouseout', event),\n onLegendselectchanged: (event: unknown) => emit('legendselectchanged', event),\n onDatazoom: (event: unknown) => emit('datazoom', event),\n }),\n ],\n )\n },\n })\n}\n","const shadeMap: Record<string, string[]> = {\n blue: [\n '#e7f5ff',\n '#d0ebff',\n '#a5d8ff',\n '#74c0fc',\n '#4dabf7',\n '#339af0',\n '#228be6',\n '#1c7ed6',\n '#1971c2',\n '#1864ab',\n ],\n cyan: [\n '#e3fafc',\n '#c5f6fa',\n '#99e9f2',\n '#66d9e8',\n '#3bc9db',\n '#22b8cf',\n '#15aabf',\n '#1098ad',\n '#0c8599',\n '#0b7285',\n ],\n green: [\n '#ebfbee',\n '#d3f9d8',\n '#b2f2bb',\n '#8ce99a',\n '#69db7c',\n '#51cf66',\n '#40c057',\n '#37b24d',\n '#2f9e44',\n '#2b8a3e',\n ],\n grape: [\n '#f8f0fc',\n '#f3d9fa',\n '#eebefa',\n '#e599f7',\n '#da77f2',\n '#cc5de8',\n '#be4bdb',\n '#ae3ec9',\n '#9c36b5',\n '#862e9c',\n ],\n gray: [\n '#f8f9fa',\n '#f1f3f5',\n '#e9ecef',\n '#dee2e6',\n '#ced4da',\n '#adb5bd',\n '#868e96',\n '#495057',\n '#343a40',\n '#212529',\n ],\n orange: [\n '#fff4e6',\n '#ffe8cc',\n '#ffd8a8',\n '#ffc078',\n '#ffa94d',\n '#ff922b',\n '#fd7e14',\n '#f76707',\n '#e8590c',\n '#d9480f',\n ],\n pink: [\n '#fff0f6',\n '#ffdeeb',\n '#fcc2d7',\n '#faa2c1',\n '#f783ac',\n '#f06595',\n '#e64980',\n '#d6336c',\n '#c2255c',\n '#a61e4d',\n ],\n red: [\n '#fff5f5',\n '#ffe3e3',\n '#ffc9c9',\n '#ffa8a8',\n '#ff8787',\n '#ff6b6b',\n '#fa5252',\n '#f03e3e',\n '#e03131',\n '#c92a2a',\n ],\n teal: [\n '#e6fcf5',\n '#c3fae8',\n '#96f2d7',\n '#63e6be',\n '#38d9a9',\n '#20c997',\n '#12b886',\n '#0ca678',\n '#099268',\n '#087f5b',\n ],\n violet: [\n '#f3f0ff',\n '#e5dbff',\n '#d0bfff',\n '#b197fc',\n '#9775fa',\n '#845ef7',\n '#7950f2',\n '#7048e8',\n '#6741d9',\n '#5f3dc4',\n ],\n yellow: [\n '#fff9db',\n '#fff3bf',\n '#ffec99',\n '#ffe066',\n '#ffd43b',\n '#fcc419',\n '#fab005',\n '#f59f00',\n '#f08c00',\n '#e67700',\n ],\n}\n\nexport function resolveColor(color: unknown, fallback = '#228be6'): string {\n if (typeof color !== 'string' || !color) return fallback\n const [name, rawShade] = color.split('.')\n const shade = Number(rawShade ?? 6)\n return shadeMap[name]?.[Number.isInteger(shade) ? shade : 6] ?? color\n}\n","import type { EChartsOption, SeriesOption } from 'echarts'\nimport type { ChartDataItem, ChartReferenceLineProps, ChartSeries } from '../types'\nimport { resolveColor } from './colors'\n\ntype Props = Record<string, unknown>\n\nconst bool = (value: unknown, fallback: boolean) => (typeof value === 'boolean' ? value : fallback)\nconst num = (value: unknown, fallback: number) => (typeof value === 'number' ? value : fallback)\nconst obj = (value: unknown) => (value && typeof value === 'object' ? value : {})\nconst list = <T>(value: unknown): T[] => (Array.isArray(value) ? (value as T[]) : [])\nconst formatter = (props: Props) =>\n typeof props.valueFormatter === 'function'\n ? (props.valueFormatter as (value: number) => string)\n : undefined\n\nfunction tooltip(props: Props): EChartsOption['tooltip'] {\n if (!bool(props.withTooltip, true)) return { show: false }\n const format = formatter(props)\n return {\n trigger: 'axis',\n transitionDuration: num(props.tooltipAnimationDuration, 0) / 1000,\n valueFormatter: format ? (value) => format(Number(value)) : undefined,\n ...obj(props.tooltipProps),\n }\n}\n\nfunction markLine(referenceLines: ChartReferenceLineProps[] | undefined) {\n if (!referenceLines?.length) return undefined\n return {\n silent: true,\n symbol: 'none',\n data: referenceLines.map((line) => ({\n xAxis: line.x,\n yAxis: line.y,\n label: typeof line.label === 'string' ? { formatter: line.label } : line.label,\n lineStyle: {\n color: resolveColor(line.color, '#868e96'),\n type: line.strokeDasharray ? 'dashed' : 'solid',\n },\n })),\n }\n}\n\nexport function cartesianOption(\n props: Props,\n kind: 'line' | 'area' | 'bar' | 'composite',\n): EChartsOption {\n const data = list<ChartDataItem>(props.data)\n const series = list<\n ChartSeries & {\n type?: string\n stackId?: string\n strokeDasharray?: string | number\n curveType?: string\n }\n >(props.series)\n const dataKey = String(props.dataKey ?? 'name')\n const horizontal = props.orientation !== 'vertical'\n const chartType = String(props.type ?? 'default')\n const category = data.map((item) => item[dataKey] as string | number)\n const commonAxis = { axisLabel: { color: resolveColor(props.textColor, '#868e96') } }\n const categoryAxis = { type: 'category' as const, data: category, ...commonAxis }\n const valueAxis = { type: 'value' as const, name: props.yAxisLabel as string, ...commonAxis }\n const mapped = series.map((item, index) => {\n const itemKind = kind === 'composite' ? (item.type ?? 'line') : kind === 'area' ? 'line' : kind\n const color = resolveColor(item.color, resolveColor(`blue.${6 + (index % 3)}`))\n const stack = chartType === 'stacked' || chartType === 'percent' ? 'stack' : item.stackId\n const base = {\n name: item.label ?? item.name,\n data: data.map((entry) => entry[item.name] as number | null),\n yAxisIndex: item.yAxisId ? 1 : 0,\n stack,\n markLine:\n index === 0\n ? markLine(props.referenceLines as ChartReferenceLineProps[] | undefined)\n : undefined,\n }\n if (itemKind === 'bar') {\n return {\n ...base,\n type: 'bar',\n barMaxWidth: props.maxBarWidth as number,\n barMinHeight: num(props.minBarSize, 0),\n itemStyle: { color, opacity: num(props.fillOpacity, 1) },\n label: {\n show: bool(props.withBarValueLabel, false),\n position: horizontal ? 'top' : 'right',\n },\n }\n }\n return {\n ...base,\n type: 'line',\n smooth: !['linear', 'step', 'stepBefore', 'stepAfter'].includes(\n String(props.curveType ?? item.curveType ?? 'monotone'),\n ),\n step: String(props.curveType).startsWith('step') ? 'middle' : false,\n connectNulls: bool(props.connectNulls, true),\n showSymbol: bool(props.withDots, true),\n symbolSize: 6,\n lineStyle: {\n color,\n width: num(props.strokeWidth, 2),\n type: item.strokeDasharray ? 'dashed' : 'solid',\n },\n itemStyle: { color, opacity: num(props.fillOpacity, 1) },\n areaStyle: itemKind === 'area' ? { color, opacity: num(props.fillOpacity, 0.2) } : undefined,\n label: { show: bool(props.withPointLabels, false), position: 'top' },\n }\n }) as unknown as SeriesOption[]\n\n return {\n animationDurationUpdate: num(props.tooltipAnimationDuration, 0),\n color: series.map((item) => resolveColor(item.color)),\n grid: {\n left: 48,\n right: bool(props.withRightYAxis, false) ? 48 : 16,\n top: bool(props.withLegend, false) ? 44 : 16,\n bottom: 38,\n containLabel: true,\n ...obj(props.gridProps),\n },\n legend: { show: bool(props.withLegend, false), ...obj(props.legendProps) },\n tooltip: tooltip(props),\n xAxis: horizontal\n ? {\n ...categoryAxis,\n show: bool(props.withXAxis, true),\n name: props.xAxisLabel as string,\n ...obj(props.xAxisProps),\n }\n : { ...valueAxis, show: bool(props.withXAxis, true), ...obj(props.xAxisProps) },\n yAxis: horizontal\n ? [\n { ...valueAxis, show: bool(props.withYAxis, true), ...obj(props.yAxisProps) },\n {\n ...valueAxis,\n show: bool(props.withRightYAxis, false),\n position: 'right',\n name: props.rightYAxisLabel as string,\n ...obj(props.rightYAxisProps),\n },\n ]\n : { ...categoryAxis, show: bool(props.withYAxis, true), ...obj(props.yAxisProps) },\n series: mapped,\n }\n}\n\nexport function radialOption(props: Props, donut = false): EChartsOption {\n const data = list<{ name: string; value: number; color?: string }>(props.data)\n return {\n color: data.map((item) => resolveColor(item.color)),\n legend: {\n show: bool(props.withLabels, false) || bool(props.withLegend, false),\n ...obj(props.legendProps),\n },\n tooltip: { trigger: 'item', show: bool(props.withTooltip, true), ...obj(props.tooltipProps) },\n series: [\n {\n type: 'pie',\n radius: donut ? [`${num(props.thickness, 40)}%`, '75%'] : ['0%', '75%'],\n startAngle: num(props.startAngle, 90),\n minAngle: num(props.minAngle, 0),\n padAngle: num(props.paddingAngle, 0),\n roseType:\n props.type === 'pie'\n ? undefined\n : props.type === 'donut'\n ? undefined\n : (props.type as 'radius' | 'area'),\n label: {\n show: bool(props.withLabels, false),\n formatter: props.withLabelsLine ? '{b}: {d}%' : '{b}',\n },\n labelLine: { show: bool(props.withLabelsLine, false) },\n data: data.map((item) => ({ ...item, itemStyle: { color: resolveColor(item.color) } })),\n },\n ],\n graphic: props.chartLabel\n ? [\n {\n type: 'text',\n left: 'center',\n top: 'middle',\n style: {\n text: String(props.chartLabel),\n fill: resolveColor(props.chartLabelColor, '#212529'),\n fontSize: num(props.chartLabelFontSize, 18),\n },\n },\n ]\n : undefined,\n }\n}\n\nexport function scatterOption(props: Props, bubble = false): EChartsOption {\n const data = list<ChartDataItem>(props.data)\n const series = list<ChartSeries>(props.series)\n const xKey = String(props.dataKey ?? props.xAxisKey ?? 'x')\n const yKey = String(props.yAxisKey ?? 'y')\n const zKey = String(props.zAxisKey ?? 'z')\n return {\n grid: { containLabel: true, ...obj(props.gridProps) },\n legend: { show: bool(props.withLegend, false), ...obj(props.legendProps) },\n tooltip: { trigger: 'item', show: bool(props.withTooltip, true), ...obj(props.tooltipProps) },\n xAxis: { type: 'value', show: bool(props.withXAxis, true), ...obj(props.xAxisProps) },\n yAxis: { type: 'value', show: bool(props.withYAxis, true), ...obj(props.yAxisProps) },\n series: (series.length\n ? series\n : [{ name: String(props.name ?? 'value'), color: props.color as string }]\n ).map((item) => ({\n type: 'scatter',\n name: item.label ?? item.name,\n data: data\n .filter((entry) => !entry.name || entry.name === item.name)\n .map((entry) => [entry[xKey], entry[yKey], entry[zKey], entry]),\n symbolSize: bubble\n ? (value: unknown[]) => Math.max(4, Math.sqrt(Number(value[2] ?? 1)) * num(props.range, 4))\n : num(props.size, 10),\n itemStyle: { color: resolveColor(item.color) },\n })) as unknown as SeriesOption[],\n }\n}\n\nexport function sparklineOption(props: Props): EChartsOption {\n const data = list<number | null>(props.data)\n const trend = props.trendColors as\n | { positive?: string; negative?: string; neutral?: string }\n | undefined\n const color = trend\n ? resolveColor(\n data.at(-1)! > data[0]!\n ? trend.positive\n : data.at(-1)! < data[0]!\n ? trend.negative\n : trend.neutral,\n )\n : resolveColor(props.color)\n return {\n grid: { left: 0, right: 0, top: 1, bottom: 1 },\n xAxis: { type: 'category', show: false },\n yAxis: { type: 'value', show: false, scale: true },\n series: [\n {\n type: 'line',\n data,\n showSymbol: false,\n connectNulls: bool(props.connectNulls, true),\n smooth: props.curveType !== 'linear',\n lineStyle: { color, width: num(props.strokeWidth, 2) },\n areaStyle: bool(props.withGradient, true)\n ? { color, opacity: num(props.fillOpacity, 0.6) }\n : undefined,\n },\n ],\n }\n}\n\nexport function radarOption(props: Props): EChartsOption {\n const data = list<ChartDataItem>(props.data)\n const series = list<ChartSeries>(props.series)\n const key = String(props.dataKey ?? 'name')\n const max = num(\n props.maxValue,\n Math.max(1, ...data.flatMap((row) => series.map((s) => Number(row[s.name] ?? 0)))),\n )\n return {\n legend: { show: bool(props.withLegend, false) },\n tooltip: { show: bool(props.withTooltip, true) },\n radar: {\n indicator: data.map((row) => ({ name: String(row[key]), max })),\n shape: props.shape === 'circle' ? 'circle' : 'polygon',\n },\n series: [\n {\n type: 'radar',\n data: series.map((s) => ({\n name: s.label ?? s.name,\n value: data.map((row) => Number(row[s.name] ?? 0)),\n lineStyle: { color: resolveColor(s.color) },\n itemStyle: { color: resolveColor(s.color) },\n areaStyle: bool(props.withPolarGrid, false) ? {} : undefined,\n })),\n },\n ],\n }\n}\n\nexport function simpleOption(type: 'funnel' | 'treemap' | 'sankey', props: Props): EChartsOption {\n const data = list<Record<string, unknown>>(props.data)\n if (type === 'sankey')\n return {\n tooltip: { show: bool(props.withTooltip, true) },\n series: [\n {\n type,\n data: list(props.nodes ?? data),\n links: list(props.links),\n emphasis: { focus: 'adjacency' },\n ...obj(props.sankeyProps),\n },\n ],\n }\n return {\n tooltip: { show: bool(props.withTooltip, true) },\n legend: { show: bool(props.withLegend, false) },\n series: [\n {\n type,\n data: data.map((item) => ({ ...item, itemStyle: { color: resolveColor(item.color) } })),\n ...obj(props[`${type}Props`]),\n },\n ],\n }\n}\n\nexport function radialBarOption(props: Props): EChartsOption {\n const data = list<{ name: string; value: number; color?: string }>(props.data)\n return {\n legend: { show: bool(props.withLegend, false) },\n tooltip: { show: bool(props.withTooltip, true) },\n polar: {},\n angleAxis: { max: num(props.maxValue, 100), show: false },\n radiusAxis: {\n type: 'category',\n data: data.map((i) => i.name),\n show: bool(props.withLabels, true),\n },\n series: [\n {\n type: 'bar',\n coordinateSystem: 'polar',\n roundCap: true,\n data: data.map((i) => ({ value: i.value, itemStyle: { color: resolveColor(i.color) } })),\n },\n ],\n }\n}\n\nexport function heatmapOption(props: Props): EChartsOption {\n const input =\n props.data && typeof props.data === 'object' ? (props.data as Record<string, number>) : {}\n const data = Object.entries(input).map(([date, value]) => [date, value])\n const values = Object.values(input)\n const date = (value: unknown, fallback: string) =>\n value instanceof Date\n ? value.toISOString().slice(0, 10)\n : typeof value === 'string'\n ? value\n : fallback\n const start = date(props.startDate, String(data[0]?.[0] ?? new Date().toISOString().slice(0, 10)))\n const end = date(props.endDate, String(data.at(-1)?.[0] ?? start))\n return {\n tooltip: { show: bool(props.withTooltip, false) },\n visualMap: {\n show: bool(props.withLegend, false),\n min: (props.domain as number[] | undefined)?.[0] ?? Math.min(0, ...values),\n max: (props.domain as number[] | undefined)?.[1] ?? Math.max(1, ...values),\n inRange: {\n color: list<string>(props.colors).length\n ? list<string>(props.colors).map((color) => resolveColor(color))\n : ['#ebfbee', '#2f9e44'],\n },\n orient: 'horizontal',\n left: 'center',\n bottom: 0,\n },\n calendar: {\n range: [start, end],\n cellSize: num(props.rectSize, 10) + num(props.gap, 1),\n dayLabel: {\n show: bool(props.withWeekdayLabels, false),\n firstDay: num(props.firstDayOfWeek, 1),\n },\n monthLabel: { show: bool(props.withMonthLabels, false) },\n itemStyle: {\n borderWidth: num(props.gap, 1),\n borderColor: 'transparent',\n borderRadius: num(props.rectRadius, 2),\n },\n },\n series: [{ type: 'heatmap', coordinateSystem: 'calendar', data }],\n }\n}\n","import type { MantineColor } from '@mantine-vue/core'\nimport type { DefineComponent, HTMLAttributes, VNodeChild } from 'vue'\nimport { createChartComponent } from './internal/component'\nimport {\n cartesianOption,\n heatmapOption,\n radarOption,\n radialBarOption,\n radialOption,\n scatterOption,\n simpleOption,\n sparklineOption,\n} from './internal/options'\nimport type {\n ChartData,\n ChartOptionProps,\n ChartRootProps,\n ChartSeries,\n GridChartBaseProps,\n MantineChartDotProps,\n} from './types'\n\nexport type LineChartCurveType =\n | 'bump'\n | 'linear'\n | 'natural'\n | 'monotone'\n | 'step'\n | 'stepBefore'\n | 'stepAfter'\nexport type AreaChartCurveType = LineChartCurveType\nexport type CompositeChartCurveType = LineChartCurveType\nexport interface LineChartSeries extends ChartSeries {\n strokeDasharray?: string | number\n curveType?: LineChartCurveType\n}\nexport interface AreaChartSeries extends ChartSeries {\n color: MantineColor\n strokeDasharray?: string | number\n curveType?: AreaChartCurveType\n}\nexport interface BarChartSeries extends ChartSeries {\n stackId?: string\n}\nexport interface CompositeChartSeries extends ChartSeries {\n type: 'line' | 'area' | 'bar'\n strokeDasharray?: string | number\n}\n\nexport interface LineChartProps extends GridChartBaseProps {\n series: LineChartSeries[]\n type?: 'default' | 'gradient'\n gradientStops?: { offset: number; color: MantineColor }[]\n curveType?: LineChartCurveType\n fillOpacity?: number\n withDots?: boolean\n dotProps?: MantineChartDotProps\n activeDotProps?: MantineChartDotProps\n strokeWidth?: number\n lineChartProps?: ChartOptionProps\n connectNulls?: boolean\n lineProps?: ChartOptionProps | ((series: LineChartSeries) => ChartOptionProps)\n withPointLabels?: boolean\n}\nexport interface AreaChartProps extends GridChartBaseProps {\n series: AreaChartSeries[]\n type?: 'default' | 'stacked' | 'percent' | 'split'\n withGradient?: boolean\n curveType?: AreaChartCurveType\n withDots?: boolean\n dotProps?: MantineChartDotProps\n activeDotProps?: MantineChartDotProps\n strokeWidth?: number\n areaChartProps?: ChartOptionProps\n fillOpacity?: number\n splitColors?: [MantineColor, MantineColor]\n splitOffset?: number\n connectNulls?: boolean\n areaProps?: ChartOptionProps | ((series: AreaChartSeries) => ChartOptionProps)\n withPointLabels?: boolean\n}\nexport interface BarChartProps extends GridChartBaseProps {\n series: BarChartSeries[]\n type?: 'default' | 'stacked' | 'percent' | 'waterfall'\n fillOpacity?: number\n cursorFill?: MantineColor\n barChartProps?: ChartOptionProps\n barProps?: ChartOptionProps | ((series: BarChartSeries) => ChartOptionProps)\n withBarValueLabel?: boolean\n valueLabelProps?: ChartOptionProps | ((series: BarChartSeries) => ChartOptionProps)\n minBarSize?: number\n maxBarWidth?: number\n barLabelColor?: MantineColor\n getBarColor?: (value: number, series: BarChartSeries) => MantineColor\n}\nexport interface CompositeChartProps extends Omit<GridChartBaseProps, 'orientation'> {\n series: CompositeChartSeries[]\n curveType?: CompositeChartCurveType\n withDots?: boolean\n dotProps?: MantineChartDotProps\n activeDotProps?: MantineChartDotProps\n strokeWidth?: number\n connectNulls?: boolean\n lineProps?: ChartOptionProps | ((series: CompositeChartSeries) => ChartOptionProps)\n areaProps?: ChartOptionProps | ((series: CompositeChartSeries) => ChartOptionProps)\n barProps?: ChartOptionProps | ((series: CompositeChartSeries) => ChartOptionProps)\n withPointLabels?: boolean\n withBarValueLabel?: boolean\n minBarSize?: number\n maxBarWidth?: number\n composedChartProps?: ChartOptionProps\n}\n\nexport interface PieChartCell {\n name: string\n value: number\n color?: MantineColor\n}\nexport interface PieChartProps extends ChartRootProps {\n data: PieChartCell[]\n withTooltip?: boolean\n withLabels?: boolean\n withLabelsLine?: boolean\n labelsPosition?: 'inside' | 'outside'\n labelsType?: 'value' | 'percent'\n tooltipDataSource?: 'segment' | 'all'\n valueFormatter?: (value: number) => string\n strokeWidth?: number\n size?: number\n startAngle?: number\n endAngle?: number\n paddingAngle?: number\n pieProps?: ChartOptionProps\n tooltipProps?: ChartOptionProps\n}\nexport interface DonutChartProps extends PieChartProps {\n thickness?: number\n chartLabel?: string\n chartLabelColor?: MantineColor\n chartLabelFontSize?: number\n chartLabelProps?: ChartOptionProps\n}\n\nexport interface ScatterChartSeries extends ChartSeries {\n data?: ChartData\n}\nexport interface ScatterChartProps extends GridChartBaseProps {\n data: ChartData\n series: ScatterChartSeries[]\n xAxisKey?: string\n yAxisKey?: string\n scatterProps?: ChartOptionProps | ((series: ScatterChartSeries) => ChartOptionProps)\n}\nexport interface BubbleChartProps extends ChartRootProps {\n data: ChartData\n xAxisKey?: string\n yAxisKey?: string\n zAxisKey?: string\n name?: string\n color?: MantineColor\n range?: number\n withTooltip?: boolean\n withXAxis?: boolean\n withYAxis?: boolean\n xAxisProps?: ChartOptionProps\n yAxisProps?: ChartOptionProps\n tooltipProps?: ChartOptionProps\n gridProps?: ChartOptionProps\n valueFormatter?: (value: number) => string\n}\n\nexport interface RadarChartProps extends GridChartBaseProps {\n series: ChartSeries[]\n maxValue?: number\n withPolarGrid?: boolean\n withAngleAxis?: boolean\n withRadiusAxis?: boolean\n shape?: 'polygon' | 'circle'\n radarProps?: ChartOptionProps\n}\nexport interface RadialBarChartCell {\n name: string\n value: number\n color?: MantineColor\n}\nexport interface RadialBarChartProps extends ChartRootProps {\n data: RadialBarChartCell[]\n maxValue?: number\n withLabels?: boolean\n withLegend?: boolean\n withTooltip?: boolean\n startAngle?: number\n endAngle?: number\n barSize?: number\n radialBarProps?: ChartOptionProps\n tooltipProps?: ChartOptionProps\n legendProps?: ChartOptionProps\n}\nexport interface FunnelChartCell extends PieChartCell {\n label?: string\n}\nexport interface FunnelChartProps extends ChartRootProps {\n data: FunnelChartCell[]\n withTooltip?: boolean\n withLabels?: boolean\n withLegend?: boolean\n valueFormatter?: (value: number) => string\n funnelProps?: ChartOptionProps\n tooltipProps?: ChartOptionProps\n}\n\nexport interface TreemapData {\n name: string\n value?: number\n color?: MantineColor\n children?: TreemapData[]\n}\nexport interface TreemapProps extends ChartRootProps {\n data: TreemapData[]\n withTooltip?: boolean\n withLegend?: boolean\n valueFormatter?: (value: number) => string\n treemapProps?: ChartOptionProps\n}\nexport interface SankeyChartNode {\n name: string\n color?: MantineColor\n [key: string]: unknown\n}\nexport interface SankeyChartLink {\n source: string | number\n target: string | number\n value: number\n [key: string]: unknown\n}\nexport interface SankeyChartProps extends ChartRootProps {\n data?: SankeyChartNode[]\n nodes?: SankeyChartNode[]\n links: SankeyChartLink[]\n withTooltip?: boolean\n valueFormatter?: (value: number) => string\n sankeyProps?: ChartOptionProps\n}\n\nexport interface SparklineTrendColors {\n positive: MantineColor\n negative: MantineColor\n neutral?: MantineColor\n}\nexport interface SparklineProps extends ChartRootProps {\n data: (number | null)[]\n color?: MantineColor\n withGradient?: boolean\n fillOpacity?: number\n curveType?: LineChartCurveType\n strokeWidth?: number\n trendColors?: SparklineTrendColors\n connectNulls?: boolean\n areaProps?: ChartOptionProps\n}\nexport interface HeatmapRectData {\n date: string\n value: number | null\n}\nexport interface HeatmapProps extends ChartRootProps {\n data: Record<string, number>\n domain?: [number, number]\n startDate?: Date | string\n endDate?: Date | string\n withMonthLabels?: boolean\n monthLabels?: string[]\n withWeekdayLabels?: boolean\n weekdayLabels?: string[]\n withOutsideDates?: boolean\n firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6\n rectSize?: number\n gap?: number\n rectRadius?: number\n colors?: string[]\n weekdaysLabelsWidth?: number\n monthsLabelsHeight?: number\n fontSize?: number\n getTooltipLabel?: (input: HeatmapRectData) => VNodeChild\n withTooltip?: boolean\n tooltipProps?: ChartOptionProps\n getRectProps?: (input: HeatmapRectData) => Record<string, unknown>\n splitMonths?: boolean\n withLegend?: boolean\n legendLabels?: [string, string]\n}\n\nexport interface BarsListBarData {\n name: string\n value: number\n color?: MantineColor\n textColor?: MantineColor\n variant?: 'light' | 'filled'\n}\nexport interface BarsListProps extends ChartRootProps {\n data: BarsListBarData[]\n valueFormatter?: (value: number) => string\n barsLabel?: string\n valueLabel?: string\n getBarProps?: (data: BarsListBarData) => HTMLAttributes\n renderBar?: (data: BarsListBarData, defaultBar: VNodeChild) => VNodeChild\n barGap?: string | number\n minBarSize?: string | number\n barHeight?: string | number\n barColor?: MantineColor\n barTextColor?: MantineColor\n autoContrast?: boolean\n}\n\ntype PublicComponent<P> = DefineComponent<P>\nexport const AreaChart = createChartComponent('AreaChart', (p) =>\n cartesianOption(p, 'area'),\n) as PublicComponent<AreaChartProps>\nexport const BarChart = createChartComponent('BarChart', (p) =>\n cartesianOption(p, 'bar'),\n) as PublicComponent<BarChartProps>\nexport const LineChart = createChartComponent('LineChart', (p) =>\n cartesianOption(p, 'line'),\n) as PublicComponent<LineChartProps>\nexport const CompositeChart = createChartComponent('CompositeChart', (p) =>\n cartesianOption(p, 'composite'),\n) as PublicComponent<CompositeChartProps>\nexport const PieChart = createChartComponent('PieChart', (p) =>\n radialOption(p),\n) as PublicComponent<PieChartProps>\nexport const DonutChart = createChartComponent('DonutChart', (p) =>\n radialOption(p, true),\n) as PublicComponent<DonutChartProps>\nexport const ScatterChart = createChartComponent('ScatterChart', (p) =>\n scatterOption(p),\n) as PublicComponent<ScatterChartProps>\nexport const BubbleChart = createChartComponent('BubbleChart', (p) =>\n scatterOption(p, true),\n) as PublicComponent<BubbleChartProps>\nexport const RadarChart = createChartComponent(\n 'RadarChart',\n radarOption,\n) as PublicComponent<RadarChartProps>\nexport const RadialBarChart = createChartComponent(\n 'RadialBarChart',\n radialBarOption,\n) as PublicComponent<RadialBarChartProps>\nexport const FunnelChart = createChartComponent('FunnelChart', (p) =>\n simpleOption('funnel', p),\n) as PublicComponent<FunnelChartProps>\nexport const Treemap = createChartComponent('Treemap', (p) =>\n simpleOption('treemap', p),\n) as PublicComponent<TreemapProps>\nexport const SankeyChart = createChartComponent('SankeyChart', (p) =>\n simpleOption('sankey', p),\n) as PublicComponent<SankeyChartProps>\nexport const Sparkline = createChartComponent(\n 'Sparkline',\n sparklineOption,\n) as PublicComponent<SparklineProps>\nexport const Heatmap = createChartComponent(\n 'Heatmap',\n heatmapOption,\n) as PublicComponent<HeatmapProps>\nexport const BarsList = createChartComponent('BarsList', (p) =>\n cartesianOption(\n {\n ...p,\n dataKey: 'name',\n series: [{ name: 'value', color: p.barColor }],\n orientation: 'vertical',\n withXAxis: false,\n withYAxis: true,\n withTooltip: false,\n maxBarWidth: p.barHeight,\n },\n 'bar',\n ),\n) as PublicComponent<BarsListProps>\n\nexport type AreaChartStylesNames =\n | 'area'\n | import('./types').BaseChartStylesNames\n | ChartLegendStylesNames\n | ChartTooltipStylesNames\nexport type BarChartStylesNames =\n | 'bar'\n | import('./types').BaseChartStylesNames\n | ChartLegendStylesNames\n | ChartTooltipStylesNames\nexport type LineChartStylesNames =\n | 'line'\n | import('./types').BaseChartStylesNames\n | ChartLegendStylesNames\n | ChartTooltipStylesNames\nexport type CompositeChartStylesNames =\n | 'line'\n | 'area'\n | 'bar'\n | import('./types').BaseChartStylesNames\n | ChartLegendStylesNames\n | ChartTooltipStylesNames\nexport type PieChartStylesNames = 'root' | 'label'\nexport type DonutChartStylesNames = PieChartStylesNames\nexport type ScatterChartStylesNames =\n | import('./types').BaseChartStylesNames\n | ChartLegendStylesNames\n | ChartTooltipStylesNames\nexport type BubbleChartStylesNames = ScatterChartStylesNames\nexport type RadarChartStylesNames =\n | 'root'\n | 'container'\n | 'axis'\n | 'grid'\n | 'curve'\n | ChartLegendStylesNames\n | ChartTooltipStylesNames\nexport type RadialBarChartStylesNames =\n | 'root'\n | 'container'\n | 'label'\n | ChartLegendStylesNames\n | ChartTooltipStylesNames\nexport type FunnelChartStylesNames =\n | 'root'\n | 'container'\n | 'label'\n | ChartLegendStylesNames\n | ChartTooltipStylesNames\nexport type TreemapStylesNames = 'root' | 'container'\nexport type SankeyChartStylesNames = 'root' | 'container'\nexport type SparklineStylesNames = 'root'\nexport type HeatmapStylesNames =\n | 'root'\n | 'rect'\n | 'weekdayLabel'\n | 'monthLabel'\n | 'legend'\n | 'legendLabel'\n | 'legendRect'\nexport type BarsListStylesNames = 'root' | 'bar' | 'barLabel' | 'barValue' | 'labelsRow'\n\nexport type ChartTooltipStylesNames =\n | 'tooltip'\n | 'tooltipItem'\n | 'tooltipItemBody'\n | 'tooltipItemColor'\n | 'tooltipItemName'\n | 'tooltipItemData'\n | 'tooltipLabel'\n | 'tooltipBody'\nexport type ChartLegendStylesNames = 'legendItem' | 'legendItemColor' | 'legendItemName' | 'legend'\nexport type ChartCssVariables = Record<string, string>\n","import { computed, defineComponent, h, type PropType, type SlotsType, type VNodeChild } from 'vue'\nimport type { ChartRenderable, ChartSeries, ChartTooltipPayload } from '../types'\nimport { resolveColor } from '../internal/colors'\n\nexport interface ChartTooltipProps {\n label?: ChartRenderable\n payload?: readonly ChartTooltipPayload[]\n unit?: string\n type?: 'area' | 'radial' | 'scatter'\n segmentId?: string\n series?: ChartSeries[]\n valueFormatter?: (value: number) => ChartRenderable\n showColor?: boolean\n}\n\nexport interface ChartTooltipSlots {\n label?: () => VNodeChild\n valueFormatter?: (input: { value: number; item: ChartTooltipPayload }) => VNodeChild\n}\n\nexport const ChartTooltip = defineComponent({\n name: 'MantineChartTooltip',\n slots: Object as SlotsType<ChartTooltipSlots>,\n props: {\n label: null,\n payload: Array as PropType<readonly ChartTooltipPayload[]>,\n unit: String,\n type: { type: String as PropType<ChartTooltipProps['type']>, default: 'area' },\n segmentId: String,\n series: Array as PropType<ChartSeries[]>,\n valueFormatter: Function as PropType<(value: number) => ChartRenderable>,\n showColor: { type: Boolean, default: true },\n },\n setup(props, { slots }) {\n const labels = computed(() =>\n Object.fromEntries((props.series ?? []).map((item) => [item.name, item.label ?? item.name])),\n )\n return () => {\n const label = props.label !== undefined ? props.label : slots.label?.()\n const payload = props.segmentId\n ? props.payload?.filter(\n (item) => item.name === props.segmentId || item.dataKey === props.segmentId,\n )\n : props.payload\n if (!payload?.length) return null\n return h('div', { class: 'mantine-ChartTooltip-tooltip', 'data-type': props.type }, [\n label != null ? h('div', { class: 'mantine-ChartTooltip-tooltipLabel' }, [label]) : null,\n h(\n 'div',\n { class: 'mantine-ChartTooltip-tooltipBody' },\n payload.map((item) =>\n h('div', { class: 'mantine-ChartTooltip-tooltipItem' }, [\n h('div', { class: 'mantine-ChartTooltip-tooltipItemBody' }, [\n props.showColor\n ? h('span', {\n class: 'mantine-ChartTooltip-tooltipItemColor',\n style: { background: resolveColor(item.color) },\n })\n : null,\n h(\n 'span',\n { class: 'mantine-ChartTooltip-tooltipItemName' },\n labels.value[item.name ?? ''] ?? item.name,\n ),\n ]),\n h('span', { class: 'mantine-ChartTooltip-tooltipItemData' }, [\n props.valueFormatter\n ? props.valueFormatter(Number(item.value))\n : (slots.valueFormatter?.({ value: Number(item.value), item }) ??\n (item.value == null ? '' : String(item.value))),\n props.unit ?? item.unit ?? '',\n ]),\n ]),\n ),\n ),\n ])\n }\n },\n})\n","import { defineComponent, h, type PropType } from 'vue'\nimport type { ChartSeries } from '../types'\nimport { resolveColor } from '../internal/colors'\n\nexport interface ChartLegendPayload {\n dataKey?: string\n name?: string\n color?: string\n [key: string]: unknown\n}\nexport interface ChartLegendProps {\n payload?: readonly ChartLegendPayload[]\n onHighlight: (area: string | null) => void\n legendPosition: 'top' | 'bottom' | 'middle'\n series?: ChartSeries[]\n showColor?: boolean\n centered?: boolean\n}\n\nexport const ChartLegend = defineComponent({\n name: 'MantineChartLegend',\n props: {\n payload: Array as PropType<readonly ChartLegendPayload[]>,\n onHighlight: { type: Function as PropType<(area: string | null) => void>, required: true },\n legendPosition: {\n type: String as PropType<ChartLegendProps['legendPosition']>,\n required: true,\n },\n series: Array as PropType<ChartSeries[]>,\n showColor: { type: Boolean, default: true },\n centered: Boolean,\n },\n setup(props) {\n return () =>\n h(\n 'div',\n {\n class: 'mantine-ChartLegend-legend',\n 'data-position': props.legendPosition,\n 'data-centered': props.centered || undefined,\n onMouseleave: () => props.onHighlight(null),\n },\n props.payload?.map((item) => {\n const key = item.dataKey ?? item.name ?? ''\n const label = props.series?.find((s) => s.name === key)?.label ?? key\n return h(\n 'div',\n { class: 'mantine-ChartLegend-legendItem', onMouseenter: () => props.onHighlight(key) },\n [\n props.showColor\n ? h('span', {\n class: 'mantine-ChartLegend-legendItemColor',\n style: { background: resolveColor(item.color) },\n })\n : null,\n h('span', { class: 'mantine-ChartLegend-legendItemName' }, label),\n ],\n )\n }),\n )\n },\n})\n","import type { ChartSeries } from '../../types'\nexport function getSeriesLabels(series: ChartSeries[] | undefined): Record<string, string> {\n return Object.fromEntries((series ?? []).map((item) => [item.name, item.label ?? item.name]))\n}\n"],"mappings":";;;;;;;AAkCA,IAAI,aAAa;AAEjB,SAAgB,kBAAwB;CACtC,IAAI,YACF;CAGF,IAAI;EACF;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,aAAa;AACf;;;ACrEA,gBAAgB;AAIhB,SAAgB,qBAAqB,MAAc,aAAuC;CACxF,OAAO,gBAAgB;EACrB,MAAM,UAAU;EAChB,cAAc;EACd,OAAO;GACL,QAAQ;GACR,QAAQ;IAAE,MAAM,CAAC,QAAQ,MAAM;IAAG,SAAS;GAAI;GAC/C,OAAO;IAAE,MAAM,CAAC,QAAQ,MAAM;IAAG,SAAS;GAAO;GACjD,SAAS;GACT,YAAY;IAAE,MAAM;IAAS,SAAS;GAAK;GAC3C,UAAU;IAAE,MAAM;IAAsC,SAAS;GAAS;GAC1E,aAAa;EACf;EACA,OAAO;GAAC;GAAS;GAAY;GAAa;GAAY;GAAuB;EAAU;EACvF,MAAM,OAAO,EAAE,OAAO,MAAM,UAAU;GACpC,MAAM,QAAQ,IAAiC;GAC/C,MAAM,SAAS,gBAAgB;IAAE,GAAG,YAAY,KAAK;IAAG,GAAG,MAAM;GAAO,EAAE;GAC1E,OAAO;IACL,0BAA0B,MAAM,OAAO;IACvC,cAAc,MAAM,OAAO,OAAO;IAClC,YAAY,SAAwB,MAAM,OAAO,UAAU,IAAI;GACjE,CAAC;GACD,MAAM,QAAQ,UAA4B,OAAO,UAAU,WAAW,GAAG,MAA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;CACZ;CACA,MAAM,OAAO;EACX,aACE,EACE,OACA;GACE,OAAO;GACP,iBAAiB,MAAM;GACvB,iBAAiB,MAAM,YAAY,KAAA;GACnC,oBAAoB,MAAM,YAAY,IAAI;EAC5C,GACA,MAAM,SAAS,KAAK,SAAS;GAC3B,MAAM,MAAM,KAAK,WAAW,KAAK,QAAQ;GACzC,MAAM,QAAQ,MAAM,QAAQ,MAAM,MAAM,EAAE,SAAS,GAAG,GAAG,SAAS;GAClE,OAAO,EACL,OACA;IAAE,OAAO;IAAkC,oBAAoB,MAAM,YAAY,GAAG;GAAE,GACtF,CACE,MAAM,YACF,EAAE,QAAQ;IACR,OAAO;IACP,OAAO,EAAE,YAAY,aAAa,KAAK,KAAK,EAAE;GAChD,CAAC,IACD,MACJ,EAAE,QAAQ,EAAE,OAAO,qCAAqC,GAAG,KAAK,CAClE,CACF;EACF,CAAC,CACH;CACJ;AACF,CAAC;;;AC5DD,SAAgB,gBAAgB,QAA2D;CACzF,OAAO,OAAO,aAAa,UAAU,CAAC,GAAG,KAAK,SAAS,CAAC,KAAK,MAAM,KAAK,SAAS,KAAK,IAAI,CAAC,CAAC;AAC9F"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/internal/echarts.ts","../src/internal/component.ts","../src/internal/colors.ts","../src/internal/options.ts","../src/charts.ts","../src/ChartTooltip/ChartTooltip.ts","../src/ChartLegend/ChartLegend.ts","../src/utils/get-series-labels/get-series-labels.ts"],"sourcesContent":["import { use } from 'echarts/core'\nimport {\n BarChart as EBarChart,\n CandlestickChart as ECandlestickChart,\n EffectScatterChart,\n FunnelChart as EFunnelChart,\n GaugeChart,\n GraphChart,\n HeatmapChart as EHeatmapChart,\n LineChart as ELineChart,\n PieChart as EPieChart,\n RadarChart as ERadarChart,\n SankeyChart as ESankeyChart,\n ScatterChart as EScatterChart,\n TreemapChart as ETreemapChart,\n} from 'echarts/charts'\nimport {\n AriaComponent,\n CalendarComponent,\n DatasetComponent,\n DataZoomComponent,\n GraphicComponent,\n GridComponent,\n LegendComponent,\n MarkLineComponent,\n MarkAreaComponent,\n MarkPointComponent,\n PolarComponent,\n RadarComponent,\n TitleComponent,\n ToolboxComponent,\n TooltipComponent,\n TransformComponent,\n VisualMapComponent,\n} from 'echarts/components'\nimport { CanvasRenderer, SVGRenderer } from 'echarts/renderers'\n\nlet registered = false\n\nexport function registerECharts(): void {\n if (registered) {\n return\n }\n\n use([\n EBarChart,\n ECandlestickChart,\n EffectScatterChart,\n EFunnelChart,\n GaugeChart,\n GraphChart,\n EHeatmapChart,\n ELineChart,\n EPieChart,\n ERadarChart,\n ESankeyChart,\n EScatterChart,\n ETreemapChart,\n AriaComponent,\n CalendarComponent,\n DatasetComponent,\n DataZoomComponent,\n GraphicComponent,\n GridComponent,\n LegendComponent,\n MarkLineComponent,\n MarkAreaComponent,\n MarkPointComponent,\n PolarComponent,\n RadarComponent,\n TitleComponent,\n ToolboxComponent,\n TooltipComponent,\n TransformComponent,\n VisualMapComponent,\n CanvasRenderer,\n SVGRenderer,\n ])\n\n registered = true\n}\n","import { computed, defineComponent, h, ref, type Component, type PropType } from 'vue'\nimport type { EChartsOption } from 'echarts'\nimport VChart from 'vue-echarts'\nimport { registerECharts } from './echarts'\n\nregisterECharts()\n\nexport type OptionBuilder = (props: Record<string, unknown>) => EChartsOption\n\nexport function createChartComponent(name: string, buildOption: OptionBuilder): Component {\n return defineComponent({\n name: `Mantine${name}`,\n inheritAttrs: false,\n props: {\n option: Object as PropType<EChartsOption>,\n height: { type: [Number, String], default: 300 },\n width: { type: [Number, String], default: '100%' },\n loading: Boolean,\n autoresize: { type: Boolean, default: true },\n renderer: { type: String as PropType<'canvas' | 'svg'>, default: 'canvas' },\n initOptions: Object as PropType<Record<string, unknown>>,\n },\n emits: ['click', 'dblclick', 'mouseover', 'mouseout', 'legendselectchanged', 'datazoom'],\n setup(props, { attrs, emit, expose }) {\n const chart = ref<InstanceType<typeof VChart>>()\n const option = computed(() => ({ ...buildOption(attrs), ...props.option }))\n expose({\n getEchartsInstance: () => chart.value?.chart,\n resize: () => chart.value?.resize(),\n setOption: (next: EChartsOption) => chart.value?.setOption(next),\n })\n const size = (value: string | number) => (typeof value === 'number' ? `${value}px` : value)\n const rootAttributes = computed(() =>\n Object.fromEntries(\n Object.entries(attrs).filter(\n ([key]) =>\n ['id', 'dir', 'role', 'tabindex', 'title'].includes(key) ||\n key.startsWith('aria-') ||\n (key.startsWith('data-') && key !== 'data'),\n ),\n ),\n )\n return () =>\n h(\n 'div',\n {\n ...rootAttributes.value,\n class: ['mantine-Chart-root', `mantine-${name}-root`, attrs.class],\n style: [{ width: size(props.width), height: size(props.height) }, attrs.style],\n },\n [\n h(VChart, {\n ref: chart,\n option: option.value,\n autoresize: props.autoresize,\n loading: props.loading,\n initOptions: { ...props.initOptions, renderer: props.renderer },\n class: 'mantine-Chart-container',\n onClick: (event: unknown) => emit('click', event),\n onDblclick: (event: unknown) => emit('dblclick', event),\n onMouseover: (event: unknown) => emit('mouseover', event),\n onMouseout: (event: unknown) => emit('mouseout', event),\n onLegendselectchanged: (event: unknown) => emit('legendselectchanged', event),\n onDatazoom: (event: unknown) => emit('datazoom', event),\n }),\n ],\n )\n },\n })\n}\n","const shadeMap: Record<string, string[]> = {\n blue: [\n '#e7f5ff',\n '#d0ebff',\n '#a5d8ff',\n '#74c0fc',\n '#4dabf7',\n '#339af0',\n '#228be6',\n '#1c7ed6',\n '#1971c2',\n '#1864ab',\n ],\n cyan: [\n '#e3fafc',\n '#c5f6fa',\n '#99e9f2',\n '#66d9e8',\n '#3bc9db',\n '#22b8cf',\n '#15aabf',\n '#1098ad',\n '#0c8599',\n '#0b7285',\n ],\n green: [\n '#ebfbee',\n '#d3f9d8',\n '#b2f2bb',\n '#8ce99a',\n '#69db7c',\n '#51cf66',\n '#40c057',\n '#37b24d',\n '#2f9e44',\n '#2b8a3e',\n ],\n grape: [\n '#f8f0fc',\n '#f3d9fa',\n '#eebefa',\n '#e599f7',\n '#da77f2',\n '#cc5de8',\n '#be4bdb',\n '#ae3ec9',\n '#9c36b5',\n '#862e9c',\n ],\n gray: [\n '#f8f9fa',\n '#f1f3f5',\n '#e9ecef',\n '#dee2e6',\n '#ced4da',\n '#adb5bd',\n '#868e96',\n '#495057',\n '#343a40',\n '#212529',\n ],\n orange: [\n '#fff4e6',\n '#ffe8cc',\n '#ffd8a8',\n '#ffc078',\n '#ffa94d',\n '#ff922b',\n '#fd7e14',\n '#f76707',\n '#e8590c',\n '#d9480f',\n ],\n pink: [\n '#fff0f6',\n '#ffdeeb',\n '#fcc2d7',\n '#faa2c1',\n '#f783ac',\n '#f06595',\n '#e64980',\n '#d6336c',\n '#c2255c',\n '#a61e4d',\n ],\n red: [\n '#fff5f5',\n '#ffe3e3',\n '#ffc9c9',\n '#ffa8a8',\n '#ff8787',\n '#ff6b6b',\n '#fa5252',\n '#f03e3e',\n '#e03131',\n '#c92a2a',\n ],\n teal: [\n '#e6fcf5',\n '#c3fae8',\n '#96f2d7',\n '#63e6be',\n '#38d9a9',\n '#20c997',\n '#12b886',\n '#0ca678',\n '#099268',\n '#087f5b',\n ],\n violet: [\n '#f3f0ff',\n '#e5dbff',\n '#d0bfff',\n '#b197fc',\n '#9775fa',\n '#845ef7',\n '#7950f2',\n '#7048e8',\n '#6741d9',\n '#5f3dc4',\n ],\n yellow: [\n '#fff9db',\n '#fff3bf',\n '#ffec99',\n '#ffe066',\n '#ffd43b',\n '#fcc419',\n '#fab005',\n '#f59f00',\n '#f08c00',\n '#e67700',\n ],\n}\n\nexport function resolveColor(color: unknown, fallback = '#228be6'): string {\n if (typeof color !== 'string' || !color) return fallback\n const [name, rawShade] = color.split('.')\n const shade = Number(rawShade ?? 6)\n return shadeMap[name]?.[Number.isInteger(shade) ? shade : 6] ?? color\n}\n","import type { EChartsOption, SeriesOption } from 'echarts'\nimport type {\n ChartDataItem,\n ChartReferenceAreaProps,\n ChartReferenceDotProps,\n ChartReferenceLineProps,\n ChartSeries,\n} from '../types'\nimport { resolveColor } from './colors'\n\ntype Props = Record<string, unknown>\n\nconst bool = (value: unknown, fallback: boolean) => (typeof value === 'boolean' ? value : fallback)\nconst num = (value: unknown, fallback: number) => (typeof value === 'number' ? value : fallback)\nconst obj = (value: unknown) => (value && typeof value === 'object' ? value : {})\nconst list = <T>(value: unknown): T[] => (Array.isArray(value) ? (value as T[]) : [])\nconst formatter = (props: Props) =>\n typeof props.valueFormatter === 'function'\n ? (props.valueFormatter as (value: number) => string)\n : undefined\n\nfunction tooltip(props: Props): EChartsOption['tooltip'] {\n if (!bool(props.withTooltip, true)) return { show: false }\n const format = formatter(props)\n return {\n trigger: 'axis',\n transitionDuration: num(props.tooltipAnimationDuration, 0) / 1000,\n valueFormatter: format ? (value) => format(Number(value)) : undefined,\n ...obj(props.tooltipProps),\n }\n}\n\nfunction markLine(referenceLines: ChartReferenceLineProps[] | undefined) {\n if (!referenceLines?.length) return undefined\n return {\n silent: true,\n symbol: 'none',\n data: referenceLines.map((line) => ({\n xAxis: line.x,\n yAxis: line.y,\n label: typeof line.label === 'string' ? { formatter: line.label } : line.label,\n lineStyle: {\n color: resolveColor(line.color, '#868e96'),\n type: line.strokeDasharray ? 'dashed' : 'solid',\n },\n })),\n }\n}\n\nfunction markArea(referenceAreas: ChartReferenceAreaProps[] | undefined) {\n if (!referenceAreas?.length) return undefined\n return {\n silent: true,\n data: referenceAreas.map((area) => [\n {\n xAxis: area.x1,\n yAxis: area.y1,\n itemStyle: { color: resolveColor(area.color, '#868e96'), opacity: 0.15 },\n label: typeof area.label === 'string' ? { formatter: area.label } : area.label,\n },\n { xAxis: area.x2, yAxis: area.y2 },\n ]),\n }\n}\n\nfunction markPoint(referenceDots: ChartReferenceDotProps[] | undefined) {\n if (!referenceDots?.length) return undefined\n return {\n silent: true,\n data: referenceDots.map((dot) => ({\n coord: [dot.x, dot.y],\n symbolSize: (dot.r ?? 6) * 2,\n itemStyle: { color: resolveColor(dot.color, '#868e96') },\n label: typeof dot.label === 'string' ? { formatter: dot.label } : dot.label,\n })),\n }\n}\n\nexport function cartesianOption(\n props: Props,\n kind: 'line' | 'area' | 'bar' | 'composite',\n): EChartsOption {\n const data = list<ChartDataItem>(props.data)\n const series = list<\n ChartSeries & {\n type?: string\n stackId?: string\n strokeDasharray?: string | number\n curveType?: string\n }\n >(props.series)\n const dataKey = String(props.dataKey ?? 'name')\n const horizontal = props.orientation !== 'vertical'\n const chartType = String(props.type ?? 'default')\n const category = data.map((item) => item[dataKey] as string | number)\n const commonAxis = { axisLabel: { color: resolveColor(props.textColor, '#868e96') } }\n const categoryAxis = { type: 'category' as const, data: category, ...commonAxis }\n const valueAxis = { type: 'value' as const, name: props.yAxisLabel as string, ...commonAxis }\n const mapped = series.map((item, index) => {\n const itemKind = kind === 'composite' ? (item.type ?? 'line') : kind === 'area' ? 'line' : kind\n const color = resolveColor(item.color, resolveColor(`blue.${6 + (index % 3)}`))\n const stack =\n chartType === 'stacked' || chartType === 'percent' || chartType === 'stream'\n ? 'stack'\n : item.stackId\n const base = {\n name: item.label ?? item.name,\n data: data.map((entry) => entry[item.name] as number | null),\n yAxisIndex: item.yAxisId ? 1 : 0,\n stack,\n markLine:\n index === 0\n ? markLine(props.referenceLines as ChartReferenceLineProps[] | undefined)\n : undefined,\n markArea:\n index === 0\n ? markArea(props.referenceAreas as ChartReferenceAreaProps[] | undefined)\n : undefined,\n markPoint:\n index === 0\n ? markPoint(props.referenceDots as ChartReferenceDotProps[] | undefined)\n : undefined,\n }\n if (itemKind === 'bar') {\n return {\n ...base,\n type: 'bar',\n barMaxWidth: props.maxBarWidth as number,\n barMinHeight: num(props.minBarSize, 0),\n itemStyle: { color, opacity: num(props.fillOpacity, 1) },\n label: {\n show: bool(props.withBarValueLabel, false),\n position: horizontal ? 'top' : 'right',\n },\n }\n }\n return {\n ...base,\n type: 'line',\n smooth: !['linear', 'step', 'stepBefore', 'stepAfter'].includes(\n String(props.curveType ?? item.curveType ?? 'monotone'),\n ),\n step: String(props.curveType).startsWith('step') ? 'middle' : false,\n connectNulls: bool(props.connectNulls, true),\n showSymbol: bool(props.withDots, true),\n symbolSize: 6,\n lineStyle: {\n color,\n width: chartType === 'stream' ? 0 : num(props.strokeWidth, 2),\n type: item.strokeDasharray ? 'dashed' : 'solid',\n },\n itemStyle: { color, opacity: num(props.fillOpacity, 1) },\n areaStyle: itemKind === 'area' ? { color, opacity: num(props.fillOpacity, 0.2) } : undefined,\n label: { show: bool(props.withPointLabels, false), position: 'top' },\n }\n }) as unknown as SeriesOption[]\n\n if (kind === 'area' && chartType === 'stream') {\n mapped.unshift({\n type: 'line',\n stack: 'stack',\n silent: true,\n symbol: 'none',\n data: data.map(\n (entry) =>\n -series.reduce((total, item) => {\n const value = entry[item.name]\n return total + (typeof value === 'number' && Number.isFinite(value) ? value : 0)\n }, 0) / 2,\n ),\n lineStyle: { opacity: 0 },\n areaStyle: { opacity: 0 },\n tooltip: { show: false },\n } as SeriesOption)\n }\n\n return {\n animationDurationUpdate: num(props.tooltipAnimationDuration, 0),\n color: series.map((item) => resolveColor(item.color)),\n grid: {\n left: 48,\n right: bool(props.withRightYAxis, false) ? 48 : 16,\n top: bool(props.withLegend, false) ? 44 : 16,\n bottom: 38,\n containLabel: true,\n ...obj(props.gridProps),\n },\n legend: { show: bool(props.withLegend, false), ...obj(props.legendProps) },\n tooltip: tooltip(props),\n xAxis: horizontal\n ? {\n ...categoryAxis,\n show: bool(props.withXAxis, true),\n name: props.xAxisLabel as string,\n ...obj(props.xAxisProps),\n }\n : { ...valueAxis, show: bool(props.withXAxis, true), ...obj(props.xAxisProps) },\n yAxis: horizontal\n ? [\n {\n ...valueAxis,\n show: chartType === 'stream' ? false : bool(props.withYAxis, true),\n ...obj(props.yAxisProps),\n },\n {\n ...valueAxis,\n show: bool(props.withRightYAxis, false),\n position: 'right',\n name: props.rightYAxisLabel as string,\n ...obj(props.rightYAxisProps),\n },\n ]\n : { ...categoryAxis, show: bool(props.withYAxis, true), ...obj(props.yAxisProps) },\n series: mapped,\n }\n}\n\nexport function radialOption(props: Props, donut = false): EChartsOption {\n const data = list<{ name: string; value: number; color?: string }>(props.data)\n return {\n color: data.map((item) => resolveColor(item.color)),\n legend: {\n show: bool(props.withLabels, false) || bool(props.withLegend, false),\n ...obj(props.legendProps),\n },\n tooltip: { trigger: 'item', show: bool(props.withTooltip, true), ...obj(props.tooltipProps) },\n series: [\n {\n type: 'pie',\n radius: donut ? [`${num(props.thickness, 40)}%`, '75%'] : ['0%', '75%'],\n startAngle: num(props.startAngle, 90),\n minAngle: num(props.minAngle, 0),\n padAngle: num(props.paddingAngle, 0),\n roseType:\n props.type === 'pie'\n ? undefined\n : props.type === 'donut'\n ? undefined\n : (props.type as 'radius' | 'area'),\n label: {\n show: bool(props.withLabels, false),\n formatter: props.withLabelsLine ? '{b}: {d}%' : '{b}',\n },\n labelLine: { show: bool(props.withLabelsLine, false) },\n data: data.map((item) => ({ ...item, itemStyle: { color: resolveColor(item.color) } })),\n },\n ],\n graphic: props.chartLabel\n ? [\n {\n type: 'text',\n left: 'center',\n top: 'middle',\n style: {\n text: String(props.chartLabel),\n fill: resolveColor(props.chartLabelColor, '#212529'),\n fontSize: num(props.chartLabelFontSize, 18),\n },\n },\n ]\n : undefined,\n }\n}\n\nexport function scatterOption(props: Props, bubble = false): EChartsOption {\n const data = list<ChartDataItem>(props.data)\n const series = list<ChartSeries>(props.series)\n const xKey = String(props.dataKey ?? props.xAxisKey ?? 'x')\n const yKey = String(props.yAxisKey ?? 'y')\n const zKey = String(props.zAxisKey ?? 'z')\n return {\n grid: { containLabel: true, ...obj(props.gridProps) },\n legend: { show: bool(props.withLegend, false), ...obj(props.legendProps) },\n tooltip: { trigger: 'item', show: bool(props.withTooltip, true), ...obj(props.tooltipProps) },\n xAxis: { type: 'value', show: bool(props.withXAxis, true), ...obj(props.xAxisProps) },\n yAxis: props.withRightYAxis\n ? [\n {\n type: 'value',\n show: bool(props.withYAxis, true),\n name: props.yAxisLabel as string,\n ...obj(props.yAxisProps),\n },\n {\n type: 'value',\n show: true,\n position: 'right',\n name: props.rightYAxisLabel as string,\n ...obj(props.rightYAxisProps),\n },\n ]\n : {\n type: 'value',\n show: bool(props.withYAxis, true),\n name: props.yAxisLabel as string,\n ...obj(props.yAxisProps),\n },\n series: (series.length\n ? series\n : [{ name: String(props.name ?? 'value'), color: props.color as string }]\n ).map((item, index) => ({\n type: 'scatter',\n name: item.label ?? item.name,\n yAxisIndex: item.yAxisId === 'right' ? 1 : 0,\n data: data\n .filter((entry) => !entry.name || entry.name === item.name)\n .map((entry) => [entry[xKey], entry[yKey], entry[zKey], entry]),\n symbolSize: bubble\n ? (value: unknown[]) => Math.max(4, Math.sqrt(Number(value[2] ?? 1)) * num(props.range, 4))\n : num(props.size, 10),\n itemStyle: { color: resolveColor(item.color) },\n markLine:\n index === 0\n ? markLine(props.referenceLines as ChartReferenceLineProps[] | undefined)\n : undefined,\n markArea:\n index === 0\n ? markArea(props.referenceAreas as ChartReferenceAreaProps[] | undefined)\n : undefined,\n markPoint:\n index === 0\n ? markPoint(props.referenceDots as ChartReferenceDotProps[] | undefined)\n : undefined,\n })) as unknown as SeriesOption[],\n }\n}\n\nexport function gaugeOption(props: Props): EChartsOption {\n const min = num(props.min, 0)\n const max = num(props.max, 100)\n const value = num(props.value, min)\n const sections = list<{ value: number; color: string }>(props.sections)\n const range = max - min || 1\n const axisColors: [number, string][] = sections.length\n ? sections.map((section) => [\n Math.max(0, Math.min(1, (section.value - min) / range)),\n resolveColor(section.color),\n ])\n : [[1, resolveColor(props.trackColor, '#e9ecef')]]\n const format =\n typeof props.valueFormatter === 'function'\n ? (props.valueFormatter as (input: number) => string)\n : (input: number) => String(input)\n\n return {\n series: [\n {\n type: 'gauge',\n min,\n max,\n startAngle: 90 - num(props.startAngle, -120),\n endAngle: 90 - num(props.endAngle, 120),\n radius: '90%',\n axisLine: {\n lineStyle: {\n width: num(props.thickness, 12),\n color: axisColors,\n },\n },\n progress: sections.length\n ? { show: false }\n : {\n show: true,\n width: num(props.thickness, 12),\n roundCap: bool(props.roundCaps, false),\n itemStyle: { color: resolveColor(props.filledColor) },\n },\n pointer:\n typeof props.target === 'number'\n ? {\n show: true,\n width: num(props.targetSize, 2),\n length: '85%',\n itemStyle: { color: resolveColor(props.targetColor, '#212529') },\n }\n : { show: false },\n axisTick: { show: false },\n splitLine: { show: false },\n axisLabel: { show: false },\n anchor: { show: false },\n title: { show: false },\n detail: {\n show: props.label !== null,\n formatter: typeof props.label === 'string' ? props.label : format(value),\n color: 'inherit',\n },\n data: [{ value: typeof props.target === 'number' ? props.target : value }],\n },\n ] as unknown as SeriesOption[],\n }\n}\n\nfunction normalizeSegmentValue(value: number) {\n return Number.isFinite(value) ? Math.max(0, value) : 0\n}\n\nexport function waffleOption(props: Props): EChartsOption {\n const rows = Math.max(1, num(props.rows, 10))\n const columns = Math.max(1, num(props.columns, 10))\n const cellCount = rows * columns\n const data = list<{ name: string; value: number; color: string; key?: string | number }>(\n props.data,\n )\n const values = data.map((item) => normalizeSegmentValue(item.value))\n const sum = values.reduce((total, value) => total + value, 0)\n const denominator = props.total == null ? sum : Math.max(num(props.total, sum), sum)\n const filledTarget = denominator ? Math.round((sum / denominator) * cellCount) : 0\n const allocated = values.map((value) => (sum ? Math.floor((value / sum) * filledTarget) : 0))\n let remainder = filledTarget - allocated.reduce((total, value) => total + value, 0)\n const fractions = values\n .map((value, index) => ({\n index,\n fraction: sum ? (value / sum) * filledTarget - allocated[index] : 0,\n }))\n .sort((a, b) => b.fraction - a.fraction)\n\n for (let index = 0; index < fractions.length && remainder > 0; index += 1, remainder -= 1) {\n allocated[fractions[index].index] += 1\n }\n\n const cells = data.flatMap((_, segmentIndex) =>\n Array.from({ length: allocated[segmentIndex] }, () => segmentIndex),\n )\n while (cells.length < cellCount) cells.push(-1)\n\n const direction = String(props.fillDirection ?? 'left-to-right')\n const points = cells.map((segmentIndex, index) => {\n let x = index % columns\n let y = Math.floor(index / columns)\n if (direction === 'right-to-left') x = columns - 1 - x\n if (direction === 'top-to-bottom' || direction === 'bottom-to-top') {\n x = Math.floor(index / rows)\n y = index % rows\n if (direction === 'bottom-to-top') y = rows - 1 - y\n }\n const item = data[segmentIndex]\n return {\n value: [x, y, segmentIndex],\n name: item?.name,\n itemStyle: {\n color: item ? resolveColor(item.color) : resolveColor(props.emptyColor, '#e9ecef'),\n },\n }\n })\n\n return {\n grid: { left: 0, right: 0, top: 0, bottom: bool(props.withLegend, true) ? 36 : 0 },\n xAxis: { type: 'value', min: -0.5, max: columns - 0.5, show: false },\n yAxis: { type: 'value', min: -0.5, max: rows - 0.5, inverse: true, show: false },\n legend: {\n show: bool(props.withLegend, true),\n data: data.map((item) => item.name),\n top: props.legendPosition === 'top' ? 0 : undefined,\n bottom: props.legendPosition === 'bottom' ? 0 : undefined,\n left: props.legendPosition === 'left' ? 0 : undefined,\n right: props.legendPosition === 'right' ? 0 : undefined,\n },\n tooltip: {\n show: bool(props.withTooltip, false),\n formatter: (params: any) => {\n const item = data[params.value?.[2]]\n if (!item) return ''\n return typeof props.getTooltipLabel === 'function'\n ? String(\n (props.getTooltipLabel as (input: Record<string, unknown>) => unknown)({\n ...item,\n count: allocated[params.value[2]],\n }),\n )\n : `${item.name}: ${item.value}`\n },\n },\n series: [\n { type: 'scatter', symbol: 'roundRect', symbolSize: num(props.cellSize, 20), data: points },\n ],\n }\n}\n\nexport function matrixOption(props: Props): EChartsOption {\n const data = list<{ x: string; y: string; value: number | null }>(props.data)\n const xLabels = list<string>(props.xLabels).length\n ? list<string>(props.xLabels)\n : [...new Set(data.map((cell) => cell.x))]\n const yLabels = list<string>(props.yLabels).length\n ? list<string>(props.yLabels)\n : [...new Set(data.map((cell) => cell.y))]\n const values = data.flatMap((cell) => (typeof cell.value === 'number' ? [cell.value] : []))\n const domain =\n (props.domain as [number, number] | undefined) ??\n ([Math.min(0, ...values), Math.max(1, ...values)] as [number, number])\n const colors = list<string>(props.colors).length\n ? list<string>(props.colors).map((color) => resolveColor(color))\n : ['#ebfbee', '#8ce99a', '#40c057', '#2b8a3e']\n\n return {\n grid: {\n left: bool(props.withYLabels, false) ? num(props.yLabelsWidth, 60) : 0,\n right: 0,\n top:\n props.xLabelsPosition === 'top' && bool(props.withXLabels, false)\n ? num(props.xLabelsHeight, 60)\n : 0,\n bottom:\n props.xLabelsPosition !== 'top' && bool(props.withXLabels, false)\n ? num(props.xLabelsHeight, 60)\n : bool(props.withLegend, false)\n ? 30\n : 0,\n },\n xAxis: {\n type: 'category',\n data: xLabels,\n position: props.xLabelsPosition === 'top' ? 'top' : 'bottom',\n show: bool(props.withXLabels, false),\n axisLabel: { rotate: num(props.xLabelsRotation, -90), fontSize: num(props.fontSize, 12) },\n },\n yAxis: {\n type: 'category',\n data: yLabels,\n inverse: true,\n show: bool(props.withYLabels, false),\n axisLabel: { fontSize: num(props.fontSize, 12) },\n },\n visualMap: {\n show: bool(props.withLegend, false),\n min: domain[0],\n max: domain[1],\n inRange: { color: colors },\n orient: 'horizontal',\n left: 'center',\n bottom: 0,\n text: (props.legendLabels as string[] | undefined) ?? ['More', 'Less'],\n },\n tooltip: {\n show: bool(props.withTooltip, false) && typeof props.getTooltipLabel === 'function',\n formatter: (params: any) => {\n const cell = data[params.dataIndex]\n return String(\n (props.getTooltipLabel as ((input: typeof cell) => unknown) | undefined)?.(cell) ?? '',\n )\n },\n ...obj(props.tooltipProps),\n },\n series: [\n {\n type: 'heatmap',\n data: data.map((cell) => {\n const extra =\n typeof props.getCellProps === 'function'\n ? (props.getCellProps as (input: typeof cell) => Record<string, unknown>)(cell)\n : {}\n const empty = cell.value === null || !Number.isFinite(cell.value)\n return {\n value: [xLabels.indexOf(cell.x), yLabels.indexOf(cell.y), cell.value, cell],\n ...extra,\n itemStyle: {\n ...(empty && props.emptyColor\n ? { color: resolveColor(props.emptyColor as string) }\n : {}),\n ...obj(extra.itemStyle),\n },\n }\n }),\n itemStyle: {\n borderWidth: num(props.gap, 1),\n borderColor: 'transparent',\n borderRadius: num(props.cellRadius, 2),\n },\n },\n ] as unknown as SeriesOption[],\n }\n}\n\nexport function candlestickOption(props: Props): EChartsOption {\n const data = list<Record<string, unknown>>(props.data)\n const keys = {\n open: 'open',\n high: 'high',\n low: 'low',\n close: 'close',\n ...obj(props.dataKeys),\n } as Record<string, string>\n const dataKey = String(props.dataKey ?? 'date')\n\n return {\n grid: {\n left: 48,\n right: 16,\n top: 16,\n bottom: 38,\n containLabel: true,\n ...obj(props.gridProps),\n },\n tooltip: { trigger: 'axis', show: bool(props.withTooltip, true), ...obj(props.tooltipProps) },\n xAxis: {\n type: 'category',\n data: data.map((item) => String(item[dataKey] ?? '')),\n show: bool(props.withXAxis, true),\n name: props.xAxisLabel as string,\n ...obj(props.xAxisProps),\n },\n yAxis: {\n type: 'value',\n scale: true,\n show: bool(props.withYAxis, true),\n name: props.yAxisLabel as string,\n ...obj(props.yAxisProps),\n },\n series: [\n {\n type: 'candlestick',\n data: data.map((item) => [\n item[keys.open],\n item[keys.close],\n item[keys.low],\n item[keys.high],\n ]),\n barMaxWidth: props.maxCandleWidth as number,\n itemStyle: {\n color: resolveColor(props.upColor, '#12b886'),\n color0: resolveColor(props.downColor, '#fa5252'),\n borderColor: resolveColor(props.upColor, '#12b886'),\n borderColor0: resolveColor(props.downColor, '#fa5252'),\n borderWidth: num(props.candleStrokeWidth, 1),\n },\n markLine: markLine(props.referenceLines as ChartReferenceLineProps[] | undefined),\n markArea: markArea(props.referenceAreas as ChartReferenceAreaProps[] | undefined),\n markPoint: markPoint(props.referenceDots as ChartReferenceDotProps[] | undefined),\n },\n ] as unknown as SeriesOption[],\n }\n}\n\nexport function sparklineOption(props: Props): EChartsOption {\n const data = list<number | null>(props.data)\n const trend = props.trendColors as\n | { positive?: string; negative?: string; neutral?: string }\n | undefined\n const color = trend\n ? resolveColor(\n data.at(-1)! > data[0]!\n ? trend.positive\n : data.at(-1)! < data[0]!\n ? trend.negative\n : trend.neutral,\n )\n : resolveColor(props.color)\n return {\n grid: { left: 0, right: 0, top: 1, bottom: 1 },\n xAxis: { type: 'category', show: false },\n yAxis: { type: 'value', show: false, scale: true },\n series: [\n {\n type: 'line',\n data,\n showSymbol: false,\n connectNulls: bool(props.connectNulls, true),\n smooth: props.curveType !== 'linear',\n lineStyle: { color, width: num(props.strokeWidth, 2) },\n areaStyle: bool(props.withGradient, true)\n ? { color, opacity: num(props.fillOpacity, 0.6) }\n : undefined,\n },\n ],\n }\n}\n\nexport function radarOption(props: Props): EChartsOption {\n const data = list<ChartDataItem>(props.data)\n const series = list<ChartSeries>(props.series)\n const key = String(props.dataKey ?? 'name')\n const max = num(\n props.maxValue,\n Math.max(1, ...data.flatMap((row) => series.map((s) => Number(row[s.name] ?? 0)))),\n )\n return {\n legend: { show: bool(props.withLegend, false) },\n tooltip: { show: bool(props.withTooltip, true) },\n radar: {\n indicator: data.map((row) => ({ name: String(row[key]), max })),\n shape: props.shape === 'circle' ? 'circle' : 'polygon',\n },\n series: [\n {\n type: 'radar',\n data: series.map((s) => ({\n name: s.label ?? s.name,\n value: data.map((row) => Number(row[s.name] ?? 0)),\n lineStyle: { color: resolveColor(s.color) },\n itemStyle: { color: resolveColor(s.color) },\n areaStyle: bool(props.withPolarGrid, false) ? {} : undefined,\n })),\n },\n ],\n }\n}\n\nexport function simpleOption(type: 'funnel' | 'treemap' | 'sankey', props: Props): EChartsOption {\n const data = list<Record<string, unknown>>(props.data)\n if (type === 'sankey')\n return {\n tooltip: { show: bool(props.withTooltip, true) },\n series: [\n {\n type,\n data: list(props.nodes ?? data),\n links: list(props.links),\n emphasis: { focus: 'adjacency' },\n ...obj(props.sankeyProps),\n },\n ],\n }\n return {\n tooltip: { show: bool(props.withTooltip, true) },\n legend: { show: bool(props.withLegend, false) },\n series: [\n {\n type,\n data: data.map((item) => ({ ...item, itemStyle: { color: resolveColor(item.color) } })),\n ...obj(props[`${type}Props`]),\n },\n ],\n }\n}\n\nexport function radialBarOption(props: Props): EChartsOption {\n const data = list<{ name: string; value: number; color?: string }>(props.data)\n return {\n legend: { show: bool(props.withLegend, false) },\n tooltip: { show: bool(props.withTooltip, true) },\n polar: {},\n angleAxis: { max: num(props.maxValue, 100), show: false },\n radiusAxis: {\n type: 'category',\n data: data.map((i) => i.name),\n show: bool(props.withLabels, true),\n },\n series: [\n {\n type: 'bar',\n coordinateSystem: 'polar',\n roundCap: true,\n data: data.map((i) => ({ value: i.value, itemStyle: { color: resolveColor(i.color) } })),\n },\n ],\n }\n}\n\nexport function heatmapOption(props: Props): EChartsOption {\n const input =\n props.data && typeof props.data === 'object' ? (props.data as Record<string, number>) : {}\n const data = Object.entries(input).map(([date, value]) => [date, value])\n const values = Object.values(input)\n const date = (value: unknown, fallback: string) =>\n value instanceof Date\n ? value.toISOString().slice(0, 10)\n : typeof value === 'string'\n ? value\n : fallback\n const start = date(props.startDate, String(data[0]?.[0] ?? new Date().toISOString().slice(0, 10)))\n const end = date(props.endDate, String(data.at(-1)?.[0] ?? start))\n return {\n tooltip: { show: bool(props.withTooltip, false) },\n visualMap: {\n show: bool(props.withLegend, false),\n min: (props.domain as number[] | undefined)?.[0] ?? Math.min(0, ...values),\n max: (props.domain as number[] | undefined)?.[1] ?? Math.max(1, ...values),\n inRange: {\n color: list<string>(props.colors).length\n ? list<string>(props.colors).map((color) => resolveColor(color))\n : ['#ebfbee', '#2f9e44'],\n },\n orient: 'horizontal',\n left: 'center',\n bottom: 0,\n },\n calendar: {\n range: [start, end],\n cellSize: num(props.rectSize, 10) + num(props.gap, 1),\n dayLabel: {\n show: bool(props.withWeekdayLabels, false),\n firstDay: num(props.firstDayOfWeek, 1),\n },\n monthLabel: { show: bool(props.withMonthLabels, false) },\n itemStyle: {\n borderWidth: num(props.gap, 1),\n borderColor: 'transparent',\n borderRadius: num(props.rectRadius, 2),\n },\n },\n series: [{ type: 'heatmap', coordinateSystem: 'calendar', data }],\n }\n}\n","import type { MantineColor } from '@mantine-vue/core'\nimport type { DefineComponent, HTMLAttributes, VNodeChild } from 'vue'\nimport { createChartComponent } from './internal/component'\nimport {\n cartesianOption,\n candlestickOption,\n gaugeOption,\n heatmapOption,\n matrixOption,\n radarOption,\n radialBarOption,\n radialOption,\n scatterOption,\n simpleOption,\n sparklineOption,\n waffleOption,\n} from './internal/options'\nimport type {\n BaseChartStylesNames,\n ChartData,\n ChartOptionProps,\n ChartRootProps,\n ChartSeries,\n GridChartBaseProps,\n MantineChartDotProps,\n} from './types'\n\nexport type LineChartCurveType =\n | 'bump'\n | 'linear'\n | 'natural'\n | 'monotone'\n | 'step'\n | 'stepBefore'\n | 'stepAfter'\nexport type AreaChartCurveType = LineChartCurveType\nexport type CompositeChartCurveType = LineChartCurveType\nexport interface LineChartSeries extends ChartSeries {\n strokeDasharray?: string | number\n curveType?: LineChartCurveType\n}\nexport interface AreaChartSeries extends ChartSeries {\n color: MantineColor\n strokeDasharray?: string | number\n curveType?: AreaChartCurveType\n}\nexport interface BarChartSeries extends ChartSeries {\n stackId?: string\n}\nexport interface CompositeChartSeries extends ChartSeries {\n type: 'line' | 'area' | 'bar'\n strokeDasharray?: string | number\n}\n\nexport interface LineChartProps extends GridChartBaseProps {\n series: LineChartSeries[]\n type?: 'default' | 'gradient'\n gradientStops?: { offset: number; color: MantineColor }[]\n curveType?: LineChartCurveType\n fillOpacity?: number\n withDots?: boolean\n dotProps?: MantineChartDotProps\n activeDotProps?: MantineChartDotProps\n strokeWidth?: number\n lineChartProps?: ChartOptionProps\n connectNulls?: boolean\n lineProps?: ChartOptionProps | ((series: LineChartSeries) => ChartOptionProps)\n withPointLabels?: boolean\n}\nexport interface AreaChartProps extends GridChartBaseProps {\n series: AreaChartSeries[]\n type?: 'default' | 'stacked' | 'percent' | 'split' | 'stream'\n withGradient?: boolean\n curveType?: AreaChartCurveType\n withDots?: boolean\n dotProps?: MantineChartDotProps\n activeDotProps?: MantineChartDotProps\n strokeWidth?: number\n areaChartProps?: ChartOptionProps\n fillOpacity?: number\n splitColors?: [MantineColor, MantineColor]\n splitOffset?: number\n connectNulls?: boolean\n areaProps?: ChartOptionProps | ((series: AreaChartSeries) => ChartOptionProps)\n withPointLabels?: boolean\n}\nexport interface BarChartProps extends GridChartBaseProps {\n series: BarChartSeries[]\n type?: 'default' | 'stacked' | 'percent' | 'waterfall'\n fillOpacity?: number\n cursorFill?: MantineColor\n barChartProps?: ChartOptionProps\n barProps?: ChartOptionProps | ((series: BarChartSeries) => ChartOptionProps)\n withBarValueLabel?: boolean\n valueLabelProps?: ChartOptionProps | ((series: BarChartSeries) => ChartOptionProps)\n minBarSize?: number\n maxBarWidth?: number\n barLabelColor?: MantineColor\n getBarColor?: (value: number, series: BarChartSeries) => MantineColor\n}\nexport interface CompositeChartProps extends Omit<GridChartBaseProps, 'orientation'> {\n series: CompositeChartSeries[]\n curveType?: CompositeChartCurveType\n withDots?: boolean\n dotProps?: MantineChartDotProps\n activeDotProps?: MantineChartDotProps\n strokeWidth?: number\n connectNulls?: boolean\n lineProps?: ChartOptionProps | ((series: CompositeChartSeries) => ChartOptionProps)\n areaProps?: ChartOptionProps | ((series: CompositeChartSeries) => ChartOptionProps)\n barProps?: ChartOptionProps | ((series: CompositeChartSeries) => ChartOptionProps)\n withPointLabels?: boolean\n withBarValueLabel?: boolean\n minBarSize?: number\n maxBarWidth?: number\n composedChartProps?: ChartOptionProps\n}\n\nexport interface PieChartCell {\n name: string\n value: number\n color?: MantineColor\n}\nexport interface PieChartProps extends ChartRootProps {\n data: PieChartCell[]\n withTooltip?: boolean\n withLabels?: boolean\n withLabelsLine?: boolean\n labelsPosition?: 'inside' | 'outside'\n labelsType?: 'value' | 'percent'\n tooltipDataSource?: 'segment' | 'all'\n valueFormatter?: (value: number) => string\n strokeWidth?: number\n size?: number\n startAngle?: number\n endAngle?: number\n paddingAngle?: number\n pieProps?: ChartOptionProps\n tooltipProps?: ChartOptionProps\n}\nexport interface DonutChartProps extends PieChartProps {\n thickness?: number\n chartLabel?: string\n chartLabelColor?: MantineColor\n chartLabelFontSize?: number\n chartLabelProps?: ChartOptionProps\n}\n\nexport interface ScatterChartSeries extends ChartSeries {\n data?: ChartData\n}\nexport interface ScatterChartProps extends GridChartBaseProps {\n data: ChartData\n series: ScatterChartSeries[]\n xAxisKey?: string\n yAxisKey?: string\n scatterProps?: ChartOptionProps | ((series: ScatterChartSeries) => ChartOptionProps)\n}\nexport interface BubbleChartProps extends ChartRootProps {\n data: ChartData\n xAxisKey?: string\n yAxisKey?: string\n zAxisKey?: string\n name?: string\n color?: MantineColor\n range?: number\n withTooltip?: boolean\n withXAxis?: boolean\n withYAxis?: boolean\n xAxisProps?: ChartOptionProps\n yAxisProps?: ChartOptionProps\n tooltipProps?: ChartOptionProps\n gridProps?: ChartOptionProps\n valueFormatter?: (value: number) => string\n}\n\nexport interface RadarChartProps extends GridChartBaseProps {\n series: ChartSeries[]\n maxValue?: number\n withPolarGrid?: boolean\n withAngleAxis?: boolean\n withRadiusAxis?: boolean\n shape?: 'polygon' | 'circle'\n radarProps?: ChartOptionProps\n}\nexport interface RadialBarChartCell {\n name: string\n value: number\n color?: MantineColor\n}\nexport interface RadialBarChartProps extends ChartRootProps {\n data: RadialBarChartCell[]\n maxValue?: number\n withLabels?: boolean\n withLegend?: boolean\n withTooltip?: boolean\n startAngle?: number\n endAngle?: number\n barSize?: number\n radialBarProps?: ChartOptionProps\n tooltipProps?: ChartOptionProps\n legendProps?: ChartOptionProps\n}\nexport interface FunnelChartCell extends PieChartCell {\n label?: string\n}\nexport interface FunnelChartProps extends ChartRootProps {\n data: FunnelChartCell[]\n withTooltip?: boolean\n withLabels?: boolean\n withLegend?: boolean\n valueFormatter?: (value: number) => string\n funnelProps?: ChartOptionProps\n tooltipProps?: ChartOptionProps\n}\n\nexport interface TreemapData {\n name: string\n value?: number\n color?: MantineColor\n children?: TreemapData[]\n}\nexport interface TreemapProps extends ChartRootProps {\n data: TreemapData[]\n withTooltip?: boolean\n withLegend?: boolean\n valueFormatter?: (value: number) => string\n treemapProps?: ChartOptionProps\n}\nexport interface SankeyChartNode {\n name: string\n color?: MantineColor\n [key: string]: unknown\n}\nexport interface SankeyChartLink {\n source: string | number\n target: string | number\n value: number\n [key: string]: unknown\n}\nexport interface SankeyChartProps extends ChartRootProps {\n data?: SankeyChartNode[]\n nodes?: SankeyChartNode[]\n links: SankeyChartLink[]\n withTooltip?: boolean\n valueFormatter?: (value: number) => string\n sankeyProps?: ChartOptionProps\n}\n\nexport interface SparklineTrendColors {\n positive: MantineColor\n negative: MantineColor\n neutral?: MantineColor\n}\nexport interface SparklineProps extends ChartRootProps {\n data: (number | null)[]\n color?: MantineColor\n withGradient?: boolean\n fillOpacity?: number\n curveType?: LineChartCurveType\n strokeWidth?: number\n trendColors?: SparklineTrendColors\n connectNulls?: boolean\n areaProps?: ChartOptionProps\n}\nexport interface HeatmapRectData {\n date: string\n value: number | null\n}\nexport interface HeatmapProps extends ChartRootProps {\n data: Record<string, number>\n domain?: [number, number]\n startDate?: Date | string\n endDate?: Date | string\n withMonthLabels?: boolean\n monthLabels?: string[]\n withWeekdayLabels?: boolean\n weekdayLabels?: string[]\n withOutsideDates?: boolean\n firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6\n rectSize?: number\n gap?: number\n rectRadius?: number\n colors?: string[]\n weekdaysLabelsWidth?: number\n monthsLabelsHeight?: number\n fontSize?: number\n getTooltipLabel?: (input: HeatmapRectData) => VNodeChild\n withTooltip?: boolean\n tooltipProps?: ChartOptionProps\n getRectProps?: (input: HeatmapRectData) => Record<string, unknown>\n splitMonths?: boolean\n withLegend?: boolean\n legendLabels?: [string, string]\n}\n\nexport interface GaugeChartSection {\n value: number\n color: MantineColor\n}\nexport interface GaugeChartProps extends ChartRootProps {\n value: number\n min?: number\n max?: number\n target?: number\n sections?: GaugeChartSection[]\n thickness?: number\n size?: number\n startAngle?: number\n endAngle?: number\n label?: VNodeChild\n valueFormatter?: (value: number) => string\n trackColor?: MantineColor\n filledColor?: MantineColor\n targetColor?: MantineColor\n targetSize?: number\n roundCaps?: boolean\n}\n\nexport interface WaffleChartCell {\n name: string\n value: number\n color: MantineColor\n key?: string | number\n}\nexport interface WaffleChartProps extends ChartRootProps {\n data: WaffleChartCell[]\n rows?: number\n columns?: number\n total?: number\n gap?: number\n cellRadius?: number\n cellSize?: number\n emptyColor?: MantineColor\n withTooltip?: boolean\n getTooltipLabel?: (cell: WaffleChartCell & { count: number }) => VNodeChild\n withLegend?: boolean\n legendPosition?: 'top' | 'bottom' | 'left' | 'right'\n fillDirection?: 'left-to-right' | 'right-to-left' | 'top-to-bottom' | 'bottom-to-top'\n size?: number\n}\n\nexport interface MatrixChartCell {\n x: string\n y: string\n value: number | null\n}\nexport type MatrixChartData = MatrixChartCell[]\nexport interface MatrixChartProps extends ChartRootProps {\n data: MatrixChartData\n xLabels?: string[]\n yLabels?: string[]\n domain?: [number, number]\n colors?: MantineColor[]\n cellSize?: number\n gap?: number\n cellRadius?: number\n withTooltip?: boolean\n getTooltipLabel?: (cell: MatrixChartCell) => VNodeChild\n tooltipProps?: ChartOptionProps\n getCellProps?: (cell: MatrixChartCell) => Record<string, unknown>\n yLabelsWidth?: number\n xLabelsHeight?: number\n xLabelsPosition?: 'top' | 'bottom'\n fontSize?: number\n emptyColor?: MantineColor\n withLegend?: boolean\n legendLabels?: [string, string]\n withXLabels?: boolean\n withYLabels?: boolean\n xLabelsRotation?: number\n}\n\nexport interface CandlestickChartDataKeys {\n open: string\n high: string\n low: string\n close: string\n}\nexport interface CandlestickChartLabels {\n open: string\n high: string\n low: string\n close: string\n}\nexport interface CandlestickChartProps extends GridChartBaseProps {\n dataKeys?: CandlestickChartDataKeys\n labels?: Partial<CandlestickChartLabels>\n upColor?: MantineColor\n downColor?: MantineColor\n maxCandleWidth?: number\n candleStrokeWidth?: number\n composedChartProps?: ChartOptionProps\n}\n\nexport interface BarsListBarData {\n name: string\n value: number\n color?: MantineColor\n textColor?: MantineColor\n variant?: 'light' | 'filled'\n}\nexport interface BarsListProps extends ChartRootProps {\n data: BarsListBarData[]\n valueFormatter?: (value: number) => string\n barsLabel?: string\n valueLabel?: string\n getBarProps?: (data: BarsListBarData) => HTMLAttributes\n renderBar?: (data: BarsListBarData, defaultBar: VNodeChild) => VNodeChild\n barGap?: string | number\n minBarSize?: string | number\n barHeight?: string | number\n barColor?: MantineColor\n barTextColor?: MantineColor\n autoContrast?: boolean\n}\n\ntype PublicComponent<P> = DefineComponent<P>\nexport const AreaChart = createChartComponent('AreaChart', (p) =>\n cartesianOption(p, 'area'),\n) as PublicComponent<AreaChartProps>\nexport const BarChart = createChartComponent('BarChart', (p) =>\n cartesianOption(p, 'bar'),\n) as PublicComponent<BarChartProps>\nexport const LineChart = createChartComponent('LineChart', (p) =>\n cartesianOption(p, 'line'),\n) as PublicComponent<LineChartProps>\nexport const CompositeChart = createChartComponent('CompositeChart', (p) =>\n cartesianOption(p, 'composite'),\n) as PublicComponent<CompositeChartProps>\nexport const PieChart = createChartComponent('PieChart', (p) =>\n radialOption(p),\n) as PublicComponent<PieChartProps>\nexport const DonutChart = createChartComponent('DonutChart', (p) =>\n radialOption(p, true),\n) as PublicComponent<DonutChartProps>\nexport const ScatterChart = createChartComponent('ScatterChart', (p) =>\n scatterOption(p),\n) as PublicComponent<ScatterChartProps>\nexport const BubbleChart = createChartComponent('BubbleChart', (p) =>\n scatterOption(p, true),\n) as PublicComponent<BubbleChartProps>\nexport const RadarChart = createChartComponent(\n 'RadarChart',\n radarOption,\n) as PublicComponent<RadarChartProps>\nexport const RadialBarChart = createChartComponent(\n 'RadialBarChart',\n radialBarOption,\n) as PublicComponent<RadialBarChartProps>\nexport const FunnelChart = createChartComponent('FunnelChart', (p) =>\n simpleOption('funnel', p),\n) as PublicComponent<FunnelChartProps>\nexport const Treemap = createChartComponent('Treemap', (p) =>\n simpleOption('treemap', p),\n) as PublicComponent<TreemapProps>\nexport const SankeyChart = createChartComponent('SankeyChart', (p) =>\n simpleOption('sankey', p),\n) as PublicComponent<SankeyChartProps>\nexport const Sparkline = createChartComponent(\n 'Sparkline',\n sparklineOption,\n) as PublicComponent<SparklineProps>\nexport const Heatmap = createChartComponent(\n 'Heatmap',\n heatmapOption,\n) as PublicComponent<HeatmapProps>\nexport const BarsList = createChartComponent('BarsList', (p) =>\n cartesianOption(\n {\n ...p,\n dataKey: 'name',\n series: [{ name: 'value', color: p.barColor }],\n orientation: 'vertical',\n withXAxis: false,\n withYAxis: true,\n withTooltip: false,\n maxBarWidth: p.barHeight,\n },\n 'bar',\n ),\n) as PublicComponent<BarsListProps>\nexport const GaugeChart = createChartComponent(\n 'GaugeChart',\n gaugeOption,\n) as PublicComponent<GaugeChartProps>\nexport const WaffleChart = createChartComponent(\n 'WaffleChart',\n waffleOption,\n) as PublicComponent<WaffleChartProps>\nexport const MatrixChart = createChartComponent(\n 'MatrixChart',\n matrixOption,\n) as PublicComponent<MatrixChartProps>\nexport const CandlestickChart = createChartComponent(\n 'CandlestickChart',\n candlestickOption,\n) as PublicComponent<CandlestickChartProps>\n\nexport type AreaChartStylesNames =\n | 'area'\n | import('./types').BaseChartStylesNames\n | ChartLegendStylesNames\n | ChartTooltipStylesNames\nexport type BarChartStylesNames =\n | 'bar'\n | import('./types').BaseChartStylesNames\n | ChartLegendStylesNames\n | ChartTooltipStylesNames\nexport type LineChartStylesNames =\n | 'line'\n | import('./types').BaseChartStylesNames\n | ChartLegendStylesNames\n | ChartTooltipStylesNames\nexport type CompositeChartStylesNames =\n | 'line'\n | 'area'\n | 'bar'\n | import('./types').BaseChartStylesNames\n | ChartLegendStylesNames\n | ChartTooltipStylesNames\nexport type PieChartStylesNames = 'root' | 'label'\nexport type DonutChartStylesNames = PieChartStylesNames\nexport type ScatterChartStylesNames =\n | import('./types').BaseChartStylesNames\n | ChartLegendStylesNames\n | ChartTooltipStylesNames\nexport type BubbleChartStylesNames = ScatterChartStylesNames\nexport type RadarChartStylesNames =\n | 'root'\n | 'container'\n | 'axis'\n | 'grid'\n | 'curve'\n | ChartLegendStylesNames\n | ChartTooltipStylesNames\nexport type RadialBarChartStylesNames =\n | 'root'\n | 'container'\n | 'label'\n | ChartLegendStylesNames\n | ChartTooltipStylesNames\nexport type FunnelChartStylesNames =\n | 'root'\n | 'container'\n | 'label'\n | ChartLegendStylesNames\n | ChartTooltipStylesNames\nexport type TreemapStylesNames = 'root' | 'container'\nexport type SankeyChartStylesNames = 'root' | 'container'\nexport type SparklineStylesNames = 'root'\nexport type HeatmapStylesNames =\n | 'root'\n | 'rect'\n | 'weekdayLabel'\n | 'monthLabel'\n | 'legend'\n | 'legendLabel'\n | 'legendRect'\nexport type BarsListStylesNames = 'root' | 'bar' | 'barLabel' | 'barValue' | 'labelsRow'\nexport type GaugeChartStylesNames = 'root' | 'track' | 'section' | 'needle' | 'label'\nexport type WaffleChartStylesNames =\n | 'root'\n | 'grid'\n | 'cell'\n | 'legend'\n | 'legendItem'\n | 'legendSwatch'\n | 'legendLabel'\nexport type MatrixChartStylesNames =\n | 'root'\n | 'cell'\n | 'xLabel'\n | 'yLabel'\n | 'legend'\n | 'legendLabel'\n | 'legendRect'\nexport type CandlestickChartStylesNames = 'candle' | BaseChartStylesNames | ChartTooltipStylesNames\n\nexport type ChartTooltipStylesNames =\n | 'tooltip'\n | 'tooltipItem'\n | 'tooltipItemBody'\n | 'tooltipItemColor'\n | 'tooltipItemName'\n | 'tooltipItemData'\n | 'tooltipLabel'\n | 'tooltipBody'\nexport type ChartLegendStylesNames = 'legendItem' | 'legendItemColor' | 'legendItemName' | 'legend'\nexport type ChartCssVariables = Record<string, string>\n","import { computed, defineComponent, h, type PropType, type SlotsType, type VNodeChild } from 'vue'\nimport type { ChartRenderable, ChartSeries, ChartTooltipPayload } from '../types'\nimport { resolveColor } from '../internal/colors'\n\nexport interface ChartTooltipProps {\n label?: ChartRenderable\n payload?: readonly ChartTooltipPayload[]\n unit?: string\n type?: 'area' | 'radial' | 'scatter'\n segmentId?: string\n series?: ChartSeries[]\n valueFormatter?: (value: number) => ChartRenderable\n showColor?: boolean\n}\n\nexport interface ChartTooltipSlots {\n label?: () => VNodeChild\n valueFormatter?: (input: { value: number; item: ChartTooltipPayload }) => VNodeChild\n}\n\nexport const ChartTooltip = defineComponent({\n name: 'MantineChartTooltip',\n slots: Object as SlotsType<ChartTooltipSlots>,\n props: {\n label: null,\n payload: Array as PropType<readonly ChartTooltipPayload[]>,\n unit: String,\n type: { type: String as PropType<ChartTooltipProps['type']>, default: 'area' },\n segmentId: String,\n series: Array as PropType<ChartSeries[]>,\n valueFormatter: Function as PropType<(value: number) => ChartRenderable>,\n showColor: { type: Boolean, default: true },\n },\n setup(props, { slots }) {\n const labels = computed(() =>\n Object.fromEntries((props.series ?? []).map((item) => [item.name, item.label ?? item.name])),\n )\n return () => {\n const label = props.label !== undefined ? props.label : slots.label?.()\n const payload = props.segmentId\n ? props.payload?.filter(\n (item) => item.name === props.segmentId || item.dataKey === props.segmentId,\n )\n : props.payload\n if (!payload?.length) return null\n return h('div', { class: 'mantine-ChartTooltip-tooltip', 'data-type': props.type }, [\n label != null ? h('div', { class: 'mantine-ChartTooltip-tooltipLabel' }, [label]) : null,\n h(\n 'div',\n { class: 'mantine-ChartTooltip-tooltipBody' },\n payload.map((item) =>\n h('div', { class: 'mantine-ChartTooltip-tooltipItem' }, [\n h('div', { class: 'mantine-ChartTooltip-tooltipItemBody' }, [\n props.showColor\n ? h('span', {\n class: 'mantine-ChartTooltip-tooltipItemColor',\n style: { background: resolveColor(item.color) },\n })\n : null,\n h(\n 'span',\n { class: 'mantine-ChartTooltip-tooltipItemName' },\n labels.value[item.name ?? ''] ?? item.name,\n ),\n ]),\n h('span', { class: 'mantine-ChartTooltip-tooltipItemData' }, [\n props.valueFormatter\n ? props.valueFormatter(Number(item.value))\n : (slots.valueFormatter?.({ value: Number(item.value), item }) ??\n (item.value == null ? '' : String(item.value))),\n props.unit ?? item.unit ?? '',\n ]),\n ]),\n ),\n ),\n ])\n }\n },\n})\n","import { defineComponent, h, type PropType } from 'vue'\nimport type { ChartSeries } from '../types'\nimport { resolveColor } from '../internal/colors'\n\nexport interface ChartLegendPayload {\n dataKey?: string\n name?: string\n color?: string\n [key: string]: unknown\n}\nexport interface ChartLegendProps {\n payload?: readonly ChartLegendPayload[]\n onHighlight: (area: string | null) => void\n legendPosition: 'top' | 'bottom' | 'middle'\n series?: ChartSeries[]\n showColor?: boolean\n centered?: boolean\n}\n\nexport const ChartLegend = defineComponent({\n name: 'MantineChartLegend',\n props: {\n payload: Array as PropType<readonly ChartLegendPayload[]>,\n onHighlight: { type: Function as PropType<(area: string | null) => void>, required: true },\n legendPosition: {\n type: String as PropType<ChartLegendProps['legendPosition']>,\n required: true,\n },\n series: Array as PropType<ChartSeries[]>,\n showColor: { type: Boolean, default: true },\n centered: Boolean,\n },\n setup(props) {\n return () =>\n h(\n 'div',\n {\n class: 'mantine-ChartLegend-legend',\n 'data-position': props.legendPosition,\n 'data-centered': props.centered || undefined,\n onMouseleave: () => props.onHighlight(null),\n },\n props.payload?.map((item) => {\n const key = item.dataKey ?? item.name ?? ''\n const label = props.series?.find((s) => s.name === key)?.label ?? key\n return h(\n 'div',\n { class: 'mantine-ChartLegend-legendItem', onMouseenter: () => props.onHighlight(key) },\n [\n props.showColor\n ? h('span', {\n class: 'mantine-ChartLegend-legendItemColor',\n style: { background: resolveColor(item.color) },\n })\n : null,\n h('span', { class: 'mantine-ChartLegend-legendItemName' }, label),\n ],\n )\n }),\n )\n },\n})\n","import type { ChartSeries } from '../../types'\nexport function getSeriesLabels(series: ChartSeries[] | undefined): Record<string, string> {\n return Object.fromEntries((series ?? []).map((item) => [item.name, item.label ?? item.name]))\n}\n"],"mappings":";;;;;;;AAqCA,IAAI,aAAa;AAEjB,SAAgB,kBAAwB;CACtC,IAAI,YACF;CAGF,IAAI;EACF;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,aAAa;AACf;;;AC3EA,gBAAgB;AAIhB,SAA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f,aAAa;KAAE,GAAG,MAAM;KAAa,UAAU,MAAM;IAAS;IAC9D,OAAO;IACP,UAAU,UAAmB,KAAK,SAAS,KAAK;IAChD,aAAa,UAAmB,KAAK,YAAY,KAAK;IACtD,cAAc,UAAmB,KAAK,aAAa,KAAK;IACxD,aAAa,UAAmB,KAAK,YAAY,KAAK;IACtD,wBAAwB,UAAmB,KAAK,uBAAuB,KAAK;IAC5E,aAAa,UAAmB,KAAK,YAAY,KAAK;GACxD,CAAC,CACH,CACF;EACJ;CACF,CAAC;AACH;;;ACrEA,IAAM,WAAqC;CACzC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,KAAK;EACH;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF;AAEA,SAAgB,aAAa,OAAgB,WAAW,WAAmB;CACzE,IAAI,OAAO,UAAU,YAAY,CAAC,OAAO,OAAO;CAChD,MAAM,CAAC,MAAM,YAAY,MAAM,MAAM,GAAG;CACxC,MAAM,QAAQ,O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AK;IAAG;GAAK,CAAC,MAC1D,KAAK,SAAS,OAAO,KAAK,OAAO,KAAK,KAAK,IAChD,MAAM,QAAQ,KAAK,QAAQ,EAC7B,CAAC,CACH,CAAC,CACH,CACF,CACF,CAAC;EACH;CACF;AACF,CAAC;;;AC3DD,IAAa,cAAc,gBAAgB;CACzC,MAAM;CACN,OAAO;EACL,SAAS;EACT,aAAa;GAAE,MAAM;GAAqD,UAAU;EAAK;EACzF,gBAAgB;GACd,MAAM;GACN,UAAU;EACZ;EACA,QAAQ;EACR,WAAW;GAAE,MAAM;GAAS,SAAS;EAAK;EAC1C,UAAU;CACZ;CACA,MAAM,OAAO;EACX,aACE,EACE,OACA;GACE,OAAO;GACP,iBAAiB,MAAM;GACvB,iBAAiB,MAAM,YAAY,KAAA;GACnC,oBAAoB,MAAM,YAAY,IAAI;EAC5C,GACA,MAAM,SAAS,KAAK,SAAS;GAC3B,MAAM,MAAM,KAAK,WAAW,KAAK,QAAQ;GACzC,MAAM,QAAQ,MAAM,QAAQ,MAAM,MAAM,EAAE,SAAS,GAAG,GAAG,SAAS;GAClE,OAAO,EACL,OACA;IAAE,OAAO;IAAkC,oBAAoB,MAAM,YAAY,GAAG;GAAE,GACtF,CACE,MAAM,YACF,EAAE,QAAQ;IACR,OAAO;IACP,OAAO,EAAE,YAAY,aAAa,KAAK,KAAK,EAAE;GAChD,CAAC,IACD,MACJ,EAAE,QAAQ,EAAE,OAAO,qCAAqC,GAAG,KAAK,CAClE,CACF;EACF,CAAC,CACH;CACJ;AACF,CAAC;;;AC5DD,SAAgB,gBAAgB,QAA2D;CACzF,OAAO,OAAO,aAAa,UAAU,CAAC,GAAG,KAAK,SAAS,CAAC,KAAK,MAAM,KAAK,SAAS,KAAK,IAAI,CAAC,CAAC;AAC9F"}
@@ -0,0 +1,2 @@
1
+ export { CandlestickChart } from '../charts';
2
+ export type { CandlestickChartDataKeys, CandlestickChartLabels, CandlestickChartProps, CandlestickChartStylesNames, } from '../charts';
@@ -0,0 +1 @@
1
+ export * from './CandlestickChart';
@@ -0,0 +1,2 @@
1
+ export { GaugeChart } from '../charts';
2
+ export type { GaugeChartProps, GaugeChartSection, GaugeChartStylesNames } from '../charts';
@@ -0,0 +1 @@
1
+ export * from './GaugeChart';
@@ -0,0 +1,2 @@
1
+ export { MatrixChart } from '../charts';
2
+ export type { MatrixChartCell, MatrixChartData, MatrixChartProps, MatrixChartStylesNames, } from '../charts';
@@ -0,0 +1 @@
1
+ export * from './MatrixChart';
@@ -0,0 +1,2 @@
1
+ export { WaffleChart } from '../charts';
2
+ export type { WaffleChartCell, WaffleChartProps, WaffleChartStylesNames } from '../charts';
@@ -0,0 +1 @@
1
+ export * from './WaffleChart';
package/lib/charts.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { MantineColor } from '@mantine-vue/core';
2
2
  import type { DefineComponent, HTMLAttributes, VNodeChild } from 'vue';
3
- import type { ChartData, ChartOptionProps, ChartRootProps, ChartSeries, GridChartBaseProps, MantineChartDotProps } from './types';
3
+ import type { BaseChartStylesNames, ChartData, ChartOptionProps, ChartRootProps, ChartSeries, GridChartBaseProps, MantineChartDotProps } from './types';
4
4
  export type LineChartCurveType = 'bump' | 'linear' | 'natural' | 'monotone' | 'step' | 'stepBefore' | 'stepAfter';
5
5
  export type AreaChartCurveType = LineChartCurveType;
6
6
  export type CompositeChartCurveType = LineChartCurveType;
@@ -40,7 +40,7 @@ export interface LineChartProps extends GridChartBaseProps {
40
40
  }
41
41
  export interface AreaChartProps extends GridChartBaseProps {
42
42
  series: AreaChartSeries[];
43
- type?: 'default' | 'stacked' | 'percent' | 'split';
43
+ type?: 'default' | 'stacked' | 'percent' | 'split' | 'stream';
44
44
  withGradient?: boolean;
45
45
  curveType?: AreaChartCurveType;
46
46
  withDots?: boolean;
@@ -259,6 +259,103 @@ export interface HeatmapProps extends ChartRootProps {
259
259
  withLegend?: boolean;
260
260
  legendLabels?: [string, string];
261
261
  }
262
+ export interface GaugeChartSection {
263
+ value: number;
264
+ color: MantineColor;
265
+ }
266
+ export interface GaugeChartProps extends ChartRootProps {
267
+ value: number;
268
+ min?: number;
269
+ max?: number;
270
+ target?: number;
271
+ sections?: GaugeChartSection[];
272
+ thickness?: number;
273
+ size?: number;
274
+ startAngle?: number;
275
+ endAngle?: number;
276
+ label?: VNodeChild;
277
+ valueFormatter?: (value: number) => string;
278
+ trackColor?: MantineColor;
279
+ filledColor?: MantineColor;
280
+ targetColor?: MantineColor;
281
+ targetSize?: number;
282
+ roundCaps?: boolean;
283
+ }
284
+ export interface WaffleChartCell {
285
+ name: string;
286
+ value: number;
287
+ color: MantineColor;
288
+ key?: string | number;
289
+ }
290
+ export interface WaffleChartProps extends ChartRootProps {
291
+ data: WaffleChartCell[];
292
+ rows?: number;
293
+ columns?: number;
294
+ total?: number;
295
+ gap?: number;
296
+ cellRadius?: number;
297
+ cellSize?: number;
298
+ emptyColor?: MantineColor;
299
+ withTooltip?: boolean;
300
+ getTooltipLabel?: (cell: WaffleChartCell & {
301
+ count: number;
302
+ }) => VNodeChild;
303
+ withLegend?: boolean;
304
+ legendPosition?: 'top' | 'bottom' | 'left' | 'right';
305
+ fillDirection?: 'left-to-right' | 'right-to-left' | 'top-to-bottom' | 'bottom-to-top';
306
+ size?: number;
307
+ }
308
+ export interface MatrixChartCell {
309
+ x: string;
310
+ y: string;
311
+ value: number | null;
312
+ }
313
+ export type MatrixChartData = MatrixChartCell[];
314
+ export interface MatrixChartProps extends ChartRootProps {
315
+ data: MatrixChartData;
316
+ xLabels?: string[];
317
+ yLabels?: string[];
318
+ domain?: [number, number];
319
+ colors?: MantineColor[];
320
+ cellSize?: number;
321
+ gap?: number;
322
+ cellRadius?: number;
323
+ withTooltip?: boolean;
324
+ getTooltipLabel?: (cell: MatrixChartCell) => VNodeChild;
325
+ tooltipProps?: ChartOptionProps;
326
+ getCellProps?: (cell: MatrixChartCell) => Record<string, unknown>;
327
+ yLabelsWidth?: number;
328
+ xLabelsHeight?: number;
329
+ xLabelsPosition?: 'top' | 'bottom';
330
+ fontSize?: number;
331
+ emptyColor?: MantineColor;
332
+ withLegend?: boolean;
333
+ legendLabels?: [string, string];
334
+ withXLabels?: boolean;
335
+ withYLabels?: boolean;
336
+ xLabelsRotation?: number;
337
+ }
338
+ export interface CandlestickChartDataKeys {
339
+ open: string;
340
+ high: string;
341
+ low: string;
342
+ close: string;
343
+ }
344
+ export interface CandlestickChartLabels {
345
+ open: string;
346
+ high: string;
347
+ low: string;
348
+ close: string;
349
+ }
350
+ export interface CandlestickChartProps extends GridChartBaseProps {
351
+ dataKeys?: CandlestickChartDataKeys;
352
+ labels?: Partial<CandlestickChartLabels>;
353
+ upColor?: MantineColor;
354
+ downColor?: MantineColor;
355
+ maxCandleWidth?: number;
356
+ candleStrokeWidth?: number;
357
+ composedChartProps?: ChartOptionProps;
358
+ }
262
359
  export interface BarsListBarData {
263
360
  name: string;
264
361
  value: number;
@@ -297,6 +394,10 @@ export declare const SankeyChart: PublicComponent<SankeyChartProps>;
297
394
  export declare const Sparkline: PublicComponent<SparklineProps>;
298
395
  export declare const Heatmap: PublicComponent<HeatmapProps>;
299
396
  export declare const BarsList: PublicComponent<BarsListProps>;
397
+ export declare const GaugeChart: PublicComponent<GaugeChartProps>;
398
+ export declare const WaffleChart: PublicComponent<WaffleChartProps>;
399
+ export declare const MatrixChart: PublicComponent<MatrixChartProps>;
400
+ export declare const CandlestickChart: PublicComponent<CandlestickChartProps>;
300
401
  export type AreaChartStylesNames = 'area' | import('./types').BaseChartStylesNames | ChartLegendStylesNames | ChartTooltipStylesNames;
301
402
  export type BarChartStylesNames = 'bar' | import('./types').BaseChartStylesNames | ChartLegendStylesNames | ChartTooltipStylesNames;
302
403
  export type LineChartStylesNames = 'line' | import('./types').BaseChartStylesNames | ChartLegendStylesNames | ChartTooltipStylesNames;
@@ -313,6 +414,10 @@ export type SankeyChartStylesNames = 'root' | 'container';
313
414
  export type SparklineStylesNames = 'root';
314
415
  export type HeatmapStylesNames = 'root' | 'rect' | 'weekdayLabel' | 'monthLabel' | 'legend' | 'legendLabel' | 'legendRect';
315
416
  export type BarsListStylesNames = 'root' | 'bar' | 'barLabel' | 'barValue' | 'labelsRow';
417
+ export type GaugeChartStylesNames = 'root' | 'track' | 'section' | 'needle' | 'label';
418
+ export type WaffleChartStylesNames = 'root' | 'grid' | 'cell' | 'legend' | 'legendItem' | 'legendSwatch' | 'legendLabel';
419
+ export type MatrixChartStylesNames = 'root' | 'cell' | 'xLabel' | 'yLabel' | 'legend' | 'legendLabel' | 'legendRect';
420
+ export type CandlestickChartStylesNames = 'candle' | BaseChartStylesNames | ChartTooltipStylesNames;
316
421
  export type ChartTooltipStylesNames = 'tooltip' | 'tooltipItem' | 'tooltipItemBody' | 'tooltipItemColor' | 'tooltipItemName' | 'tooltipItemData' | 'tooltipLabel' | 'tooltipBody';
317
422
  export type ChartLegendStylesNames = 'legendItem' | 'legendItemColor' | 'legendItemName' | 'legend';
318
423
  export type ChartCssVariables = Record<string, string>;
@@ -3,6 +3,10 @@ type Props = Record<string, unknown>;
3
3
  export declare function cartesianOption(props: Props, kind: 'line' | 'area' | 'bar' | 'composite'): EChartsOption;
4
4
  export declare function radialOption(props: Props, donut?: boolean): EChartsOption;
5
5
  export declare function scatterOption(props: Props, bubble?: boolean): EChartsOption;
6
+ export declare function gaugeOption(props: Props): EChartsOption;
7
+ export declare function waffleOption(props: Props): EChartsOption;
8
+ export declare function matrixOption(props: Props): EChartsOption;
9
+ export declare function candlestickOption(props: Props): EChartsOption;
6
10
  export declare function sparklineOption(props: Props): EChartsOption;
7
11
  export declare function radarOption(props: Props): EChartsOption;
8
12
  export declare function simpleOption(type: 'funnel' | 'treemap' | 'sankey', props: Props): EChartsOption;
package/lib/types.d.ts CHANGED
@@ -19,7 +19,26 @@ export interface ChartReferenceLineProps {
19
19
  strokeDasharray?: string | number;
20
20
  [key: string]: unknown;
21
21
  }
22
- export type BaseChartStylesNames = 'root' | 'container' | 'axis' | 'grid' | 'referenceLine' | 'axisLabel';
22
+ export interface ChartReferenceAreaProps {
23
+ x1?: string | number;
24
+ x2?: string | number;
25
+ y1?: string | number;
26
+ y2?: string | number;
27
+ color?: MantineColor;
28
+ label?: string | Record<string, unknown>;
29
+ labelPosition?: string;
30
+ [key: string]: unknown;
31
+ }
32
+ export interface ChartReferenceDotProps {
33
+ x: string | number;
34
+ y: string | number;
35
+ color?: MantineColor;
36
+ label?: string | Record<string, unknown>;
37
+ labelPosition?: string;
38
+ r?: number;
39
+ [key: string]: unknown;
40
+ }
41
+ export type BaseChartStylesNames = 'root' | 'container' | 'axis' | 'grid' | 'referenceLine' | 'referenceArea' | 'referenceDot' | 'axisLabel';
23
42
  export interface ChartRootProps {
24
43
  class?: HTMLAttributes['class'];
25
44
  className?: string;
@@ -40,6 +59,8 @@ export interface GridChartBaseProps extends ChartRootProps {
40
59
  data: ChartData;
41
60
  dataKey: string;
42
61
  referenceLines?: ChartReferenceLineProps[];
62
+ referenceAreas?: ChartReferenceAreaProps[];
63
+ referenceDots?: ChartReferenceDotProps[];
43
64
  withXAxis?: boolean;
44
65
  withYAxis?: boolean;
45
66
  xAxisProps?: ChartOptionProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mantine-vue/charts",
3
- "version": "3.2.0",
3
+ "version": "3.4.0",
4
4
  "description": "Charts components built with Apache ECharts and Mantine Vue",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -38,7 +38,7 @@
38
38
  "vue-echarts": "^8.0.1"
39
39
  },
40
40
  "peerDependencies": {
41
- "@mantine-vue/core": "3.2.0",
41
+ "@mantine-vue/core": "3.4.0",
42
42
  "echarts": ">=6.0.0",
43
43
  "vue": "^3.5.0",
44
44
  "vue-echarts": ">=8.0.0"