@mantine/charts 7.13.4 → 7.13.5-alpha.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/package.json +7 -7
- package/styles.css +43 -0
- package/styles.layer.css +43 -0
- package/cjs/AreaChart/AreaChart.cjs +0 -388
- package/cjs/AreaChart/AreaChart.cjs.map +0 -1
- package/cjs/AreaChart/AreaGradient.cjs +0 -15
- package/cjs/AreaChart/AreaGradient.cjs.map +0 -1
- package/cjs/AreaChart/AreaSplit.cjs +0 -31
- package/cjs/AreaChart/AreaSplit.cjs.map +0 -1
- package/cjs/AreaChart/get-split-offset.cjs +0 -25
- package/cjs/AreaChart/get-split-offset.cjs.map +0 -1
- package/cjs/BarChart/BarChart.cjs +0 -374
- package/cjs/BarChart/BarChart.cjs.map +0 -1
- package/cjs/BubbleChart/BubbleChart.cjs +0 -148
- package/cjs/BubbleChart/BubbleChart.cjs.map +0 -1
- package/cjs/ChartLegend/ChartLegend.cjs +0 -97
- package/cjs/ChartLegend/ChartLegend.cjs.map +0 -1
- package/cjs/ChartLegend/ChartLegend.module.css.cjs +0 -7
- package/cjs/ChartLegend/ChartLegend.module.css.cjs.map +0 -1
- package/cjs/ChartTooltip/ChartTooltip.cjs +0 -124
- package/cjs/ChartTooltip/ChartTooltip.cjs.map +0 -1
- package/cjs/ChartTooltip/ChartTooltip.module.css.cjs +0 -7
- package/cjs/ChartTooltip/ChartTooltip.module.css.cjs.map +0 -1
- package/cjs/CompositeChart/CompositeChart.cjs +0 -393
- package/cjs/CompositeChart/CompositeChart.cjs.map +0 -1
- package/cjs/DonutChart/DonutChart.cjs +0 -149
- package/cjs/DonutChart/DonutChart.cjs.map +0 -1
- package/cjs/DonutChart/DonutChart.module.css.cjs +0 -7
- package/cjs/DonutChart/DonutChart.module.css.cjs.map +0 -1
- package/cjs/LineChart/LineChart.cjs +0 -353
- package/cjs/LineChart/LineChart.cjs.map +0 -1
- package/cjs/PieChart/PieChart.cjs +0 -175
- package/cjs/PieChart/PieChart.cjs.map +0 -1
- package/cjs/PieChart/PieChart.module.css.cjs +0 -7
- package/cjs/PieChart/PieChart.module.css.cjs.map +0 -1
- package/cjs/PointLabel/PointLabel.cjs +0 -23
- package/cjs/PointLabel/PointLabel.cjs.map +0 -1
- package/cjs/RadarChart/RadarChart.cjs +0 -113
- package/cjs/RadarChart/RadarChart.cjs.map +0 -1
- package/cjs/RadarChart/RadarChart.module.css.cjs +0 -7
- package/cjs/RadarChart/RadarChart.module.css.cjs.map +0 -1
- package/cjs/ScatterChart/ScatterChart.cjs +0 -287
- package/cjs/ScatterChart/ScatterChart.cjs.map +0 -1
- package/cjs/Sparkline/Sparkline.cjs +0 -103
- package/cjs/Sparkline/Sparkline.cjs.map +0 -1
- package/cjs/grid-chart.module.css.cjs +0 -7
- package/cjs/grid-chart.module.css.cjs.map +0 -1
- package/cjs/index.cjs +0 -36
- package/cjs/index.cjs.map +0 -1
- package/cjs/utils/get-series-labels/get-series-labels.cjs +0 -21
- package/cjs/utils/get-series-labels/get-series-labels.cjs.map +0 -1
- package/esm/AreaChart/AreaChart.mjs +0 -386
- package/esm/AreaChart/AreaChart.mjs.map +0 -1
- package/esm/AreaChart/AreaGradient.mjs +0 -13
- package/esm/AreaChart/AreaGradient.mjs.map +0 -1
- package/esm/AreaChart/AreaSplit.mjs +0 -29
- package/esm/AreaChart/AreaSplit.mjs.map +0 -1
- package/esm/AreaChart/get-split-offset.mjs +0 -22
- package/esm/AreaChart/get-split-offset.mjs.map +0 -1
- package/esm/BarChart/BarChart.mjs +0 -371
- package/esm/BarChart/BarChart.mjs.map +0 -1
- package/esm/BubbleChart/BubbleChart.mjs +0 -146
- package/esm/BubbleChart/BubbleChart.mjs.map +0 -1
- package/esm/ChartLegend/ChartLegend.mjs +0 -94
- package/esm/ChartLegend/ChartLegend.mjs.map +0 -1
- package/esm/ChartLegend/ChartLegend.module.css.mjs +0 -5
- package/esm/ChartLegend/ChartLegend.module.css.mjs.map +0 -1
- package/esm/ChartTooltip/ChartTooltip.mjs +0 -121
- package/esm/ChartTooltip/ChartTooltip.mjs.map +0 -1
- package/esm/ChartTooltip/ChartTooltip.module.css.mjs +0 -5
- package/esm/ChartTooltip/ChartTooltip.module.css.mjs.map +0 -1
- package/esm/CompositeChart/CompositeChart.mjs +0 -391
- package/esm/CompositeChart/CompositeChart.mjs.map +0 -1
- package/esm/DonutChart/DonutChart.mjs +0 -147
- package/esm/DonutChart/DonutChart.mjs.map +0 -1
- package/esm/DonutChart/DonutChart.module.css.mjs +0 -5
- package/esm/DonutChart/DonutChart.module.css.mjs.map +0 -1
- package/esm/LineChart/LineChart.mjs +0 -351
- package/esm/LineChart/LineChart.mjs.map +0 -1
- package/esm/PieChart/PieChart.mjs +0 -173
- package/esm/PieChart/PieChart.mjs.map +0 -1
- package/esm/PieChart/PieChart.module.css.mjs +0 -5
- package/esm/PieChart/PieChart.module.css.mjs.map +0 -1
- package/esm/PointLabel/PointLabel.mjs +0 -21
- package/esm/PointLabel/PointLabel.mjs.map +0 -1
- package/esm/RadarChart/RadarChart.mjs +0 -111
- package/esm/RadarChart/RadarChart.mjs.map +0 -1
- package/esm/RadarChart/RadarChart.module.css.mjs +0 -5
- package/esm/RadarChart/RadarChart.module.css.mjs.map +0 -1
- package/esm/ScatterChart/ScatterChart.mjs +0 -285
- package/esm/ScatterChart/ScatterChart.mjs.map +0 -1
- package/esm/Sparkline/Sparkline.mjs +0 -101
- package/esm/Sparkline/Sparkline.mjs.map +0 -1
- package/esm/grid-chart.module.css.mjs +0 -5
- package/esm/grid-chart.module.css.mjs.map +0 -1
- package/esm/index.mjs +0 -15
- package/esm/index.mjs.map +0 -1
- package/esm/utils/get-series-labels/get-series-labels.mjs +0 -19
- package/esm/utils/get-series-labels/get-series-labels.mjs.map +0 -1
- package/lib/AreaChart/AreaChart.d.ts +0 -61
- package/lib/AreaChart/AreaGradient.d.ts +0 -11
- package/lib/AreaChart/AreaSplit.d.ts +0 -12
- package/lib/AreaChart/get-split-offset.d.ts +0 -13
- package/lib/AreaChart/index.d.ts +0 -4
- package/lib/BarChart/BarChart.d.ts +0 -50
- package/lib/BarChart/index.d.ts +0 -2
- package/lib/BubbleChart/BubbleChart.d.ts +0 -53
- package/lib/BubbleChart/index.d.ts +0 -2
- package/lib/ChartLegend/ChartLegend.d.ts +0 -28
- package/lib/ChartLegend/index.d.ts +0 -2
- package/lib/ChartTooltip/ChartTooltip.d.ts +0 -32
- package/lib/ChartTooltip/index.d.ts +0 -2
- package/lib/CompositeChart/CompositeChart.d.ts +0 -62
- package/lib/CompositeChart/index.d.ts +0 -2
- package/lib/DonutChart/DonutChart.d.ts +0 -65
- package/lib/DonutChart/index.d.ts +0 -2
- package/lib/LineChart/LineChart.d.ts +0 -62
- package/lib/LineChart/index.d.ts +0 -2
- package/lib/PieChart/PieChart.d.ts +0 -66
- package/lib/PieChart/index.d.ts +0 -2
- package/lib/PointLabel/PointLabel.d.ts +0 -7
- package/lib/RadarChart/RadarChart.d.ts +0 -58
- package/lib/RadarChart/index.d.ts +0 -2
- package/lib/ScatterChart/ScatterChart.d.ts +0 -56
- package/lib/ScatterChart/index.d.ts +0 -2
- package/lib/Sparkline/Sparkline.d.ts +0 -44
- package/lib/Sparkline/index.d.ts +0 -2
- package/lib/index.d.mts +0 -13
- package/lib/index.d.ts +0 -13
- package/lib/types.d.ts +0 -69
- package/lib/utils/get-series-labels/get-series-labels.d.ts +0 -4
- package/lib/utils/index.d.ts +0 -1
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { ScatterChart as ReChartsScatterChart, ScatterProps } from 'recharts';
|
|
2
|
-
import { BoxProps, ElementProps, Factory, MantineColor, StylesApiProps } from '@mantine/core';
|
|
3
|
-
import { ChartLegendStylesNames } from '../ChartLegend';
|
|
4
|
-
import { ChartTooltipStylesNames } from '../ChartTooltip';
|
|
5
|
-
import { BaseChartStylesNames, GridChartBaseProps } from '../types';
|
|
6
|
-
export interface ScatterChartSeries {
|
|
7
|
-
color: MantineColor;
|
|
8
|
-
name: string;
|
|
9
|
-
data: Record<string, number>[];
|
|
10
|
-
}
|
|
11
|
-
export type ScatterChartStylesNames = 'scatter' | BaseChartStylesNames | ChartLegendStylesNames | ChartTooltipStylesNames;
|
|
12
|
-
export type ScatterChartCssVariables = {
|
|
13
|
-
root: '--chart-text-color' | '--chart-grid-color';
|
|
14
|
-
};
|
|
15
|
-
export interface ScatterChartProps extends Omit<GridChartBaseProps, 'dataKey' | 'data' | 'unit' | 'valueFormatter'>, BoxProps, StylesApiProps<ScatterChartFactory>, ElementProps<'div'> {
|
|
16
|
-
/** Keys that should be used to retrieve data from the data array on x and y axis */
|
|
17
|
-
dataKey: {
|
|
18
|
-
x: string;
|
|
19
|
-
y: string;
|
|
20
|
-
};
|
|
21
|
-
/** Data that is used to build the chart */
|
|
22
|
-
data: ScatterChartSeries[];
|
|
23
|
-
/** Units displayed after value on axis and inside the tooltip */
|
|
24
|
-
unit?: {
|
|
25
|
-
x?: string;
|
|
26
|
-
y?: string;
|
|
27
|
-
};
|
|
28
|
-
/** Labels that should be used instead of keys names in the tooltip */
|
|
29
|
-
labels?: {
|
|
30
|
-
x?: string;
|
|
31
|
-
y?: string;
|
|
32
|
-
};
|
|
33
|
-
/** A function to format values on x/y axis and in the tooltip */
|
|
34
|
-
valueFormatter?: GridChartBaseProps['valueFormatter'] | {
|
|
35
|
-
x?: GridChartBaseProps['valueFormatter'];
|
|
36
|
-
y?: GridChartBaseProps['valueFormatter'];
|
|
37
|
-
};
|
|
38
|
-
/** Props passed down to recharts `ScatterChart` component */
|
|
39
|
-
scatterChartProps?: React.ComponentPropsWithoutRef<typeof ReChartsScatterChart>;
|
|
40
|
-
/** Props passed down to recharts `Scatter` component */
|
|
41
|
-
scatterProps?: Partial<Omit<ScatterProps, 'ref'>>;
|
|
42
|
-
/** If set, displays labels next to points for the given axis */
|
|
43
|
-
pointLabels?: 'x' | 'y';
|
|
44
|
-
}
|
|
45
|
-
export type ScatterChartFactory = Factory<{
|
|
46
|
-
props: ScatterChartProps;
|
|
47
|
-
ref: HTMLDivElement;
|
|
48
|
-
stylesNames: ScatterChartStylesNames;
|
|
49
|
-
vars: ScatterChartCssVariables;
|
|
50
|
-
}>;
|
|
51
|
-
export declare const ScatterChart: import("@mantine/core").MantineComponent<{
|
|
52
|
-
props: ScatterChartProps;
|
|
53
|
-
ref: HTMLDivElement;
|
|
54
|
-
stylesNames: ScatterChartStylesNames;
|
|
55
|
-
vars: ScatterChartCssVariables;
|
|
56
|
-
}>;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { AreaProps } from 'recharts';
|
|
2
|
-
import { BoxProps, ElementProps, Factory, MantineColor, StylesApiProps } from '@mantine/core';
|
|
3
|
-
import { AreaChartCurveType } from '../AreaChart';
|
|
4
|
-
export interface SparklineTrendColors {
|
|
5
|
-
positive: MantineColor;
|
|
6
|
-
negative: MantineColor;
|
|
7
|
-
neutral?: MantineColor;
|
|
8
|
-
}
|
|
9
|
-
export type SparklineStylesNames = 'root';
|
|
10
|
-
export type SparklineCssVariables = {
|
|
11
|
-
root: '--chart-color';
|
|
12
|
-
};
|
|
13
|
-
export interface SparklineProps extends BoxProps, StylesApiProps<SparklineFactory>, ElementProps<'div'> {
|
|
14
|
-
/** Data used to render the chart */
|
|
15
|
-
data: (number | null)[];
|
|
16
|
-
/** Key of `theme.colors` or any valid CSS color, `theme.primaryColor` by default */
|
|
17
|
-
color?: MantineColor;
|
|
18
|
-
/** Determines whether the chart fill should be a gradient, `true` by default */
|
|
19
|
-
withGradient?: boolean;
|
|
20
|
-
/** Controls fill opacity of the area, `0.6` by default */
|
|
21
|
-
fillOpacity?: number;
|
|
22
|
-
/** Type of the curve, `'linear'` by default */
|
|
23
|
-
curveType?: AreaChartCurveType;
|
|
24
|
-
/** Area stroke width, `2` by default */
|
|
25
|
-
strokeWidth?: number;
|
|
26
|
-
/** If set, `color` prop is ignored and chart color is determined by the difference between first and last value. */
|
|
27
|
-
trendColors?: SparklineTrendColors;
|
|
28
|
-
/** Determines whether null values should be connected with other values, `true` by default */
|
|
29
|
-
connectNulls?: boolean;
|
|
30
|
-
/** Props passed down to the underlying recharts `Area` component */
|
|
31
|
-
areaProps?: Omit<AreaProps, 'data' | 'dataKey' | 'ref'>;
|
|
32
|
-
}
|
|
33
|
-
export type SparklineFactory = Factory<{
|
|
34
|
-
props: SparklineProps;
|
|
35
|
-
ref: HTMLDivElement;
|
|
36
|
-
stylesNames: SparklineStylesNames;
|
|
37
|
-
vars: SparklineCssVariables;
|
|
38
|
-
}>;
|
|
39
|
-
export declare const Sparkline: import("@mantine/core").MantineComponent<{
|
|
40
|
-
props: SparklineProps;
|
|
41
|
-
ref: HTMLDivElement;
|
|
42
|
-
stylesNames: SparklineStylesNames;
|
|
43
|
-
vars: SparklineCssVariables;
|
|
44
|
-
}>;
|
package/lib/Sparkline/index.d.ts
DELETED
package/lib/index.d.mts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export * from './ChartTooltip/index.js';
|
|
2
|
-
export * from './ChartLegend/index.js';
|
|
3
|
-
export * from './AreaChart/index.js';
|
|
4
|
-
export * from './BarChart/index.js';
|
|
5
|
-
export * from './LineChart/index.js';
|
|
6
|
-
export * from './Sparkline/index.js';
|
|
7
|
-
export * from './DonutChart/index.js';
|
|
8
|
-
export * from './PieChart/index.js';
|
|
9
|
-
export * from './RadarChart/index.js';
|
|
10
|
-
export * from './ScatterChart/index.js';
|
|
11
|
-
export * from './BubbleChart/index.js';
|
|
12
|
-
export * from './CompositeChart/index.js';
|
|
13
|
-
export * from './types';
|
package/lib/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export * from './ChartTooltip/index.js';
|
|
2
|
-
export * from './ChartLegend/index.js';
|
|
3
|
-
export * from './AreaChart/index.js';
|
|
4
|
-
export * from './BarChart/index.js';
|
|
5
|
-
export * from './LineChart/index.js';
|
|
6
|
-
export * from './Sparkline/index.js';
|
|
7
|
-
export * from './DonutChart/index.js';
|
|
8
|
-
export * from './PieChart/index.js';
|
|
9
|
-
export * from './RadarChart/index.js';
|
|
10
|
-
export * from './ScatterChart/index.js';
|
|
11
|
-
export * from './BubbleChart/index.js';
|
|
12
|
-
export * from './CompositeChart/index.js';
|
|
13
|
-
export * from './types';
|
package/lib/types.d.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type { CartesianGridProps, LabelProps, LegendProps, ReferenceLineProps, TooltipProps, XAxisProps, YAxisProps } from 'recharts';
|
|
2
|
-
import type { MantineColor } from '@mantine/core';
|
|
3
|
-
export interface ChartReferenceLineProps extends Omit<ReferenceLineProps, 'ref' | 'label'> {
|
|
4
|
-
color?: MantineColor;
|
|
5
|
-
label?: string;
|
|
6
|
-
labelPosition?: LabelProps['position'];
|
|
7
|
-
}
|
|
8
|
-
export interface ChartSeries {
|
|
9
|
-
name: string;
|
|
10
|
-
color?: MantineColor;
|
|
11
|
-
label?: string;
|
|
12
|
-
yAxisId?: string;
|
|
13
|
-
}
|
|
14
|
-
export type BaseChartStylesNames = 'root' | 'container' | 'axis' | 'grid' | 'referenceLine' | 'axisLabel';
|
|
15
|
-
export type ChartData = Record<string, any>[];
|
|
16
|
-
export interface GridChartBaseProps {
|
|
17
|
-
/** Data used to display chart */
|
|
18
|
-
data: ChartData;
|
|
19
|
-
/** Key of the `data` object for x-axis values */
|
|
20
|
-
dataKey: string;
|
|
21
|
-
/** Reference lines that should be displayed on the chart */
|
|
22
|
-
referenceLines?: ChartReferenceLineProps[];
|
|
23
|
-
/** Determines whether x-axis should be displayed, `true` by default */
|
|
24
|
-
withXAxis?: boolean;
|
|
25
|
-
/** Determines whether y-axis should be displayed, `true` by default */
|
|
26
|
-
withYAxis?: boolean;
|
|
27
|
-
/** Props passed down to the `XAxis` recharts component */
|
|
28
|
-
xAxisProps?: Omit<XAxisProps, 'ref'>;
|
|
29
|
-
/** Props passed down to the `YAxis` recharts component */
|
|
30
|
-
yAxisProps?: Omit<YAxisProps, 'ref'>;
|
|
31
|
-
/** Props passed down to the `YAxis` recharts component rendered on the right side */
|
|
32
|
-
rightYAxisProps?: Omit<YAxisProps, 'ref'>;
|
|
33
|
-
/** Props passed down to the `CartesianGrid` component */
|
|
34
|
-
gridProps?: Omit<CartesianGridProps, 'ref'>;
|
|
35
|
-
/** Specifies which axis should have tick line, `'y'` by default */
|
|
36
|
-
tickLine?: 'x' | 'y' | 'xy' | 'none';
|
|
37
|
-
/** Dash array for the grid lines and cursor, `'5 5'` by default */
|
|
38
|
-
strokeDasharray?: string | number;
|
|
39
|
-
/** Specifies which lines should be displayed in the grid, `'x'` by default */
|
|
40
|
-
gridAxis?: 'x' | 'y' | 'xy' | 'none';
|
|
41
|
-
/** Unit displayed next to each tick in y-axis */
|
|
42
|
-
unit?: string;
|
|
43
|
-
/** Tooltip position animation duration in ms, `0` by default */
|
|
44
|
-
tooltipAnimationDuration?: number;
|
|
45
|
-
/** Props passed down to the `Legend` component */
|
|
46
|
-
legendProps?: Omit<LegendProps, 'ref'>;
|
|
47
|
-
/** Props passed down to the `Tooltip` component */
|
|
48
|
-
tooltipProps?: Omit<TooltipProps<any, any>, 'ref'>;
|
|
49
|
-
/** Determines whether chart legend should be displayed, `false` by default */
|
|
50
|
-
withLegend?: boolean;
|
|
51
|
-
/** Determines whether chart tooltip should be displayed, `true` by default */
|
|
52
|
-
withTooltip?: boolean;
|
|
53
|
-
/** Color of the text displayed inside the chart, `'dimmed'` by default */
|
|
54
|
-
textColor?: MantineColor;
|
|
55
|
-
/** Color of the grid and cursor lines, by default depends on color scheme */
|
|
56
|
-
gridColor?: MantineColor;
|
|
57
|
-
/** Chart orientation, `'horizontal'` by default */
|
|
58
|
-
orientation?: 'horizontal' | 'vertical';
|
|
59
|
-
/** A function to format values on Y axis and inside the tooltip */
|
|
60
|
-
valueFormatter?: (value: number) => string;
|
|
61
|
-
/** A label to display below the x-axis */
|
|
62
|
-
xAxisLabel?: string;
|
|
63
|
-
/** A label to display next to the y-axis */
|
|
64
|
-
yAxisLabel?: string;
|
|
65
|
-
/** A label to display next to the right y-axis */
|
|
66
|
-
rightYAxisLabel?: string;
|
|
67
|
-
/** Determines whether additional y-axis should be displayed on the right side of the chart, `false` by default */
|
|
68
|
-
withRightYAxis?: boolean;
|
|
69
|
-
}
|
package/lib/utils/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { getSeriesLabels } from './get-series-labels/get-series-labels';
|