@mantine/charts 8.1.3 → 8.2.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.
Files changed (76) hide show
  1. package/cjs/AreaChart/AreaChart.cjs +6 -2
  2. package/cjs/AreaChart/AreaChart.cjs.map +1 -1
  3. package/cjs/BarChart/BarChart.cjs +7 -3
  4. package/cjs/BarChart/BarChart.cjs.map +1 -1
  5. package/cjs/BubbleChart/BubbleChart.cjs +2 -0
  6. package/cjs/BubbleChart/BubbleChart.cjs.map +1 -1
  7. package/cjs/ChartLegend/ChartLegend.cjs +4 -3
  8. package/cjs/ChartLegend/ChartLegend.cjs.map +1 -1
  9. package/cjs/ChartTooltip/ChartTooltip.cjs +3 -1
  10. package/cjs/ChartTooltip/ChartTooltip.cjs.map +1 -1
  11. package/cjs/CompositeChart/CompositeChart.cjs +7 -3
  12. package/cjs/CompositeChart/CompositeChart.cjs.map +1 -1
  13. package/cjs/DonutChart/DonutChart.cjs +6 -3
  14. package/cjs/DonutChart/DonutChart.cjs.map +1 -1
  15. package/cjs/FunnelChart/FunnelChart.cjs +4 -1
  16. package/cjs/FunnelChart/FunnelChart.cjs.map +1 -1
  17. package/cjs/Heatmap/Heatmap.cjs +2 -0
  18. package/cjs/Heatmap/Heatmap.cjs.map +1 -1
  19. package/cjs/LineChart/LineChart.cjs +6 -2
  20. package/cjs/LineChart/LineChart.cjs.map +1 -1
  21. package/cjs/PieChart/PieChart.cjs +8 -5
  22. package/cjs/PieChart/PieChart.cjs.map +1 -1
  23. package/cjs/RadarChart/RadarChart.cjs +6 -2
  24. package/cjs/RadarChart/RadarChart.cjs.map +1 -1
  25. package/cjs/RadialBarChart/RadialBarChart.cjs +4 -1
  26. package/cjs/RadialBarChart/RadialBarChart.cjs.map +1 -1
  27. package/cjs/ScatterChart/ScatterChart.cjs +6 -2
  28. package/cjs/ScatterChart/ScatterChart.cjs.map +1 -1
  29. package/cjs/Sparkline/Sparkline.cjs +2 -0
  30. package/cjs/Sparkline/Sparkline.cjs.map +1 -1
  31. package/esm/AreaChart/AreaChart.mjs +6 -2
  32. package/esm/AreaChart/AreaChart.mjs.map +1 -1
  33. package/esm/BarChart/BarChart.mjs +7 -3
  34. package/esm/BarChart/BarChart.mjs.map +1 -1
  35. package/esm/BubbleChart/BubbleChart.mjs +2 -0
  36. package/esm/BubbleChart/BubbleChart.mjs.map +1 -1
  37. package/esm/ChartLegend/ChartLegend.mjs +4 -3
  38. package/esm/ChartLegend/ChartLegend.mjs.map +1 -1
  39. package/esm/ChartTooltip/ChartTooltip.mjs +3 -1
  40. package/esm/ChartTooltip/ChartTooltip.mjs.map +1 -1
  41. package/esm/CompositeChart/CompositeChart.mjs +7 -3
  42. package/esm/CompositeChart/CompositeChart.mjs.map +1 -1
  43. package/esm/DonutChart/DonutChart.mjs +6 -3
  44. package/esm/DonutChart/DonutChart.mjs.map +1 -1
  45. package/esm/FunnelChart/FunnelChart.mjs +4 -1
  46. package/esm/FunnelChart/FunnelChart.mjs.map +1 -1
  47. package/esm/Heatmap/Heatmap.mjs +2 -0
  48. package/esm/Heatmap/Heatmap.mjs.map +1 -1
  49. package/esm/LineChart/LineChart.mjs +6 -2
  50. package/esm/LineChart/LineChart.mjs.map +1 -1
  51. package/esm/PieChart/PieChart.mjs +8 -5
  52. package/esm/PieChart/PieChart.mjs.map +1 -1
  53. package/esm/RadarChart/RadarChart.mjs +6 -2
  54. package/esm/RadarChart/RadarChart.mjs.map +1 -1
  55. package/esm/RadialBarChart/RadialBarChart.mjs +4 -1
  56. package/esm/RadialBarChart/RadialBarChart.mjs.map +1 -1
  57. package/esm/ScatterChart/ScatterChart.mjs +6 -2
  58. package/esm/ScatterChart/ScatterChart.mjs.map +1 -1
  59. package/esm/Sparkline/Sparkline.mjs +2 -0
  60. package/esm/Sparkline/Sparkline.mjs.map +1 -1
  61. package/lib/AreaChart/AreaChart.d.ts +13 -13
  62. package/lib/BarChart/BarChart.d.ts +4 -4
  63. package/lib/BubbleChart/BubbleChart.d.ts +3 -3
  64. package/lib/ChartLegend/ChartLegend.d.ts +4 -4
  65. package/lib/ChartTooltip/ChartTooltip.d.ts +2 -2
  66. package/lib/CompositeChart/CompositeChart.d.ts +11 -11
  67. package/lib/DonutChart/DonutChart.d.ts +11 -11
  68. package/lib/FunnelChart/FunnelChart.d.ts +10 -9
  69. package/lib/Heatmap/Heatmap.d.ts +11 -11
  70. package/lib/LineChart/LineChart.d.ts +12 -12
  71. package/lib/PieChart/PieChart.d.ts +12 -12
  72. package/lib/RadarChart/RadarChart.d.ts +13 -11
  73. package/lib/RadialBarChart/RadialBarChart.d.ts +8 -7
  74. package/lib/Sparkline/Sparkline.d.ts +6 -6
  75. package/lib/types.d.ts +4 -1
  76. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"Sparkline.mjs","sources":["../../src/Sparkline/Sparkline.tsx"],"sourcesContent":["import { useId, useMemo } from 'react';\nimport { Area, AreaProps, AreaChart as ReChartsAreaChart, ResponsiveContainer } from 'recharts';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getThemeColor,\n MantineColor,\n StylesApiProps,\n useProps,\n useStyles,\n} from '@mantine/core';\nimport { AreaChartCurveType, AreaGradient } from '../AreaChart';\n\nconst classes = {};\n\nexport interface SparklineTrendColors {\n positive: MantineColor;\n negative: MantineColor;\n neutral?: MantineColor;\n}\n\nexport type SparklineStylesNames = 'root';\nexport type SparklineCssVariables = {\n root: '--chart-color';\n};\n\nexport interface SparklineProps\n extends BoxProps,\n StylesApiProps<SparklineFactory>,\n ElementProps<'div'> {\n /** Data used to render the chart */\n data: (number | null)[];\n\n /** Key of `theme.colors` or any valid CSS color, `theme.primaryColor` by default */\n color?: MantineColor;\n\n /** Determines whether the chart fill should be a gradient, `true` by default */\n withGradient?: boolean;\n\n /** Controls fill opacity of the area, `0.6` by default */\n fillOpacity?: number;\n\n /** Type of the curve, `'linear'` by default */\n curveType?: AreaChartCurveType;\n\n /** Area stroke width, `2` by default */\n strokeWidth?: number;\n\n /** If set, `color` prop is ignored and chart color is determined by the difference between first and last value. */\n trendColors?: SparklineTrendColors;\n\n /** Determines whether null values should be connected with other values, `true` by default */\n connectNulls?: boolean;\n\n /** Props passed down to the underlying recharts `Area` component */\n areaProps?: Omit<AreaProps, 'data' | 'dataKey' | 'ref'>;\n}\n\nexport type SparklineFactory = Factory<{\n props: SparklineProps;\n ref: HTMLDivElement;\n stylesNames: SparklineStylesNames;\n vars: SparklineCssVariables;\n}>;\n\nconst defaultProps = {\n withGradient: true,\n connectNulls: true,\n fillOpacity: 0.6,\n strokeWidth: 2,\n curveType: 'linear',\n} satisfies Partial<SparklineProps>;\n\nfunction getTrendColor(data: (number | null)[], trendColors: SparklineTrendColors) {\n const first = data[0];\n const last = data[data.length - 1];\n\n if (first === null || last === null) {\n return trendColors.neutral || trendColors.positive;\n }\n\n if (first < last) {\n return trendColors.positive;\n }\n\n if (first > last) {\n return trendColors.negative;\n }\n\n return trendColors.neutral || trendColors.positive;\n}\n\nconst varsResolver = createVarsResolver<SparklineFactory>(\n (theme, { color, data, trendColors }) => ({\n root: {\n '--chart-color': trendColors\n ? getThemeColor(getTrendColor(data, trendColors), theme)\n : color\n ? getThemeColor(color, theme)\n : undefined,\n },\n })\n);\n\nexport const Sparkline = factory<SparklineFactory>((_props, ref) => {\n const props = useProps('Sparkline', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n data,\n withGradient,\n fillOpacity,\n curveType,\n strokeWidth,\n trendColors,\n connectNulls,\n areaProps,\n ...others\n } = props;\n\n const getStyles = useStyles<SparklineFactory>({\n name: 'Sparkline',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n vars,\n varsResolver,\n });\n\n const id = useId();\n const mappedData = useMemo(() => data.map((value, index) => ({ value, index })), [data]);\n\n return (\n <Box ref={ref} {...getStyles('root')} {...others} dir=\"ltr\">\n <ResponsiveContainer>\n <ReChartsAreaChart data={mappedData}>\n <Area\n dataKey=\"value\"\n type={curveType}\n fill={`url(#${id})`}\n stroke=\"var(--chart-color, var(--mantine-color-blue-filled))\"\n isAnimationActive={false}\n connectNulls={connectNulls}\n strokeWidth={strokeWidth}\n fillOpacity={1}\n {...areaProps}\n />\n\n <defs>\n <AreaGradient\n id={id}\n color=\"var(--chart-color, var(--mantine-color-blue-filled))\"\n fillOpacity={fillOpacity}\n withGradient={withGradient}\n />\n </defs>\n </ReChartsAreaChart>\n </ResponsiveContainer>\n </Box>\n );\n});\n\nSparkline.displayName = '@mantine/charts/Sparkline';\nSparkline.classes = classes;\n"],"names":["ReChartsAreaChart"],"mappings":";;;;;;;;AAiBA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAAU,CAAC,CAAA,CAAA;AAoDjB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,YAAe,CAAA,CAAA,CAAA,CAAA;AAAA,CACnB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACd,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACd,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,EAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACb,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,EAAA,CAAA,CAAA;AAAA,CAAA,CACb,SAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACb,CAAA,CAAA;AAEA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAA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AAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACxB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;"}
