@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,6 +1,7 @@
1
1
  import { LegendProps, RadialBarProps, RadialBarChart as ReChartsRadialBarChart, TooltipProps } from 'recharts';
2
2
  import { BoxProps, ElementProps, Factory, StylesApiProps } from '@mantine/core';
3
- export type RadialBarChartStylesNames = 'root' | 'tooltip';
3
+ import { ChartLegendStylesNames } from '../ChartLegend';
4
+ export type RadialBarChartStylesNames = 'root' | 'tooltip' | ChartLegendStylesNames;
4
5
  export type RadialBarChartCssVariables = {
5
6
  root: '--chart-empty-background';
6
7
  };
@@ -11,19 +12,19 @@ export interface RadialBarChartProps extends BoxProps, StylesApiProps<RadialBarC
11
12
  dataKey: string;
12
13
  /** Size of bars in px, `20` by default */
13
14
  barSize?: number;
14
- /** Determines whether empty bars area should be visible, `true` by default */
15
+ /** Determines whether empty bars area should be visible @default `true` */
15
16
  withBackground?: boolean;
16
- /** Determines whether labels should be displayed, `false` by default */
17
+ /** Determines whether labels should be displayed @default `false` */
17
18
  withLabels?: boolean;
18
- /** Determines whether the legend should be displayed, `false` by default */
19
+ /** Determines whether the legend should be displayed @default `false` */
19
20
  withLegend?: boolean;
20
- /** Determines whether the tooltip should be displayed when one of the bars is hovered, `true` by default */
21
+ /** Determines whether the tooltip should be displayed when one of the bars is hovered @default `true` */
21
22
  withTooltip?: boolean;
22
23
  /** Color of the empty background, by default depends on the color scheme */
23
24
  emptyBackgroundColor?: string;
24
- /** Angle at which chart starts, `90` by default */
25
+ /** Angle at which chart starts @default `90` */
25
26
  startAngle?: number;
26
- /** Angle at which chart ends, `-270` by default */
27
+ /** Angle at which chart ends @default `-270` */
27
28
  endAngle?: number;
28
29
  /** Props passed down to recharts RadialBar component */
29
30
  radialBarProps?: Omit<RadialBarProps, 'ref'>;
@@ -13,19 +13,19 @@ export type SparklineCssVariables = {
13
13
  export interface SparklineProps extends BoxProps, StylesApiProps<SparklineFactory>, ElementProps<'div'> {
14
14
  /** Data used to render the chart */
15
15
  data: (number | null)[];
16
- /** Key of `theme.colors` or any valid CSS color, `theme.primaryColor` by default */
16
+ /** Key of `theme.colors` or any valid CSS color @default `theme.primaryColor` */
17
17
  color?: MantineColor;
18
- /** Determines whether the chart fill should be a gradient, `true` by default */
18
+ /** Determines whether the chart fill should be a gradient @default `true` */
19
19
  withGradient?: boolean;
20
- /** Controls fill opacity of the area, `0.6` by default */
20
+ /** Controls fill opacity of the area @default `0.6` */
21
21
  fillOpacity?: number;
22
- /** Type of the curve, `'linear'` by default */
22
+ /** Type of the curve @default `'linear'` */
23
23
  curveType?: AreaChartCurveType;
24
- /** Area stroke width, `2` by default */
24
+ /** Area stroke width @default `2` */
25
25
  strokeWidth?: number;
26
26
  /** If set, `color` prop is ignored and chart color is determined by the difference between first and last value. */
27
27
  trendColors?: SparklineTrendColors;
28
- /** Determines whether null values should be connected with other values, `true` by default */
28
+ /** Determines whether null values should be connected with other values @default `true` */
29
29
  connectNulls?: boolean;
30
30
  /** Props passed down to the underlying recharts `Area` component */
31
31
  areaProps?: Omit<AreaProps, 'data' | 'dataKey' | 'ref'>;
package/lib/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { CartesianGridProps, LabelProps, LegendProps, ReferenceLineProps, TooltipProps, XAxisProps, YAxisProps } from 'recharts';
1
+ import type { CartesianGridProps, DotProps, LabelProps, LegendProps, ReferenceLineProps, TooltipProps, XAxisProps, YAxisProps } from 'recharts';
2
2
  import type { MantineColor } from '@mantine/core';
3
3
  export interface ChartReferenceLineProps extends Omit<ReferenceLineProps, 'ref' | 'label'> {
4
4
  color?: MantineColor;
@@ -67,3 +67,6 @@ export interface GridChartBaseProps {
67
67
  /** Determines whether additional y-axis should be displayed on the right side of the chart, `false` by default */
68
68
  withRightYAxis?: boolean;
69
69
  }
70
+ export type MantineChartDotProps = Omit<DotProps, 'ref'> & {
71
+ strokeWidth?: number;
72
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mantine/charts",
3
- "version": "8.1.3",
3
+ "version": "8.2.0",
4
4
  "description": "Charts components built with recharts and Mantine",
5
5
  "homepage": "https://mantine.dev/",
6
6
  "license": "MIT",
@@ -35,11 +35,11 @@
35
35
  "directory": "packages/@mantine/charts"
36
36
  },
37
37
  "peerDependencies": {
38
- "@mantine/core": "8.1.3",
39
- "@mantine/hooks": "8.1.3",
38
+ "@mantine/core": "8.2.0",
39
+ "@mantine/hooks": "8.2.0",
40
40
  "react": "^18.x || ^19.x",
41
41
  "react-dom": "^18.x || ^19.x",
42
- "recharts": "^2.13.3"
42
+ "recharts": ">=2.13.3"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@mantine-tests/core": "workspace:*",