@mantine/charts 9.0.0-alpha.6 → 9.0.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/README.md +2 -2
- package/cjs/AreaChart/AreaChart.cjs +1 -0
- package/cjs/AreaChart/AreaChart.cjs.map +1 -1
- package/cjs/AreaChart/AreaGradient.cjs +1 -0
- package/cjs/AreaChart/AreaGradient.cjs.map +1 -1
- package/cjs/AreaChart/AreaSplit.cjs +1 -0
- package/cjs/AreaChart/AreaSplit.cjs.map +1 -1
- package/cjs/BarChart/BarChart.cjs +21 -4
- package/cjs/BarChart/BarChart.cjs.map +1 -1
- package/cjs/BarsList/BarsList.cjs +1 -0
- package/cjs/BarsList/BarsList.cjs.map +1 -1
- package/cjs/BubbleChart/BubbleChart.cjs +1 -0
- package/cjs/BubbleChart/BubbleChart.cjs.map +1 -1
- package/cjs/ChartLegend/ChartLegend.cjs +1 -0
- package/cjs/ChartLegend/ChartLegend.cjs.map +1 -1
- package/cjs/ChartTooltip/ChartTooltip.cjs +1 -0
- package/cjs/ChartTooltip/ChartTooltip.cjs.map +1 -1
- package/cjs/CompositeChart/CompositeChart.cjs +1 -0
- package/cjs/CompositeChart/CompositeChart.cjs.map +1 -1
- package/cjs/DonutChart/DonutChart.cjs +6 -5
- package/cjs/DonutChart/DonutChart.cjs.map +1 -1
- package/cjs/FunnelChart/FunnelChart.cjs +9 -9
- package/cjs/FunnelChart/FunnelChart.cjs.map +1 -1
- package/cjs/Heatmap/Heatmap.cjs +1 -0
- package/cjs/Heatmap/Heatmap.cjs.map +1 -1
- package/cjs/Heatmap/HeatmapSplitWeeks.cjs +1 -0
- package/cjs/Heatmap/HeatmapSplitWeeks.cjs.map +1 -1
- package/cjs/Heatmap/HeatmapWeeks.cjs +1 -0
- package/cjs/Heatmap/HeatmapWeeks.cjs.map +1 -1
- package/cjs/Heatmap/get-heat-color/get-heat-color.cjs +1 -1
- package/cjs/Heatmap/get-heat-color/get-heat-color.cjs.map +1 -1
- package/cjs/LineChart/LineChart.cjs +1 -0
- package/cjs/LineChart/LineChart.cjs.map +1 -1
- package/cjs/PieChart/PieChart.cjs +6 -5
- package/cjs/PieChart/PieChart.cjs.map +1 -1
- package/cjs/PointLabel/PointLabel.cjs +1 -0
- package/cjs/PointLabel/PointLabel.cjs.map +1 -1
- package/cjs/RadarChart/RadarChart.cjs +1 -0
- package/cjs/RadarChart/RadarChart.cjs.map +1 -1
- package/cjs/RadialBarChart/RadialBarChart.cjs +1 -0
- package/cjs/RadialBarChart/RadialBarChart.cjs.map +1 -1
- package/cjs/ScatterChart/ScatterChart.cjs +1 -0
- package/cjs/ScatterChart/ScatterChart.cjs.map +1 -1
- package/cjs/Sparkline/Sparkline.cjs +1 -0
- package/cjs/Sparkline/Sparkline.cjs.map +1 -1
- package/esm/BarChart/BarChart.mjs +21 -6
- package/esm/BarChart/BarChart.mjs.map +1 -1
- package/esm/DonutChart/DonutChart.mjs +6 -6
- package/esm/DonutChart/DonutChart.mjs.map +1 -1
- package/esm/FunnelChart/FunnelChart.mjs +9 -10
- package/esm/FunnelChart/FunnelChart.mjs.map +1 -1
- package/esm/Heatmap/get-heat-color/get-heat-color.mjs +1 -1
- package/esm/Heatmap/get-heat-color/get-heat-color.mjs.map +1 -1
- package/esm/PieChart/PieChart.mjs +6 -6
- package/esm/PieChart/PieChart.mjs.map +1 -1
- package/lib/BarChart/BarChart.d.ts +1 -0
- package/lib/DonutChart/DonutChart.d.ts +3 -3
- package/lib/PieChart/PieChart.d.ts +3 -3
- package/package.json +3 -3
- package/cjs/SankeyChart/SankeyChart.cjs +0 -202
- package/cjs/SankeyChart/SankeyChart.cjs.map +0 -1
- package/cjs/SankeyChart/SankeyChart.module.cjs +0 -7
- package/cjs/SankeyChart/SankeyChart.module.cjs.map +0 -1
- package/cjs/Treemap/Treemap.cjs +0 -133
- package/cjs/Treemap/Treemap.cjs.map +0 -1
- package/cjs/Treemap/Treemap.module.cjs +0 -7
- package/cjs/Treemap/Treemap.module.cjs.map +0 -1
- package/esm/SankeyChart/SankeyChart.mjs +0 -200
- package/esm/SankeyChart/SankeyChart.mjs.map +0 -1
- package/esm/SankeyChart/SankeyChart.module.mjs +0 -7
- package/esm/SankeyChart/SankeyChart.module.mjs.map +0 -1
- package/esm/Treemap/Treemap.mjs +0 -131
- package/esm/Treemap/Treemap.mjs.map +0 -1
- package/esm/Treemap/Treemap.module.mjs +0 -7
- package/esm/Treemap/Treemap.module.mjs.map +0 -1
- package/lib/SankeyChart/SankeyChart.d.ts +0 -71
- package/lib/SankeyChart/index.d.ts +0 -12
- package/lib/Treemap/Treemap.d.ts +0 -57
- package/lib/Treemap/index.d.ts +0 -10
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SankeyProps as RechartsSankeyProps, TooltipProps } from 'recharts';
|
|
3
|
-
import { BoxProps, ElementProps, Factory, MantineColor, StylesApiProps } from '@mantine/core';
|
|
4
|
-
import { ChartTooltipStylesNames } from '../ChartTooltip/ChartTooltip';
|
|
5
|
-
export interface SankeyChartNode {
|
|
6
|
-
name: string;
|
|
7
|
-
color?: MantineColor;
|
|
8
|
-
[key: string]: unknown;
|
|
9
|
-
}
|
|
10
|
-
export interface SankeyChartLink {
|
|
11
|
-
source: number;
|
|
12
|
-
target: number;
|
|
13
|
-
value: number;
|
|
14
|
-
[key: string]: unknown;
|
|
15
|
-
}
|
|
16
|
-
export interface SankeyChartData {
|
|
17
|
-
nodes: SankeyChartNode[];
|
|
18
|
-
links: SankeyChartLink[];
|
|
19
|
-
}
|
|
20
|
-
export type SankeyChartStylesNames = 'root' | ChartTooltipStylesNames;
|
|
21
|
-
export type SankeyChartCssVariables = {
|
|
22
|
-
root: '--chart-node-color' | '--chart-link-color' | '--chart-text-color' | '--chart-height';
|
|
23
|
-
};
|
|
24
|
-
export interface SankeyChartProps extends BoxProps, StylesApiProps<SankeyChartFactory>, ElementProps<'div'> {
|
|
25
|
-
/** Data used to render chart, must include `nodes` and `links` arrays */
|
|
26
|
-
data: SankeyChartData;
|
|
27
|
-
/** Controls chart height @default 300 */
|
|
28
|
-
height?: number;
|
|
29
|
-
/** The width of each node @default 10 */
|
|
30
|
-
nodeWidth?: number;
|
|
31
|
-
/** The padding between nodes @default 10 */
|
|
32
|
-
nodePadding?: number;
|
|
33
|
-
/** The curvature of links between nodes @default 0.5 */
|
|
34
|
-
linkCurvature?: number;
|
|
35
|
-
/** The number of relaxation iterations @default 32 */
|
|
36
|
-
iterations?: number;
|
|
37
|
-
/** Default color for nodes, by default depends on color scheme */
|
|
38
|
-
nodeColor?: MantineColor;
|
|
39
|
-
/** An array of colors used for nodes when no `color` is set on individual nodes */
|
|
40
|
-
colors?: MantineColor[];
|
|
41
|
-
/** Default color for links, by default depends on color scheme */
|
|
42
|
-
linkColor?: MantineColor;
|
|
43
|
-
/** Opacity of the link fill @default 0.4 */
|
|
44
|
-
linkOpacity?: number;
|
|
45
|
-
/** Determines whether the tooltip should be displayed when hovered @default true */
|
|
46
|
-
withTooltip?: boolean;
|
|
47
|
-
/** Tooltip animation duration in ms @default 0 */
|
|
48
|
-
tooltipAnimationDuration?: number;
|
|
49
|
-
/** Props passed down to `Tooltip` recharts component */
|
|
50
|
-
tooltipProps?: Omit<TooltipProps<any, any>, 'ref'>;
|
|
51
|
-
/** Props passed down to recharts `Sankey` component */
|
|
52
|
-
sankeyProps?: Partial<Omit<RechartsSankeyProps, 'ref' | 'data'>>;
|
|
53
|
-
/** Controls text color of labels @default dimmed */
|
|
54
|
-
textColor?: MantineColor;
|
|
55
|
-
/** A function to format values inside the tooltip and node labels */
|
|
56
|
-
valueFormatter?: (value: number) => string;
|
|
57
|
-
/** Additional elements rendered inside `Sankey` component */
|
|
58
|
-
children?: React.ReactNode;
|
|
59
|
-
}
|
|
60
|
-
export type SankeyChartFactory = Factory<{
|
|
61
|
-
props: SankeyChartProps;
|
|
62
|
-
ref: HTMLDivElement;
|
|
63
|
-
stylesNames: SankeyChartStylesNames;
|
|
64
|
-
vars: SankeyChartCssVariables;
|
|
65
|
-
}>;
|
|
66
|
-
export declare const SankeyChart: import("@mantine/core").MantineComponent<{
|
|
67
|
-
props: SankeyChartProps;
|
|
68
|
-
ref: HTMLDivElement;
|
|
69
|
-
stylesNames: SankeyChartStylesNames;
|
|
70
|
-
vars: SankeyChartCssVariables;
|
|
71
|
-
}>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { SankeyChartCssVariables, SankeyChartData, SankeyChartFactory, SankeyChartLink, SankeyChartNode, SankeyChartProps, SankeyChartStylesNames } from './SankeyChart';
|
|
2
|
-
export { SankeyChart } from './SankeyChart';
|
|
3
|
-
export type { SankeyChartProps, SankeyChartStylesNames, SankeyChartCssVariables, SankeyChartFactory, SankeyChartData, SankeyChartNode, SankeyChartLink, };
|
|
4
|
-
export declare namespace SankeyChart {
|
|
5
|
-
type Props = SankeyChartProps;
|
|
6
|
-
type StylesNames = SankeyChartStylesNames;
|
|
7
|
-
type CssVariables = SankeyChartCssVariables;
|
|
8
|
-
type Factory = SankeyChartFactory;
|
|
9
|
-
type Data = SankeyChartData;
|
|
10
|
-
type Node = SankeyChartNode;
|
|
11
|
-
type Link = SankeyChartLink;
|
|
12
|
-
}
|
package/lib/Treemap/Treemap.d.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TreemapProps as RechartsTreemapProps, TooltipProps } from 'recharts';
|
|
3
|
-
import { BoxProps, ElementProps, Factory, MantineColor, StylesApiProps } from '@mantine/core';
|
|
4
|
-
import { ChartTooltipStylesNames } from '../ChartTooltip/ChartTooltip';
|
|
5
|
-
export interface TreemapData {
|
|
6
|
-
name: string;
|
|
7
|
-
value?: number;
|
|
8
|
-
color?: MantineColor;
|
|
9
|
-
children?: TreemapData[];
|
|
10
|
-
[key: string]: unknown;
|
|
11
|
-
}
|
|
12
|
-
export type TreemapStylesNames = 'root' | ChartTooltipStylesNames;
|
|
13
|
-
export type TreemapCssVariables = {
|
|
14
|
-
root: '--chart-stroke-color' | '--chart-height';
|
|
15
|
-
};
|
|
16
|
-
export interface TreemapProps extends BoxProps, StylesApiProps<TreemapFactory>, ElementProps<'div'> {
|
|
17
|
-
/** Data used to render chart */
|
|
18
|
-
data: TreemapData[];
|
|
19
|
-
/** Key in data object for the value @default 'value' */
|
|
20
|
-
dataKey?: string;
|
|
21
|
-
/** The treemap will try to keep every single rectangle's aspect ratio near the aspectRatio given @default 1.618033988749895 */
|
|
22
|
-
aspectRatio?: number;
|
|
23
|
-
/** Determines whether the tooltip should be displayed when a node is hovered @default true */
|
|
24
|
-
withTooltip?: boolean;
|
|
25
|
-
/** Tooltip animation duration in ms @default 0 */
|
|
26
|
-
tooltipAnimationDuration?: number;
|
|
27
|
-
/** Props passed down to `Tooltip` recharts component */
|
|
28
|
-
tooltipProps?: Omit<TooltipProps<any, any>, 'ref'>;
|
|
29
|
-
/** Props passed down to recharts `Treemap` component */
|
|
30
|
-
treemapProps?: Partial<Omit<RechartsTreemapProps, 'ref' | 'data' | 'dataKey'>>;
|
|
31
|
-
/** Controls color of the node stroke, by default depends on color scheme */
|
|
32
|
-
strokeColor?: MantineColor;
|
|
33
|
-
/** Controls text color of labels @default dimmed */
|
|
34
|
-
textColor?: MantineColor;
|
|
35
|
-
/** Controls chart height @default 300 */
|
|
36
|
-
height?: number;
|
|
37
|
-
/** Controls width of node stroke @default 1 */
|
|
38
|
-
strokeWidth?: number;
|
|
39
|
-
/** A function to format values inside the tooltip */
|
|
40
|
-
valueFormatter?: (value: number) => string;
|
|
41
|
-
/** Determines whether text color should be adjusted based on background color to improve contrast */
|
|
42
|
-
autoContrast?: boolean;
|
|
43
|
-
/** Additional elements rendered inside `Treemap` component */
|
|
44
|
-
children?: React.ReactNode;
|
|
45
|
-
}
|
|
46
|
-
export type TreemapFactory = Factory<{
|
|
47
|
-
props: TreemapProps;
|
|
48
|
-
ref: HTMLDivElement;
|
|
49
|
-
stylesNames: TreemapStylesNames;
|
|
50
|
-
vars: TreemapCssVariables;
|
|
51
|
-
}>;
|
|
52
|
-
export declare const Treemap: import("@mantine/core").MantineComponent<{
|
|
53
|
-
props: TreemapProps;
|
|
54
|
-
ref: HTMLDivElement;
|
|
55
|
-
stylesNames: TreemapStylesNames;
|
|
56
|
-
vars: TreemapCssVariables;
|
|
57
|
-
}>;
|
package/lib/Treemap/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { TreemapCssVariables, TreemapData, TreemapFactory, TreemapProps, TreemapStylesNames } from './Treemap';
|
|
2
|
-
export { Treemap } from './Treemap';
|
|
3
|
-
export type { TreemapProps, TreemapStylesNames, TreemapCssVariables, TreemapFactory, TreemapData };
|
|
4
|
-
export declare namespace Treemap {
|
|
5
|
-
type Props = TreemapProps;
|
|
6
|
-
type StylesNames = TreemapStylesNames;
|
|
7
|
-
type CssVariables = TreemapCssVariables;
|
|
8
|
-
type Factory = TreemapFactory;
|
|
9
|
-
type Data = TreemapData;
|
|
10
|
-
}
|