1
+ {"version":3,"file":"Sparkline.mjs","sources":["../../src/Sparkline/Sparkline.tsx"],"sourcesContent":["import { useId, useMemo } from 'react';\nimport { Area, AreaProps, AreaChart as ReChartsAreaChart, ResponsiveContainer } from 'recharts';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getThemeColor,\n MantineColor,\n StylesApiProps,\n useProps,\n useStyles,\n} from '@mantine/core';\nimport { AreaChartCurveType, AreaGradient } from '../AreaChart';\n\nconst classes = {};\n\nexport interface SparklineTrendColors {\n positive: MantineColor;\n negative: MantineColor;\n neutral?: MantineColor;\n}\n\nexport type SparklineStylesNames = 'root';\nexport type SparklineCssVariables = {\n root: '--chart-color';\n};\n\nexport interface SparklineProps\n extends BoxProps,\n StylesApiProps<SparklineFactory>,\n ElementProps<'div'> {\n /** Data used to render the chart */\n data: (number | null)[];\n\n /** Key of `theme.colors` or any valid CSS color @default `theme.primaryColor` */\n color?: MantineColor;\n\n /** Determines whether the chart fill should be a gradient @default `true` */\n withGradient?: boolean;\n\n /** Controls fill opacity of the area @default `0.6` */\n fillOpacity?: number;\n\n /** Type of the curve @default `'linear'` */\n curveType?: AreaChartCurveType;\n\n /** Area stroke width @default `2` */\n strokeWidth?: number;\n\n /** If set, `color` prop is ignored and chart color is determined by the difference between first and last value. */\n trendColors?: SparklineTrendColors;\n\n /** Determines whether null values should be connected with other values @default `true` */\n connectNulls?: boolean;\n\n /** Props passed down to the underlying recharts `Area` component */\n areaProps?: Omit<AreaProps, 'data' | 'dataKey' | 'ref'>;\n}\n\nexport type SparklineFactory = Factory<{\n props: SparklineProps;\n ref: HTMLDivElement;\n stylesNames: SparklineStylesNames;\n vars: SparklineCssVariables;\n}>;\n\nconst defaultProps = {\n withGradient: true,\n connectNulls: true,\n fillOpacity: 0.6,\n strokeWidth: 2,\n curveType: 'linear',\n} satisfies Partial<SparklineProps>;\n\nfunction getTrendColor(data: (number | null)[], trendColors: SparklineTrendColors) {\n const first = data[0];\n const last = data[data.length - 1];\n\n if (first === null || last === null) {\n return trendColors.neutral || trendColors.positive;\n }\n\n if (first < last) {\n return trendColors.positive;\n }\n\n if (first > last) {\n return trendColors.negative;\n }\n\n return trendColors.neutral || trendColors.positive;\n}\n\nconst varsResolver = createVarsResolver<SparklineFactory>(\n (theme, { color, data, trendColors }) => ({\n root: {\n '--chart-color': trendColors\n ? getThemeColor(getTrendColor(data, trendColors), theme)\n : color\n ? getThemeColor(color, theme)\n : undefined,\n },\n })\n);\n\nexport const Sparkline = factory<SparklineFactory>((_props, ref) => {\n const props = useProps('Sparkline', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n data,\n withGradient,\n fillOpacity,\n curveType,\n strokeWidth,\n trendColors,\n connectNulls,\n areaProps,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<SparklineFactory>({\n name: 'Sparkline',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n const id = useId();\n const mappedData = useMemo(() => data.map((value, index) => ({ value, index })), [data]);\n\n return (\n <Box ref={ref} {...getStyles('root')} {...others} dir=\"ltr\">\n <ResponsiveContainer>\n <ReChartsAreaChart data={mappedData}>\n <Area\n dataKey=\"value\"\n type={curveType}\n fill={`url(#${id})`}\n stroke=\"var(--chart-color, var(--mantine-color-blue-filled))\"\n isAnimationActive={false}\n connectNulls={connectNulls}\n strokeWidth={strokeWidth}\n fillOpacity={1}\n {...areaProps}\n />\n\n <defs>\n <AreaGradient\n id={id}\n color=\"var(--chart-color, var(--mantine-color-blue-filled))\"\n fillOpacity={fillOpacity}\n withGradient={withGradient}\n />\n </defs>\n </ReChartsAreaChart>\n </ResponsiveContainer>\n </Box>\n );\n});\n\nSparkline.displayName = '@mantine/charts/Sparkline';\nSparkline.classes = classes;\n"],"names":["ReChartsAreaChart"],"mappings":";;;;;;;;AAiBA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAAU,CAAC,CAAA,CAAA;AAoDjB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,YAAe,CAAA,CAAA,CAAA,CAAA;AAAA,CACnB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACd,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACd,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,EAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACb,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,EAAA,CAAA,CAAA;AAAA,CAAA,CACb,SAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACb,CAAA,CAAA;AAEA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,MAAyB,WAAmC,CAAA,CAAA,CAAA;AACjF,CAAA,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AAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACxB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;"}
@@ -1,8 +1,8 @@
1
- import { AreaProps, DotProps, AreaChart as ReChartsAreaChart } from 'recharts';
1
+ import { AreaProps, AreaChart as ReChartsAreaChart } from 'recharts';
2
2
  import { BoxProps, ElementProps, Factory, MantineColor, StylesApiProps } from '@mantine/core';
3
3
  import { ChartLegendStylesNames } from '../ChartLegend';
4
4
  import { ChartTooltipStylesNames } from '../ChartTooltip';
5
- import type { BaseChartStylesNames, ChartSeries, GridChartBaseProps } from '../types';
5
+ import type { BaseChartStylesNames, ChartSeries, GridChartBaseProps, MantineChartDotProps } from '../types';
6
6
  export interface AreaChartSeries extends ChartSeries {
7
7
  strokeDasharray?: string | number;
8
8
  color: MantineColor;
@@ -16,35 +16,35 @@ export type AreaChartCSSVariables = {
16
16
  export interface AreaChartProps extends BoxProps, GridChartBaseProps, StylesApiProps<AreaChartFactory>, ElementProps<'div'> {
17
17
  /** An array of objects with `name` and `color` keys. Determines which data should be consumed from the `data` array. */
18
18
  series: AreaChartSeries[];
19
- /** Controls how chart areas are positioned relative to each other, `'default'` by default */
19
+ /** Controls how chart areas are positioned relative to each other @default `'default'` */
20
20
  type?: AreaChartType;
21
- /** Determines whether the chart area should be represented with a gradient instead of the solid color, `false` by default */
21
+ /** Determines whether the chart area should be represented with a gradient instead of the solid color @default `false` */
22
22
  withGradient?: boolean;
23
- /** Type of the curve, `'monotone'` by default */
23
+ /** Type of the curve @default `'monotone'` */
24
24
  curveType?: AreaChartCurveType;
25
- /** Determines whether dots should be displayed, `true` by default */
25
+ /** Determines whether dots should be displayed @default `true` */
26
26
  withDots?: boolean;
27
27
  /** Props passed down to all dots. Ignored if `withDots={false}` is set. */
28
- dotProps?: Omit<DotProps, 'ref'>;
28
+ dotProps?: MantineChartDotProps;
29
29
  /** Props passed down to all active dots. Ignored if `withDots={false}` is set. */
30
- activeDotProps?: Omit<DotProps, 'ref'>;
31
- /** Stroke width for the chart areas, `2` by default */
30
+ activeDotProps?: MantineChartDotProps;
31
+ /** Stroke width for the chart areas @default `2` */
32
32
  strokeWidth?: number;
33
33
  /** Props passed down to recharts `AreaChart` component */
34
34
  areaChartProps?: React.ComponentPropsWithoutRef<typeof ReChartsAreaChart>;
35
- /** Controls fill opacity of all areas, `0.2` by default */
35
+ /** Controls fill opacity of all areas @default `0.2` */
36
36
  fillOpacity?: number;
37
- /** A tuple of colors used when `type="split"` is set, ignored in all other cases. A tuple may include theme colors reference or any valid CSS colors `['green.7', 'red.7']` by default. */
37
+ /** A tuple of colors used when `type="split"` is set, ignored in all other cases. A tuple may include theme colors reference or any valid CSS colors @default `['green.7', 'red.7']` */
38
38
  splitColors?: [MantineColor, MantineColor];
39
39
  /** Offset for the split gradient. By default, value is inferred from `data` and `series` if possible. Must be generated from the data array with `getSplitOffset` function. */
40
40
  splitOffset?: number;
41
- /** Determines whether points with `null` values should be connected, `true` by default */
41
+ /** If set, points with `null` values are connected @default `true` */
42
42
  connectNulls?: boolean;
43
43
  /** Additional components that are rendered inside recharts `AreaChart` component */
44
44
  children?: React.ReactNode;
45
45
  /** Props passed down to recharts `Area` component */
46
46
  areaProps?: ((series: AreaChartSeries) => Partial<Omit<AreaProps, 'ref'>>) | Partial<Omit<AreaProps, 'ref'>>;
47
- /** Determines whether each point should have associated label, `false` by default */
47
+ /** If set, each point has an associated label @default `false` */
48
48
  withPointLabels?: boolean;
49
49
  }
50
50
  export type AreaChartFactory = Factory<{
@@ -16,9 +16,9 @@ export interface BarChartProps extends BoxProps, GridChartBaseProps, StylesApiPr
16
16
  data: Record<string, any>[];
17
17
  /** An array of objects with `name` and `color` keys. Determines which data should be consumed from the `data` array. */
18
18
  series: BarChartSeries[];
19
- /** Controls how bars are positioned relative to each other, `'default'` by default */
19
+ /** Controls how bars are positioned relative to each other @default `'default'` */
20
20
  type?: BarChartType;
21
- /** Controls fill opacity of all bars, `1` by default */
21
+ /** Controls fill opacity of all bars @default `1` */
22
22
  fillOpacity?: number;
23
23
  /** Fill of hovered bar section, by default value is based on color scheme */
24
24
  cursorFill?: MantineColor;
@@ -28,11 +28,11 @@ export interface BarChartProps extends BoxProps, GridChartBaseProps, StylesApiPr
28
28
  children?: React.ReactNode;
29
29
  /** Props passed down to recharts `Bar` component */
30
30
  barProps?: ((series: BarChartSeries) => Partial<Omit<BarProps, 'ref'>>) | Partial<Omit<BarProps, 'ref'>>;
31
- /** Determines whether a label with bar value should be displayed on top of each bar, incompatible with `type="stacked"` and `type="percent"`, `false` by default */
31
+ /** Determines whether a label with bar value should be displayed on top of each bar, incompatible with `type="stacked"` and `type="percent"` @default `false` */
32
32
  withBarValueLabel?: boolean;
33
33
  /** Props passed down to recharts `LabelList` component */
34
34
  valueLabelProps?: ((series: BarChartSeries) => Partial<Omit<LabelListProps<Record<string, any>>, 'ref'>>) | Partial<LabelListProps<Record<string, any>>>;
35
- /** Sets minimum height of the bar in px, `0` by default */
35
+ /** Sets minimum height of the bar in px @default `0` */
36
36
  minBarSize?: number;
37
37
  /** Maximum bar width in px */
38
38
  maxBarWidth?: number;
@@ -16,7 +16,7 @@ export interface BubbleChartProps extends BoxProps, StylesApiProps<BubbleChartFa
16
16
  dataKey: BubbleChartDataKey;
17
17
  /** Z axis range */
18
18
  range: [number, number];
19
- /** Color of the chart items. Key of `theme.colors` or any valid CSS color, `blue.6` by default. */
19
+ /** Color of the chart items. Key of `theme.colors` or any valid CSS color. @default `blue.6` */
20
20
  color?: MantineColor;
21
21
  /** Props passed down to the `XAxis` recharts component */
22
22
  xAxisProps?: Omit<XAxisProps, 'ref'>;
@@ -28,13 +28,13 @@ export interface BubbleChartProps extends BoxProps, StylesApiProps<BubbleChartFa
28
28
  tooltipProps?: Omit<TooltipProps<any, any>, 'ref'>;
29
29
  /** Props passed down to the `Scatter` component */
30
30
  scatterProps?: Partial<Omit<ScatterProps, 'ref'>>;
31
- /** Color of the text displayed inside the chart, `'dimmed'` by default */
31
+ /** Color of the text displayed inside the chart @default `'dimmed'` */
32
32
  textColor?: MantineColor;
33
33
  /** Color of the grid and cursor lines, by default depends on color scheme */
34
34
  gridColor?: MantineColor;
35
35
  /** Chart label displayed next to the x axis */
36
36
  label?: string;
37
- /** Determines whether the tooltip should be displayed, `true` by default */
37
+ /** Determines whether the tooltip should be displayed @default `true` */
38
38
  withTooltip?: boolean;
39
39
  /** Function to format z axis values */
40
40
  valueFormatter?: (value: number) => string;
@@ -1,19 +1,19 @@
1
1
  import { BoxProps, ElementProps, Factory, StylesApiProps } from '@mantine/core';
2
2
  import { ChartSeries } from '../types';
3
- export declare function getFilteredChartLegendPayload(payload: Record<string, any>[]): Record<string, any>[];
3
+ export declare function getFilteredChartLegendPayload(payload: readonly Record<string, any>[]): Record<string, any>[];
4
4
  export type ChartLegendStylesNames = 'legendItem' | 'legendItemColor' | 'legendItemName' | 'legend';
5
5
  export interface ChartLegendProps extends BoxProps, StylesApiProps<ChartLegendFactory>, ElementProps<'div'> {
6
6
  /** Chart data provided by recharts */
7
- payload: Record<string, any>[] | undefined;
7
+ payload: readonly Record<string, any>[] | undefined;
8
8
  /** Function called when mouse enters/leaves one of the legend items */
9
9
  onHighlight: (area: string | null) => void;
10
10
  /** Position of the legend relative to the chart, used to apply margin on the corresponding side */
11
11
  legendPosition: 'top' | 'bottom' | 'middle';
12
12
  /** Data used for labels, only applicable for area charts: AreaChart, LineChart, BarChart */
13
13
  series?: ChartSeries[];
14
- /** Determines whether color swatch should be shown next to the label, `true` by default */
14
+ /** Determines whether color swatch should be shown next to the label @default `true` */
15
15
  showColor?: boolean;
16
- /** Determines whether the legend should be centered, `false` by default */
16
+ /** Determines whether the legend should be centered @default `false` */
17
17
  centered?: boolean;
18
18
  }
19
19
  export type ChartLegendFactory = Factory<{
@@ -9,7 +9,7 @@ export interface ChartTooltipProps extends BoxProps, StylesApiProps<ChartTooltip
9
9
  payload: Record<string, any>[] | undefined;
10
10
  /** Data units, provided by parent component */
11
11
  unit?: string;
12
- /** Tooltip type that determines the content and styles, `area` for LineChart, AreaChart and BarChart, `radial` for DonutChart and PieChart, `'area'` by default */
12
+ /** Tooltip type that determines the content and styles, `area` for LineChart, AreaChart and BarChart, `radial` for DonutChart and PieChart @default `'area'` */
13
13
  type?: 'area' | 'radial' | 'scatter';
14
14
  /** Id of the segment to display data for. Only applicable when `type="radial"`. If not set, all data is rendered. */
15
15
  segmentId?: string;
@@ -17,7 +17,7 @@ export interface ChartTooltipProps extends BoxProps, StylesApiProps<ChartTooltip
17
17
  series?: ChartSeries[];
18
18
  /** A function to format values */
19
19
  valueFormatter?: (value: number) => string;
20
- /** Determines whether the color swatch should be visible, `true` by default */
20
+ /** Determines whether the color swatch should be visible @default `true` */
21
21
  showColor?: boolean;
22
22
  }
23
23
  export type ChartTooltipFactory = Factory<{
@@ -1,8 +1,8 @@
1
- import { AreaProps, BarProps, DotProps, LineProps, ComposedChart as ReChartsCompositeChart } from 'recharts';
1
+ import { AreaProps, BarProps, LineProps, ComposedChart as ReChartsCompositeChart } from 'recharts';
2
2
  import { BoxProps, ElementProps, Factory, StylesApiProps } from '@mantine/core';
3
3
  import { ChartLegendStylesNames } from '../ChartLegend';
4
4
  import { ChartTooltipStylesNames } from '../ChartTooltip';
5
- import type { BaseChartStylesNames, ChartSeries, GridChartBaseProps } from '../types';
5
+ import type { BaseChartStylesNames, ChartSeries, GridChartBaseProps, MantineChartDotProps } from '../types';
6
6
  export type CompositeChartCurveType = 'bump' | 'linear' | 'natural' | 'monotone' | 'step' | 'stepBefore' | 'stepAfter';
7
7
  export interface CompositeChartSeries extends ChartSeries {
8
8
  type: 'line' | 'area' | 'bar';
@@ -17,17 +17,17 @@ export interface CompositeChartProps extends BoxProps, Omit<GridChartBaseProps,
17
17
  data: Record<string, any>[];
18
18
  /** An array of objects with `name` and `color` keys. Determines which data should be consumed from the `data` array. */
19
19
  series: CompositeChartSeries[];
20
- /** Type of the curve, `'monotone'` by default */
20
+ /** Type of the curve @default `'monotone'` */
21
21
  curveType?: CompositeChartCurveType;
22
- /** Determines whether dots should be displayed, `true` by default */
22
+ /** Determines whether dots should be displayed @default `true` */
23
23
  withDots?: boolean;
24
24
  /** Props passed down to all dots. Ignored if `withDots={false}` is set. */
25
- dotProps?: Omit<DotProps, 'ref'>;
25
+ dotProps?: MantineChartDotProps;
26
26
  /** Props passed down to all active dots. Ignored if `withDots={false}` is set. */
27
- activeDotProps?: Omit<DotProps, 'ref'>;
28
- /** Stroke width for the chart lines, `2` by default */
27
+ activeDotProps?: MantineChartDotProps;
28
+ /** Stroke width for the chart lines @default `2` */
29
29
  strokeWidth?: number;
30
- /** Determines whether points with `null` values should be connected, `true` by default */
30
+ /** Determines whether points with `null` values should be connected @default `true` */
31
31
  connectNulls?: boolean;
32
32
  /** Additional components that are rendered inside recharts `AreaChart` component */
33
33
  children?: React.ReactNode;
@@ -37,11 +37,11 @@ export interface CompositeChartProps extends BoxProps, Omit<GridChartBaseProps,
37
37
  areaProps?: ((series: CompositeChartSeries) => Partial<Omit<AreaProps, 'ref'>>) | Partial<Omit<AreaProps, 'ref'>>;
38
38
  /** Props passed down to recharts `Bar` component */
39
39
  barProps?: ((series: CompositeChartSeries) => Partial<Omit<BarProps, 'ref'>>) | Partial<Omit<BarProps, 'ref'>>;
40
- /** Determines whether each point should have associated label, `false` by default */
40
+ /** Determines whether each point should have associated label @default `false` */
41
41
  withPointLabels?: boolean;
42
- /** Determines whether a label with bar value should be displayed on top of each bar, `false` by default */
42
+ /** Determines whether a label with bar value should be displayed on top of each bar @default `false` */
43
43
  withBarValueLabel?: boolean;
44
- /** Sets minimum height of the bar in px, `0` by default */
44
+ /** Sets minimum height of the bar in px @default `0` */
45
45
  minBarSize?: number;
46
46
  /** Maximum bar width in px */
47
47
  maxBarWidth?: number;
@@ -13,9 +13,9 @@ export type DonutChartCssVariables = {
13
13
  export interface DonutChartProps extends BoxProps, StylesApiProps<DonutChartFactory>, ElementProps<'div'> {
14
14
  /** Data used to render chart */
15
15
  data: DonutChartCell[];
16
- /** Determines whether the tooltip should be displayed when one of the section is hovered, `true` by default */
16
+ /** Determines whether the tooltip should be displayed when one of the section is hovered @default `true` */
17
17
  withTooltip?: boolean;
18
- /** Tooltip animation duration in ms, `0` by default */
18
+ /** Tooltip animation duration in ms @default `0` */
19
19
  tooltipAnimationDuration?: number;
20
20
  /** Props passed down to `Tooltip` recharts component */
21
21
  tooltipProps?: Omit<TooltipProps<any, any>, 'ref'>;
@@ -25,23 +25,23 @@ export interface DonutChartProps extends BoxProps, StylesApiProps<DonutChartFact
25
25
  strokeColor?: MantineColor;
26
26
  /** Controls text color of all labels, by default depends on color scheme */
27
27
  labelColor?: MantineColor;
28
- /** Controls padding between segments, `0` by default */
28
+ /** Controls padding between segments @default `0` */
29
29
  paddingAngle?: number;
30
- /** Determines whether each segment should have associated label, `false` by default */
30
+ /** Determines whether each segment should have associated label @default `false` */
31
31
  withLabels?: boolean;
32
- /** Determines whether segments labels should have lines that connect the segment with the label, `true` by default */
32
+ /** Determines whether segments labels should have lines that connect the segment with the label @default `true` */
33
33
  withLabelsLine?: boolean;
34
- /** Controls thickness of the chart segments, `20` by default */
34
+ /** Controls thickness of the chart segments @default `20` */
35
35
  thickness?: number;
36
- /** Controls chart width and height, height is increased by 40 if `withLabels` prop is set. Cannot be less than `thickness`. `80` by default */
36
+ /** Controls chart width and height, height is increased by 40 if `withLabels` prop is set. Cannot be less than `thickness`. @default `80` */
37
37
  size?: number;
38
- /** Controls width of segments stroke, `1` by default */
38
+ /** Controls width of segments stroke @default `1` */
39
39
  strokeWidth?: number;
40
- /** Controls angle at which chart starts, `0` by default. Set to `180` to render the chart as semicircle. */
40
+ /** Controls angle at which chart starts. Set to `180` to render the chart as semicircle. @default `0` */
41
41
  startAngle?: number;
42
- /** Controls angle at which charts ends, `360` by default. Set to `0` to render the chart as semicircle. */
42
+ /** Controls angle at which charts ends. Set to `0` to render the chart as semicircle. @default `360` */
43
43
  endAngle?: number;
44
- /** Determines which data is displayed in the tooltip. `'all'` – display all values, `'segment'` – display only hovered segment. `'all'` by default. */
44
+ /** Determines which data is displayed in the tooltip. `'all'` – display all values, `'segment'` – display only hovered segment. @default `'all'` */
45
45
  tooltipDataSource?: 'segment' | 'all';
46
46
  /** Chart label, displayed in the center of the chart */
47
47
  chartLabel?: string | number;
@@ -1,21 +1,22 @@
1
1
  import { FunnelProps, FunnelChart as RechartsFunnelChart, TooltipProps } from 'recharts';
2
2
  import { BoxProps, ElementProps, Factory, MantineColor, StylesApiProps } from '@mantine/core';
3
+ import { ChartTooltipStylesNames } from '../ChartTooltip/ChartTooltip';
3
4
  export interface FunnelChartCell {
4
5
  key?: string | number;
5
6
  name: string;
6
7
  value: number;
7
8
  color: MantineColor;
8
9
  }
9
- export type FunnelChartStylesNames = 'root';
10
+ export type FunnelChartStylesNames = 'root' | ChartTooltipStylesNames;
10
11
  export type FunnelChartCssVariables = {
11
12
  root: '--chart-stroke-color' | '--chart-labels-color' | '--chart-size';
12
13
  };
13
14
  export interface FunnelChartProps extends BoxProps, StylesApiProps<FunnelChartFactory>, ElementProps<'div'> {
14
15
  /** Data used to render chart */
15
16
  data: FunnelChartCell[];
16
- /** Determines whether the tooltip should be displayed when a section is hovered, `true` by default */
17
+ /** Determines whether the tooltip should be displayed when a section is hovered @default `true` */
17
18
  withTooltip?: boolean;
18
- /** Tooltip animation duration in ms, `0` by default */
19
+ /** Tooltip animation duration in ms @default `0` */
19
20
  tooltipAnimationDuration?: number;
20
21
  /** Props passed down to `Tooltip` recharts component */
21
22
  tooltipProps?: Omit<TooltipProps<any, any>, 'ref'>;
@@ -23,19 +24,19 @@ export interface FunnelChartProps extends BoxProps, StylesApiProps<FunnelChartFa
23
24
  funnelProps?: Partial<Omit<FunnelProps, 'ref'>>;
24
25
  /** Controls color of the segments stroke, by default depends on color scheme */
25
26
  strokeColor?: MantineColor;
26
- /** Controls text color of all labels, white by default */
27
+ /** Controls text color of all labels @default `'white'` */
27
28
  labelColor?: MantineColor;
28
- /** Controls chart width and height, `300` by default */
29
+ /** Controls chart width and height @default `300` */
29
30
  size?: number;
30
- /** Controls width of segments stroke, `1` by default */
31
+ /** Controls width of segments stroke @default `1` */
31
32
  strokeWidth?: number;
32
- /** Determines whether each segment should have associated label, `false` by default */
33
+ /** Determines whether each segment should have associated label @default `false` */
33
34
  withLabels?: boolean;
34
- /** Controls labels position relative to the segment, `'right'` by default */
35
+ /** Controls labels position relative to the segment @default `'right'` */
35
36
  labelsPosition?: 'right' | 'left' | 'inside';
36
37
  /** A function to format values inside the tooltip and labels */
37
38
  valueFormatter?: (value: number) => string;
38
- /** Determines which data is displayed in the tooltip. `'all'` – display all values, `'segment'` – display only hovered segment. `'all'` by default. */
39
+ /** Determines which data is displayed in the tooltip. `'all'` – display all values, `'segment'` – display only hovered segment. @default `'all'` */
39
40
  tooltipDataSource?: 'segment' | 'all';
40
41
  /** Additional elements rendered inside `FunnelChart` component */
41
42
  children?: React.ReactNode;
@@ -13,35 +13,35 @@ export interface HeatmapProps extends BoxProps, StylesApiProps<HeatmapFactory>,
13
13
  startDate?: Date | string;
14
14
  /** Heatmap end date. Current date by default. */
15
15
  endDate?: Date | string;
16
- /** If set, month labels are displayed, `false` by default */
16
+ /** If set, month labels are displayed @default `false` */
17
17
  withMonthLabels?: boolean;
18
18
  /** Month labels, array of 12 elements, can be used for localization */
19
19
  monthLabels?: string[];
20
- /** If set, weekday labels are displayed, `false` by default */
20
+ /** If set, weekday labels are displayed @default `false` */
21
21
  withWeekdayLabels?: boolean;
22
22
  /** Weekday labels, array of 7 elements, can be used for localization */
23
23
  weekdayLabels?: string[];
24
- /** If set, trailing dates that do not fall into the given `startDate` – `endDate` range are displayed to fill empty space. `true` by default */
24
+ /** If set, trailing dates that do not fall into the given `startDate` – `endDate` range are displayed to fill empty space. @default `true` */
25
25
  withOutsideDates?: boolean;
26
- /** First day of week, 0 – Sunday, 1 – Monday. `1` (Monday) by default */
26
+ /** First day of week, 0 – Sunday, 1 – Monday. @default 1 Monday */
27
27
  firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
28
- /** Size of day rect in px, `10` by default */
28
+ /** Size of day rect in px @default 10 */
29
29
  rectSize?: number;
30
- /** Gap between rects in px, `1` by default */
30
+ /** Gap between rects in px @default 1 */
31
31
  gap?: number;
32
- /** Rect radius in px, `2` by default */
32
+ /** Rect radius in px @default 2 */
33
33
  rectRadius?: number;
34
34
  /** Colors array, used to calculate color for each value, by default 4 shades of green colors are used */
35
35
  colors?: string[];
36
- /** Width of weekday labels column, `30` by default */
36
+ /** Width of weekday labels column @default 30 */
37
37
  weekdaysLabelsWidth?: number;
38
- /** Height of month labels row, `30` by default */
38
+ /** Height of month labels row @default 30 */
39
39
  monthsLabelsHeight?: number;
40
- /** Font size of month and weekday labels, `12` by default */
40
+ /** Font size of month and weekday labels @default 12 */
41
41
  fontSize?: number;
42
42
  /** A function to generate tooltip label based on the hovered rect date and value, required for the tooltip to be visible */
43
43
  getTooltipLabel?: (input: HeatmapRectData) => React.ReactNode;
44
- /** If set, tooltip is displayed on rect hover, `false` by default */
44
+ /** If set, tooltip is displayed on rect hover @default `false` */
45
45
  withTooltip?: boolean;
46
46
  /** Props passed down to the `Tooltip.Floating` component */
47
47
  tooltipProps?: Partial<TooltipFloatingProps>;
@@ -1,8 +1,8 @@
1
- import { DotProps, LineProps, LineChart as ReChartsLineChart } from 'recharts';
1
+ import { LineProps, LineChart as ReChartsLineChart } from 'recharts';
2
2
  import { BoxProps, ElementProps, Factory, MantineColor, StylesApiProps } from '@mantine/core';
3
3
  import { ChartLegendStylesNames } from '../ChartLegend';
4
4
  import { ChartTooltipStylesNames } from '../ChartTooltip';
5
- import type { BaseChartStylesNames, ChartSeries, GridChartBaseProps } from '../types';
5
+ import type { BaseChartStylesNames, ChartSeries, GridChartBaseProps, MantineChartDotProps } from '../types';
6
6
  export type LineChartType = 'default' | 'gradient';
7
7
  export interface LineChartGradientStop {
8
8
  offset: number;
@@ -21,31 +21,31 @@ export interface LineChartProps extends BoxProps, GridChartBaseProps, StylesApiP
21
21
  data: Record<string, any>[];
22
22
  /** An array of objects with `name` and `color` keys. Determines which data should be consumed from the `data` array. */
23
23
  series: LineChartSeries[];
24
- /** Controls styles of the line, `'default'` by default */
24
+ /** Controls styles of the line @default `'default'` */
25
25
  type?: LineChartType;
26
- /** Data used to generate gradient stops, `[{ offset: 0, color: 'red' }, { offset: 100, color: 'blue' }]` by default */
26
+ /** Data used to generate gradient stops @default `[{ offset: 0, color: 'red' }, { offset: 100, color: 'blue' }]` */
27
27
  gradientStops?: LineChartGradientStop[];
28
- /** Type of the curve, `'monotone'` by default */
28
+ /** Type of the curve @default `'monotone'` */
29
29
  curveType?: LineChartCurveType;
30
- /** Controls fill opacity of all lines, `1` by default */
30
+ /** Controls fill opacity of all lines @default `1` */
31
31
  fillOpacity?: number;
32
- /** Determines whether dots should be displayed, `true` by default */
32
+ /** Determines whether dots should be displayed @default `true` */
33
33
  withDots?: boolean;
34
34
  /** Props passed down to all dots. Ignored if `withDots={false}` is set. */
35
- dotProps?: Omit<DotProps, 'ref'>;
35
+ dotProps?: MantineChartDotProps;
36
36
  /** Props passed down to all active dots. Ignored if `withDots={false}` is set. */
37
- activeDotProps?: Omit<DotProps, 'ref'>;
38
- /** Stroke width for the chart lines, `2` by default */
37
+ activeDotProps?: MantineChartDotProps;
38
+ /** Stroke width for the chart lines @default `2` */
39
39
  strokeWidth?: number;
40
40
  /** Props passed down to recharts `LineChart` component */
41
41
  lineChartProps?: React.ComponentPropsWithoutRef<typeof ReChartsLineChart>;
42
- /** Determines whether points with `null` values should be connected, `true` by default */
42
+ /** Determines whether points with `null` values should be connected @default `true` */
43
43
  connectNulls?: boolean;
44
44
  /** Additional components that are rendered inside recharts `LineChart` component */
45
45
  children?: React.ReactNode;
46
46
  /** Props passed down to recharts `Line` component */
47
47
  lineProps?: ((series: LineChartSeries) => Partial<Omit<LineProps, 'ref'>>) | Partial<Omit<LineProps, 'ref'>>;
48
- /** Determines whether each point should have associated label, `false` by default */
48
+ /** Determines whether each point should have associated label @default `false` */
49
49
  withPointLabels?: boolean;
50
50
  }
51
51
  export type LineChartFactory = Factory<{
@@ -14,9 +14,9 @@ export type PieChartCssVariables = {
14
14
  export interface PieChartProps extends BoxProps, StylesApiProps<PieChartFactory>, ElementProps<'div'> {
15
15
  /** Data used to render chart */
16
16
  data: PieChartCell[];
17
- /** Determines whether the tooltip should be displayed when one of the section is hovered, `true` by default */
17
+ /** Determines whether the tooltip should be displayed when one of the section is hovered @default `true` */
18
18
  withTooltip?: boolean;
19
- /** Tooltip animation duration in ms, `0` by default */
19
+ /** Tooltip animation duration in ms @default `0` */
20
20
  tooltipAnimationDuration?: number;
21
21
  /** Props passed down to `Tooltip` recharts component */
22
22
  tooltipProps?: Omit<TooltipProps<any, any>, 'ref'>;
@@ -26,29 +26,29 @@ export interface PieChartProps extends BoxProps, StylesApiProps<PieChartFactory>
26
26
  strokeColor?: MantineColor;
27
27
  /** Controls text color of all labels, white by default */
28
28
  labelColor?: MantineColor;
29
- /** Controls padding between segments, `0` by default */
29
+ /** Controls padding between segments @default `0` */
30
30
  paddingAngle?: number;
31
- /** Determines whether each segment should have associated label, `false` by default */
31
+ /** Determines whether each segment should have associated label @default `false` */
32
32
  withLabels?: boolean;
33
- /** Determines whether segments labels should have lines that connect the segment with the label, `true` by default */
33
+ /** Determines whether segments labels should have lines that connect the segment with the label @default `true` */
34
34
  withLabelsLine?: boolean;
35
- /** Controls chart width and height, height is increased by 40 if `withLabels` prop is set. Cannot be less than `thickness`. `80` by default */
35
+ /** Controls chart width and height, height is increased by 40 if `withLabels` prop is set. Cannot be less than `thickness`. @default `80` */
36
36
  size?: number;
37
- /** Controls width of segments stroke, `1` by default */
37
+ /** Controls width of segments stroke @default `1` */
38
38
  strokeWidth?: number;
39
- /** Controls angle at which chart starts, `0` by default. Set to `180` to render the chart as semicircle. */
39
+ /** Controls angle at which chart starts. Set to `180` to render the chart as semicircle. @default `0` */
40
40
  startAngle?: number;
41
- /** Controls angle at which charts ends, `360` by default. Set to `0` to render the chart as semicircle. */
41
+ /** Controls angle at which charts ends. Set to `0` to render the chart as semicircle. @default `360` */
42
42
  endAngle?: number;
43
- /** Determines which data is displayed in the tooltip. `'all'` – display all values, `'segment'` – display only hovered segment. `'all'` by default. */
43
+ /** Determines which data is displayed in the tooltip. `'all'` – display all values, `'segment'` – display only hovered segment. @default `'all'` */
44
44
  tooltipDataSource?: 'segment' | 'all';
45
45
  /** Additional elements rendered inside `PieChart` component */
46
46
  children?: React.ReactNode;
47
47
  /** Props passed down to recharts `PieChart` component */
48
48
  pieChartProps?: React.ComponentPropsWithoutRef<typeof ReChartsPieChart>;
49
- /** Controls labels position relative to the segment, `'outside'` by default */
49
+ /** Controls labels position relative to the segment @default `'outside'` */
50
50
  labelsPosition?: 'inside' | 'outside';
51
- /** Type of labels to display, `'value'` by default */
51
+ /** Type of labels to display @default `'value'` */
52
52
  labelsType?: 'value' | 'percent';
53
53
  /** A function to format values inside the tooltip */
54
54
  valueFormatter?: (value: number) => string;
@@ -1,6 +1,8 @@
1
- import { DotProps, LegendProps, PolarAngleAxisProps, PolarGridProps, PolarRadiusAxisProps, RadarProps, RadarChart as ReChartsRadarChart, TooltipProps } from 'recharts';
1
+ import { LegendProps, PolarAngleAxisProps, PolarGridProps, PolarRadiusAxisProps, RadarProps, RadarChart as ReChartsRadarChart, TooltipProps } from 'recharts';
2
2
  import { BoxProps, ElementProps, Factory, MantineColor, StylesApiProps } from '@mantine/core';
3
+ import { ChartLegendStylesNames } from '../ChartLegend';
3
4
  import { ChartTooltipStylesNames } from '../ChartTooltip';
5
+ import { MantineChartDotProps } from '../types';
4
6
  export interface RadarChartSeries {
5
7
  name: string;
6
8
  color: MantineColor;
@@ -8,7 +10,7 @@ export interface RadarChartSeries {
8
10
  opacity?: number;
9
11
  label?: string;
10
12
  }
11
- export type RadarChartStylesNames = 'root' | 'container' | ChartTooltipStylesNames;
13
+ export type RadarChartStylesNames = 'root' | 'container' | ChartTooltipStylesNames | ChartLegendStylesNames;
12
14
  export type RadarChartCssVariables = {
13
15
  root: '--chart-grid-color' | '--chart-text-color';
14
16
  };
@@ -23,13 +25,13 @@ export interface RadarChartProps extends BoxProps, StylesApiProps<RadarChartFact
23
25
  gridColor?: MantineColor;
24
26
  /** Controls color of all text elements. By default, color depends on the color scheme. */
25
27
  textColor?: MantineColor;
26
- /** Determines whether PolarGrid component should be displayed, `true` by default. */
28
+ /** Determines whether PolarGrid component should be displayed @default `true`. */
27
29
  withPolarGrid?: boolean;
28
- /** Determines whether PolarAngleAxis component should be displayed, `true` by default */
30
+ /** Determines whether PolarAngleAxis component should be displayed @default `true` */
29
31
  withPolarAngleAxis?: boolean;
30
- /** Determines whether PolarRadiusAxisProps component should be displayed, `false` by default */
32
+ /** Determines whether PolarRadiusAxisProps component should be displayed @default `false` */
31
33
  withPolarRadiusAxis?: boolean;
32
- /** Determines whether Tooltip component should be displayed, `false` by default */
34
+ /** Determines whether Tooltip component should be displayed @default `false` */
33
35
  withTooltip?: boolean;
34
36
  /** Props passed down to recharts Radar component */
35
37
  radarProps?: ((series: RadarChartSeries) => Partial<Omit<RadarProps, 'ref'>>) | Partial<Omit<RadarProps, 'ref'>>;
@@ -45,16 +47,16 @@ export interface RadarChartProps extends BoxProps, StylesApiProps<RadarChartFact
45
47
  legendProps?: Omit<LegendProps, 'ref'>;
46
48
  /** Props passed down to recharts Tooltip component */
47
49
  tooltipProps?: Omit<TooltipProps<any, any>, 'ref'>;
48
- /** Tooltip position animation duration in ms, `0` by default */
50
+ /** Tooltip position animation duration in ms @default `0` */
49
51
  tooltipAnimationDuration?: number;
50
- /** Determines whether the legend should be displayed, `false` by default */
52
+ /** Determines whether the legend should be displayed @default `false` */
51
53
  withLegend?: boolean;
52
- /** Determines whether dots should be displayed, `false` by default */
54
+ /** Determines whether dots should be displayed @default `false` */
53
55
  withDots?: boolean;
54
56
  /** Props passed down to all dots. Ignored if `withDots={false}` is set. */
55
- dotProps?: Omit<DotProps, 'ref'>;
57
+ dotProps?: MantineChartDotProps;
56
58
  /** Props passed down to all active dots. Ignored if `withDots={false}` is set. */
57
- activeDotProps?: Omit<DotProps, 'ref'>;
59
+ activeDotProps?: MantineChartDotProps;
58
60
  /** Additional components that are rendered inside recharts `RadarChart` component */
59
61
  children?: React.ReactNode;
60
62
  }