@redsift/charts 11.6.0-muiv5-alpha.6 → 11.6.0-muiv5-alpha.8
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/index.d.ts +1190 -42
- package/package.json +2 -2
- package/_internal/Arc.d.ts +0 -10
- package/_internal/Arcs.d.ts +0 -10
- package/_internal/Axis.d.ts +0 -8
- package/_internal/Bar.d.ts +0 -10
- package/_internal/BarChart.d.ts +0 -17
- package/_internal/ChartContainer.d.ts +0 -5
- package/_internal/DataPoint.d.ts +0 -7
- package/_internal/Dot.d.ts +0 -10
- package/_internal/Legend.d.ts +0 -10
- package/_internal/LegendItem.d.ts +0 -21
- package/_internal/Line.d.ts +0 -10
- package/_internal/LineChart.d.ts +0 -17
- package/_internal/PieChart.d.ts +0 -14
- package/_internal/ScatterPlot.d.ts +0 -17
- package/_internal/axis.d2.ts +0 -48
- package/_internal/data.d.ts +0 -72
- package/_internal/scale.d.ts +0 -134
- package/_internal/styles.d.ts +0 -19
- package/_internal/styles.d10.ts +0 -30
- package/_internal/styles.d11.ts +0 -101
- package/_internal/styles.d12.ts +0 -133
- package/_internal/styles.d13.ts +0 -120
- package/_internal/styles.d2.ts +0 -26
- package/_internal/styles.d3.ts +0 -17
- package/_internal/styles.d4.ts +0 -18
- package/_internal/styles.d5.ts +0 -212
- package/_internal/styles.d6.ts +0 -22
- package/_internal/styles.d7.ts +0 -15
- package/_internal/styles.d8.ts +0 -19
- package/_internal/styles.d9.ts +0 -14
- package/_internal/types.d.ts +0 -20
- package/_internal/types.d2.ts +0 -46
- package/_internal/types.d3.ts +0 -48
- package/_internal/types.d4.ts +0 -86
- package/_internal/types.d5.ts +0 -30
- package/_internal/types.d6.ts +0 -44
- package/_internal/types.d7.ts +0 -24
- package/index.d2.ts +0 -49
package/package.json
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"test": "yarn test:unit && yarn test:storybook"
|
|
31
31
|
},
|
|
32
32
|
"types": "types.d.ts",
|
|
33
|
-
"version": "11.6.0-muiv5-alpha.
|
|
33
|
+
"version": "11.6.0-muiv5-alpha.8",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@emotion/react": "^11.10.4",
|
|
36
36
|
"@emotion/styled": "^11.10.4",
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"react-dom": ">=17",
|
|
95
95
|
"styled-components": "^5.3.5"
|
|
96
96
|
},
|
|
97
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "ae1291b7b1536be10c6a15375bec7f0e75b03cbe"
|
|
98
98
|
}
|
package/_internal/Arc.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { A as Arc, S as StyledArc } from './styles.js';
|
|
2
|
-
export { A as ArcProps, S as StyledArcProps } from './types.js';
|
|
3
|
-
import '@redsift/design-system';
|
|
4
|
-
import 'styled-components';
|
|
5
|
-
import './types.d4.ts';
|
|
6
|
-
import 'react';
|
|
7
|
-
import '@redsift/popovers';
|
|
8
|
-
import 'd3';
|
|
9
|
-
import './data.js';
|
|
10
|
-
import 'd3-shape';
|
package/_internal/Arcs.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { A as Arcs, a as ArcsProps, b as StyledArcs, S as StyledArcsProps } from './styles.d2.ts';
|
|
2
|
-
import '@redsift/design-system';
|
|
3
|
-
import 'styled-components';
|
|
4
|
-
import 'react';
|
|
5
|
-
import './types.js';
|
|
6
|
-
import 'd3';
|
|
7
|
-
import './types.d4.ts';
|
|
8
|
-
import '@redsift/popovers';
|
|
9
|
-
import './data.js';
|
|
10
|
-
import 'd3-shape';
|
package/_internal/Axis.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { A as Axis, S as StyledAxis, g as getAxisType } from './styles.d3.ts';
|
|
2
|
-
export { l as AxisPosition, m as AxisProps, k as AxisVariant, n as StyledAxisProps } from './scale.js';
|
|
3
|
-
import '@redsift/design-system';
|
|
4
|
-
import 'styled-components';
|
|
5
|
-
import '@react-spring/web';
|
|
6
|
-
import 'react';
|
|
7
|
-
import 'd3';
|
|
8
|
-
import 'd3-scale';
|
package/_internal/Bar.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { B as Bar, S as StyledBar } from './styles.d4.ts';
|
|
2
|
-
export { a as BarDirection, B as BarOrientation, b as BarProps, S as StyledBarProps } from './types.d2.ts';
|
|
3
|
-
import '@redsift/design-system';
|
|
4
|
-
import 'styled-components';
|
|
5
|
-
import './types.d4.ts';
|
|
6
|
-
import 'react';
|
|
7
|
-
import '@redsift/popovers';
|
|
8
|
-
import 'd3';
|
|
9
|
-
import './data.js';
|
|
10
|
-
import 'd3-shape';
|
package/_internal/BarChart.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export { a as BarChart, h as BarChartBarsProps, c as BarChartDimensions, b as BarChartLegendVariant, d as BarChartProps, f as BarChartSectionProps, e as BarChartState, B as BaseBarChart, C as ComputedBarProps, R as RenderedLinearBarChartProps, j as StyledBarChart, l as StyledBarChartBars, i as StyledBarChartBarsProps, m as StyledBarChartEmptyText, S as StyledBarChartProps, k as StyledBarChartSection, g as StyledBarChartSectionProps, X as XScaleType } from './styles.d5.ts';
|
|
2
|
-
import './types.d3.ts';
|
|
3
|
-
import '@redsift/design-system';
|
|
4
|
-
import 'react';
|
|
5
|
-
import './types.d7.ts';
|
|
6
|
-
import './types.d4.ts';
|
|
7
|
-
import '@redsift/popovers';
|
|
8
|
-
import './data.js';
|
|
9
|
-
import 'd3-shape';
|
|
10
|
-
import './types.d6.ts';
|
|
11
|
-
import './scale.js';
|
|
12
|
-
import 'd3';
|
|
13
|
-
import 'd3-scale';
|
|
14
|
-
import 'styled-components';
|
|
15
|
-
import './types.d2.ts';
|
|
16
|
-
import '../index.d2.ts';
|
|
17
|
-
import './axis.d2.ts';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { C as ChartContainer, b as ChartContainerDescription, a as ChartContainerTitle, S as StyledChartContainer, d as StyledChartContainerCaption, c as StyledChartContainerTitle } from './styles.d6.ts';
|
|
2
|
-
export { C as ChartContainerProps, S as StyledChartContainerProps } from './types.d3.ts';
|
|
3
|
-
import 'react';
|
|
4
|
-
import '@redsift/design-system';
|
|
5
|
-
import 'styled-components';
|
package/_internal/DataPoint.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { D as DataPoint, S as StyledDataPoint } from './styles.d7.ts';
|
|
2
|
-
export { A as AnchorProps, D as DataPointProps, S as StyledDataPointProps } from './types.d4.ts';
|
|
3
|
-
import '@redsift/design-system';
|
|
4
|
-
import 'styled-components';
|
|
5
|
-
import '@react-spring/web';
|
|
6
|
-
import 'react';
|
|
7
|
-
import '@redsift/popovers';
|
package/_internal/Dot.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { D as Dot, S as StyledDot } from './styles.d8.ts';
|
|
2
|
-
export { a as DotProps, D as DotVariant, S as StyledDotProps } from './types.d5.ts';
|
|
3
|
-
import '@redsift/design-system';
|
|
4
|
-
import 'styled-components';
|
|
5
|
-
import './types.d4.ts';
|
|
6
|
-
import 'react';
|
|
7
|
-
import '@redsift/popovers';
|
|
8
|
-
import 'd3';
|
|
9
|
-
import './data.js';
|
|
10
|
-
import 'd3-shape';
|
package/_internal/Legend.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { L as Legend, S as StyledLegend } from './styles.d9.ts';
|
|
2
|
-
export { L as LegendProps, S as StyledLegendProps } from './types.d6.ts';
|
|
3
|
-
import '@redsift/design-system';
|
|
4
|
-
import 'styled-components';
|
|
5
|
-
import 'react';
|
|
6
|
-
import './types.d7.ts';
|
|
7
|
-
import './types.d4.ts';
|
|
8
|
-
import '@redsift/popovers';
|
|
9
|
-
import './data.js';
|
|
10
|
-
import 'd3-shape';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Comp, Theme } from '@redsift/design-system';
|
|
2
|
-
import { L as LegendItemProps } from './types.d7.ts';
|
|
3
|
-
export { L as LegendItemProps, S as StyledLegendItemProps } from './types.d7.ts';
|
|
4
|
-
import * as styled_components from 'styled-components';
|
|
5
|
-
import { S as StyledDataPointProps, L as LegendVariant } from './types.d4.ts';
|
|
6
|
-
import 'react';
|
|
7
|
-
import './data.js';
|
|
8
|
-
import 'd3-shape';
|
|
9
|
-
import '@redsift/popovers';
|
|
10
|
-
|
|
11
|
-
declare const LegendItem: Comp<LegendItemProps, HTMLLIElement>;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Component style.
|
|
15
|
-
*/
|
|
16
|
-
declare const StyledLegendItem: styled_components.StyledComponent<"li", any, Pick<StyledDataPointProps, "$clickable"> & Omit<LegendItemProps, "data" | "dataset"> & {
|
|
17
|
-
$variant: LegendVariant | undefined;
|
|
18
|
-
$theme: Theme;
|
|
19
|
-
}, never>;
|
|
20
|
-
|
|
21
|
-
export { LegendItem, StyledLegendItem };
|
package/_internal/Line.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { L as Line, a as LineProps, b as StyledLine, S as StyledLineProps } from './styles.d10.ts';
|
|
2
|
-
import '@redsift/design-system';
|
|
3
|
-
import 'styled-components';
|
|
4
|
-
import 'd3';
|
|
5
|
-
import 'react';
|
|
6
|
-
import './types.d5.ts';
|
|
7
|
-
import './types.d4.ts';
|
|
8
|
-
import '@redsift/popovers';
|
|
9
|
-
import './data.js';
|
|
10
|
-
import 'd3-shape';
|
package/_internal/LineChart.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export { L as LineChart, b as LineChartDimensions, a as LineChartLegendVariant, c as LineChartProps, d as StyledLineChart, e as StyledLineChartEmptyText, S as StyledLineChartProps } from './styles.d11.ts';
|
|
2
|
-
import '@redsift/design-system';
|
|
3
|
-
import 'styled-components';
|
|
4
|
-
import './types.d3.ts';
|
|
5
|
-
import 'react';
|
|
6
|
-
import './types.d5.ts';
|
|
7
|
-
import 'd3';
|
|
8
|
-
import './types.d4.ts';
|
|
9
|
-
import '@redsift/popovers';
|
|
10
|
-
import './data.js';
|
|
11
|
-
import 'd3-shape';
|
|
12
|
-
import './types.d6.ts';
|
|
13
|
-
import './types.d7.ts';
|
|
14
|
-
import '../index.d2.ts';
|
|
15
|
-
import './axis.d2.ts';
|
|
16
|
-
import './scale.js';
|
|
17
|
-
import 'd3-scale';
|
package/_internal/PieChart.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export { P as PieChart, c as PieChartDimensions, b as PieChartLegendVariant, d as PieChartProps, a as PieChartVariant, e as StyledPieChart, f as StyledPieChartCenterText, g as StyledPieChartEmptyText, S as StyledPieChartProps } from './styles.d12.ts';
|
|
2
|
-
import '@redsift/design-system';
|
|
3
|
-
import 'styled-components';
|
|
4
|
-
import 'react';
|
|
5
|
-
import 'd3-shape';
|
|
6
|
-
import './types.js';
|
|
7
|
-
import 'd3';
|
|
8
|
-
import './types.d4.ts';
|
|
9
|
-
import '@redsift/popovers';
|
|
10
|
-
import './data.js';
|
|
11
|
-
import './types.d3.ts';
|
|
12
|
-
import './types.d6.ts';
|
|
13
|
-
import './types.d7.ts';
|
|
14
|
-
import '../index.d2.ts';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export { S as ScatterPlot, c as ScatterPlotDimensions, b as ScatterPlotLegendVariant, d as ScatterPlotProps, a as ScatterPlotVariant, f as StyledScatterPlot, g as StyledScatterPlotEmptyText, e as StyledScatterPlotProps } from './styles.d13.ts';
|
|
2
|
-
import '@redsift/design-system';
|
|
3
|
-
import 'styled-components';
|
|
4
|
-
import './types.d3.ts';
|
|
5
|
-
import 'react';
|
|
6
|
-
import './types.d5.ts';
|
|
7
|
-
import 'd3';
|
|
8
|
-
import './types.d4.ts';
|
|
9
|
-
import '@redsift/popovers';
|
|
10
|
-
import './data.js';
|
|
11
|
-
import 'd3-shape';
|
|
12
|
-
import './types.d6.ts';
|
|
13
|
-
import './types.d7.ts';
|
|
14
|
-
import '../index.d2.ts';
|
|
15
|
-
import './axis.d2.ts';
|
|
16
|
-
import './scale.js';
|
|
17
|
-
import 'd3-scale';
|
package/_internal/axis.d2.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { k as AxisVariant, m as AxisProps } from './scale.js';
|
|
2
|
-
|
|
3
|
-
type ChartAxesProps = {
|
|
4
|
-
/** String to Date. */
|
|
5
|
-
dateParser?: (value: string) => Date;
|
|
6
|
-
/** X axis variant. */
|
|
7
|
-
xAxisVariant?: AxisVariant;
|
|
8
|
-
/** X axis placement. */
|
|
9
|
-
xAxisPlacement?: 'bottom' | 'top' | 'both';
|
|
10
|
-
/** X axis tick format. */
|
|
11
|
-
xAxisTickFormat?: AxisProps['tickFormat'];
|
|
12
|
-
/** X axis tick values. */
|
|
13
|
-
xAxisTickPadding?: AxisProps['tickPadding'];
|
|
14
|
-
/** X axis tick values. */
|
|
15
|
-
xAxisTickRotation?: AxisProps['tickRotation'];
|
|
16
|
-
/** X axis tick values. */
|
|
17
|
-
xAxisTickSize?: AxisProps['tickSize'];
|
|
18
|
-
/** X axis tick values. */
|
|
19
|
-
xAxisTickValues?: AxisProps['tickValues'];
|
|
20
|
-
/** X axis min value. */
|
|
21
|
-
xAxisMinValue?: number | string;
|
|
22
|
-
/** X axis min value. */
|
|
23
|
-
xAxisMaxValue?: number | string;
|
|
24
|
-
/** Y axis tick remodelling. */
|
|
25
|
-
xAxisTickRemodelling?: (tickValues: any[]) => any[];
|
|
26
|
-
/** Y axis variant. */
|
|
27
|
-
yAxisVariant?: AxisVariant;
|
|
28
|
-
/** Y axis placement. */
|
|
29
|
-
yAxisPlacement?: 'right' | 'left' | 'both';
|
|
30
|
-
/** Y axis tick format. */
|
|
31
|
-
yAxisTickFormat?: AxisProps['tickFormat'];
|
|
32
|
-
/** Y axis tick values. */
|
|
33
|
-
yAxisTickPadding?: AxisProps['tickPadding'];
|
|
34
|
-
/** Y axis tick values. */
|
|
35
|
-
yAxisTickRotation?: AxisProps['tickRotation'];
|
|
36
|
-
/** Y axis tick values. */
|
|
37
|
-
yAxisTickSize?: AxisProps['tickSize'];
|
|
38
|
-
/** Y axis tick values. */
|
|
39
|
-
yAxisTickValues?: AxisProps['tickValues'];
|
|
40
|
-
/** Y axis min value. */
|
|
41
|
-
yAxisMinValue?: number | string;
|
|
42
|
-
/** Y axis min value. */
|
|
43
|
-
yAxisMaxValue?: number | string;
|
|
44
|
-
/** Y axis tick remodelling. */
|
|
45
|
-
yAxisTickRemodelling?: (tickValues: any[]) => any[];
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export { ChartAxesProps as C };
|
package/_internal/data.d.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { PieArcDatum } from 'd3-shape';
|
|
2
|
-
|
|
3
|
-
type JSONValue = string | number | boolean | Date | {
|
|
4
|
-
[x: string]: JSONValue;
|
|
5
|
-
} | Array<JSONValue> | undefined | null;
|
|
6
|
-
type JSONObject = {
|
|
7
|
-
[x: string]: JSONValue;
|
|
8
|
-
};
|
|
9
|
-
type JSONArray = Array<JSONObject>;
|
|
10
|
-
type Datum<T> = {
|
|
11
|
-
key: T;
|
|
12
|
-
value: number;
|
|
13
|
-
percent?: number;
|
|
14
|
-
cumulativeValue?: number;
|
|
15
|
-
};
|
|
16
|
-
type EmptyDatum<T> = {
|
|
17
|
-
key: T;
|
|
18
|
-
value?: number | null;
|
|
19
|
-
percent?: number;
|
|
20
|
-
};
|
|
21
|
-
type CategoryDim = string;
|
|
22
|
-
type LinearDim = number | Date | string;
|
|
23
|
-
type CategoricalOrLinearDim = CategoryDim | LinearDim;
|
|
24
|
-
type TwoCategoryDim = [CategoricalOrLinearDim, CategoryDim | undefined | null];
|
|
25
|
-
type CoordinatesCategoryDim = [number, number, CategoryDim | undefined | null];
|
|
26
|
-
type CategoryDatum = Datum<CategoryDim>;
|
|
27
|
-
type LinearDatum = Datum<LinearDim>;
|
|
28
|
-
type TwoCategoryDatum = EmptyDatum<TwoCategoryDim>;
|
|
29
|
-
type CoordinatesCategoryDatum = Datum<CoordinatesCategoryDim>;
|
|
30
|
-
type CategoryData = CategoryDatum[];
|
|
31
|
-
type LinearData = LinearDatum[];
|
|
32
|
-
type TwoCategoryData = TwoCategoryDatum[];
|
|
33
|
-
type CoordinatesCategoryData = CoordinatesCategoryDatum[];
|
|
34
|
-
type ArcDatum = PieArcDatum<CategoryDatum>;
|
|
35
|
-
type BarDatum = {
|
|
36
|
-
data: CategoryDatum | LinearDatum | Datum<TwoCategoryDim>;
|
|
37
|
-
height?: number;
|
|
38
|
-
width?: number;
|
|
39
|
-
category?: string | null;
|
|
40
|
-
};
|
|
41
|
-
type DotDatum = {
|
|
42
|
-
data: EmptyDatum<CoordinatesCategoryDim | TwoCategoryDim>;
|
|
43
|
-
x: string | number | Date;
|
|
44
|
-
y?: number | null;
|
|
45
|
-
r: number;
|
|
46
|
-
category?: string | null;
|
|
47
|
-
};
|
|
48
|
-
type LinePointDatum = {
|
|
49
|
-
x?: number | string | Date;
|
|
50
|
-
y?: number;
|
|
51
|
-
category?: string | null;
|
|
52
|
-
};
|
|
53
|
-
type Statistic = {
|
|
54
|
-
key: string;
|
|
55
|
-
value: number;
|
|
56
|
-
percent?: number;
|
|
57
|
-
min?: number;
|
|
58
|
-
max?: number;
|
|
59
|
-
values?: number[];
|
|
60
|
-
first?: number;
|
|
61
|
-
last?: number;
|
|
62
|
-
trending?: {
|
|
63
|
-
overall?: number;
|
|
64
|
-
latest?: number;
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
type Statistics = Statistic[];
|
|
68
|
-
type LegendItemDatum = {
|
|
69
|
-
data: Statistic;
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export { ArcDatum as A, BarDatum as B, CategoryData as C, Datum as D, EmptyDatum as E, JSONArray as J, LinearDim as L, Statistic as S, TwoCategoryDim as T, JSONObject as a, JSONValue as b, CategoryDim as c, CategoricalOrLinearDim as d, CoordinatesCategoryDim as e, CategoryDatum as f, LinearDatum as g, TwoCategoryDatum as h, CoordinatesCategoryDatum as i, LinearData as j, TwoCategoryData as k, CoordinatesCategoryData as l, DotDatum as m, LinePointDatum as n, Statistics as o, LegendItemDatum as p };
|
package/_internal/scale.d.ts
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
2
|
-
import { ValueOf, Theme } from '@redsift/design-system';
|
|
3
|
-
import { CountableTimeInterval } from 'd3';
|
|
4
|
-
import { ScaleLinear as ScaleLinear$1, ScaleLogarithmic, ScaleSymLog, ScalePoint as ScalePoint$1, ScaleBand as ScaleBand$1, ScaleTime as ScaleTime$1 } from 'd3-scale';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Component variant.
|
|
8
|
-
*/
|
|
9
|
-
declare const AxisVariant: {
|
|
10
|
-
readonly none: "none";
|
|
11
|
-
readonly line: "line";
|
|
12
|
-
readonly lineTick: "lineTick";
|
|
13
|
-
readonly tick: "tick";
|
|
14
|
-
readonly tickValue: "tickValue";
|
|
15
|
-
readonly default: "default";
|
|
16
|
-
};
|
|
17
|
-
type AxisVariant = ValueOf<typeof AxisVariant>;
|
|
18
|
-
declare const AxisPosition: {
|
|
19
|
-
top: string;
|
|
20
|
-
right: string;
|
|
21
|
-
bottom: string;
|
|
22
|
-
left: string;
|
|
23
|
-
};
|
|
24
|
-
type AxisPosition = ValueOf<typeof AxisPosition>;
|
|
25
|
-
/**
|
|
26
|
-
* Component props.
|
|
27
|
-
*/
|
|
28
|
-
interface AxisProps extends Omit<ComponentProps<'g'>, 'scale'> {
|
|
29
|
-
/** Disable animations. */
|
|
30
|
-
disableAnimations?: boolean;
|
|
31
|
-
format?: string;
|
|
32
|
-
/** Whether to display grid or not. The length is mandatory and should usually be the length of the other axis. */
|
|
33
|
-
grid?: boolean | {
|
|
34
|
-
length?: number;
|
|
35
|
-
stroke?: string;
|
|
36
|
-
strokeWidth?: number;
|
|
37
|
-
strokeDasharray?: string;
|
|
38
|
-
opacity?: number;
|
|
39
|
-
};
|
|
40
|
-
legend?: string;
|
|
41
|
-
legendOffset?: number;
|
|
42
|
-
legendPosition?: 'start' | 'middle' | 'end';
|
|
43
|
-
legendX?: number;
|
|
44
|
-
legendY?: number;
|
|
45
|
-
legendRotation?: number;
|
|
46
|
-
legendStyle?: React.CSSProperties;
|
|
47
|
-
/** Length of the axis. */
|
|
48
|
-
length?: number;
|
|
49
|
-
/** Position of axis. top|bottom means this is an x axis, right|left means this is an y axis. */
|
|
50
|
-
position?: AxisPosition;
|
|
51
|
-
/** Scale (d3.js) used to generate the axis. */
|
|
52
|
-
scale?: AnyScale;
|
|
53
|
-
tickFormat?: ((d: NumericValue) => string) | ((d: StringValue) => string) | ((d: Date) => string) | ((d: ScaleValue) => string);
|
|
54
|
-
tickPadding?: number;
|
|
55
|
-
tickRotation?: number;
|
|
56
|
-
tickSize?: number;
|
|
57
|
-
tickValues?: TicksSpec;
|
|
58
|
-
tickRemodelling?: (tickValues: any[]) => any[];
|
|
59
|
-
/** Variant. */
|
|
60
|
-
variant?: AxisVariant;
|
|
61
|
-
/** X position. */
|
|
62
|
-
x?: number;
|
|
63
|
-
/** Y position. */
|
|
64
|
-
y?: number;
|
|
65
|
-
/** Chart width, used for horizontal grid. */
|
|
66
|
-
chartWidth?: number;
|
|
67
|
-
/** Chart height, used for horizontal grid. */
|
|
68
|
-
chartHeight?: number;
|
|
69
|
-
/** Section height, used for horizontal grid within a section. */
|
|
70
|
-
sectionHeight?: number;
|
|
71
|
-
/** Color used for tick values. */
|
|
72
|
-
textColor?: string;
|
|
73
|
-
/** Custom method to choose which tick value to color if not all. */
|
|
74
|
-
tickToColor?: (tick?: {
|
|
75
|
-
textX: number;
|
|
76
|
-
textY: number;
|
|
77
|
-
lineX: number;
|
|
78
|
-
lineY: number;
|
|
79
|
-
x: number;
|
|
80
|
-
y: number;
|
|
81
|
-
key: string;
|
|
82
|
-
value: ScaleValue;
|
|
83
|
-
}, index?: number) => boolean;
|
|
84
|
-
}
|
|
85
|
-
type StyledAxisProps = Omit<AxisProps, 'areXLabelsRotated' | 'size' | 'scale'> & {
|
|
86
|
-
$theme: Theme;
|
|
87
|
-
$color?: string;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
type Coordinates = {
|
|
91
|
-
x: number;
|
|
92
|
-
y: number;
|
|
93
|
-
};
|
|
94
|
-
type NumericValue = {
|
|
95
|
-
valueOf(): number;
|
|
96
|
-
};
|
|
97
|
-
type StringValue = {
|
|
98
|
-
toString(): string;
|
|
99
|
-
};
|
|
100
|
-
type ScaleValue = NumericValue | StringValue | Date;
|
|
101
|
-
interface ScaleLinear<Output> extends ScaleLinear$1<number, Output, never> {
|
|
102
|
-
type: 'linear';
|
|
103
|
-
stacked: boolean;
|
|
104
|
-
}
|
|
105
|
-
interface ScaleLog extends ScaleLogarithmic<number, number> {
|
|
106
|
-
type: 'log';
|
|
107
|
-
}
|
|
108
|
-
interface ScaleSymlog extends ScaleSymLog<number, number> {
|
|
109
|
-
type: 'symlog';
|
|
110
|
-
}
|
|
111
|
-
interface ScalePoint<Input extends StringValue> extends ScalePoint$1<Input> {
|
|
112
|
-
type: 'point';
|
|
113
|
-
}
|
|
114
|
-
interface ScaleBand<Input extends StringValue> extends ScaleBand$1<Input> {
|
|
115
|
-
type: 'band';
|
|
116
|
-
}
|
|
117
|
-
interface ScaleTime<Input> extends ScaleTime$1<Input, number> {
|
|
118
|
-
type: 'time';
|
|
119
|
-
useUTC: boolean;
|
|
120
|
-
}
|
|
121
|
-
interface ScaleTypeToScale<Input, Output> {
|
|
122
|
-
linear: Input extends NumericValue ? ScaleLinear<Output> : never;
|
|
123
|
-
log: Input extends NumericValue ? ScaleLog : never;
|
|
124
|
-
symlog: Input extends NumericValue ? ScaleSymlog : never;
|
|
125
|
-
point: Input extends StringValue ? ScalePoint<Input> : never;
|
|
126
|
-
band: Input extends StringValue ? ScaleBand<Input> : never;
|
|
127
|
-
time: Input extends StringValue | Date ? ScaleTime<Input> : never;
|
|
128
|
-
}
|
|
129
|
-
type Scale<Input, Output> = ScaleTypeToScale<Input, Output>[keyof ScaleTypeToScale<Input, Output>];
|
|
130
|
-
type AnyScale = Scale<any, any>;
|
|
131
|
-
type ScaleWithBandwidth = ScaleBand<any> | ScalePoint<any>;
|
|
132
|
-
type TicksSpec = number | string | ScaleValue[] | CountableTimeInterval;
|
|
133
|
-
|
|
134
|
-
export { AnyScale as A, Coordinates as C, NumericValue as N, StringValue as S, TicksSpec as T, ScaleValue as a, ScaleLinear as b, ScaleLog as c, ScaleSymlog as d, ScalePoint as e, ScaleBand as f, ScaleTime as g, ScaleTypeToScale as h, Scale as i, ScaleWithBandwidth as j, AxisVariant as k, AxisPosition as l, AxisProps as m, StyledAxisProps as n };
|
package/_internal/styles.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as _redsift_design_system from '@redsift/design-system';
|
|
2
|
-
import { Comp, Theme } from '@redsift/design-system';
|
|
3
|
-
import { A as ArcProps } from './types.js';
|
|
4
|
-
import * as styled_components from 'styled-components';
|
|
5
|
-
import { D as DataPointProps } from './types.d4.ts';
|
|
6
|
-
|
|
7
|
-
declare const Arc: Comp<ArcProps, SVGGElement>;
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Component style.
|
|
11
|
-
*/
|
|
12
|
-
declare const StyledArc: styled_components.StyledComponent<_redsift_design_system.Comp<DataPointProps<any>, SVGGElement>, any, Omit<DataPointProps<any>, "data" | "dataset"> & {
|
|
13
|
-
$clickable: boolean;
|
|
14
|
-
} & Omit<ArcProps, "createArc"> & {
|
|
15
|
-
$hasStroke: boolean | undefined;
|
|
16
|
-
$theme: Theme;
|
|
17
|
-
}, never>;
|
|
18
|
-
|
|
19
|
-
export { Arc as A, StyledArc as S };
|
package/_internal/styles.d10.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Comp } from '@redsift/design-system';
|
|
2
|
-
import * as styled_components from 'styled-components';
|
|
3
|
-
import { Line as Line$1 } from 'd3';
|
|
4
|
-
import { ComponentProps } from 'react';
|
|
5
|
-
import { a as DotProps } from './types.d5.ts';
|
|
6
|
-
import { n as LinePointDatum } from './data.js';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Component props.
|
|
10
|
-
*/
|
|
11
|
-
interface LineProps extends Omit<ComponentProps<'g'>, 'onClick' | 'role'>, Pick<DotProps, 'id' | 'isSelected' | 'role'> {
|
|
12
|
-
/** Line generator used to determine the path of the line. */
|
|
13
|
-
createLine: Line$1<LinePointDatum>;
|
|
14
|
-
/** Points used to compute the line path. */
|
|
15
|
-
data: LinePointDatum[];
|
|
16
|
-
/** Disable animations. */
|
|
17
|
-
disableAnimations?: boolean;
|
|
18
|
-
/** Previous data used for animation. */
|
|
19
|
-
previousData?: LinePointDatum[];
|
|
20
|
-
}
|
|
21
|
-
type StyledLineProps = Omit<LineProps, 'createLine' | 'data'>;
|
|
22
|
-
|
|
23
|
-
declare const Line: Comp<LineProps, SVGGElement>;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Component style.
|
|
27
|
-
*/
|
|
28
|
-
declare const StyledLine: styled_components.StyledComponent<"g", any, StyledLineProps, never>;
|
|
29
|
-
|
|
30
|
-
export { Line as L, StyledLineProps as S, LineProps as a, StyledLine as b };
|
package/_internal/styles.d11.ts
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import * as _redsift_design_system from '@redsift/design-system';
|
|
2
|
-
import { ValueOf, Theme, Comp } from '@redsift/design-system';
|
|
3
|
-
import * as styled_components from 'styled-components';
|
|
4
|
-
import { C as ChartContainerProps } from './types.d3.ts';
|
|
5
|
-
import { ReactNode, ReactElement, MutableRefObject } from 'react';
|
|
6
|
-
import { a as DotProps } from './types.d5.ts';
|
|
7
|
-
import { L as LegendProps } from './types.d6.ts';
|
|
8
|
-
import { a as ChartDimensions, M as MarginProps, b as ChartSize, S as SortingMethod, C as ChartTheme } from '../index.d2.ts';
|
|
9
|
-
import { A as AnchorProps, T as TooltipVariant } from './types.d4.ts';
|
|
10
|
-
import { C as ChartAxesProps } from './axis.d2.ts';
|
|
11
|
-
import { k as TwoCategoryData, m as DotDatum, o as Statistics } from './data.js';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Component's labels variant.
|
|
15
|
-
*/
|
|
16
|
-
declare const LineChartLegendVariant: {
|
|
17
|
-
readonly none: "none";
|
|
18
|
-
readonly externalLabel: "externalLabel";
|
|
19
|
-
readonly externalLabelValue: "externalLabelValue";
|
|
20
|
-
readonly externalLabelPercent: "externalLabelPercent";
|
|
21
|
-
readonly custom: "custom";
|
|
22
|
-
};
|
|
23
|
-
type LineChartLegendVariant = ValueOf<typeof LineChartLegendVariant>;
|
|
24
|
-
interface LocaleText {
|
|
25
|
-
emptyChartText: string;
|
|
26
|
-
}
|
|
27
|
-
type LineChartDimensions = ChartDimensions & {
|
|
28
|
-
fontSize: number;
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* Component props.
|
|
32
|
-
*/
|
|
33
|
-
interface LineChartProps extends ChartContainerProps, ChartAxesProps {
|
|
34
|
-
/** Dataset to use to generate the chart. */
|
|
35
|
-
data?: TwoCategoryData;
|
|
36
|
-
/** Dot role. If an onClick is provided, the dots will have the role `button`. For a navigation link, please use `getDotAnchorProps` instead. */
|
|
37
|
-
dotRole?: DotProps['role'];
|
|
38
|
-
/** Component to use if the chart is empty (replacing the default one). */
|
|
39
|
-
emptyComponent?: ReactNode;
|
|
40
|
-
/** Method used to define the anchor props to use when the dot is a navigation link. */
|
|
41
|
-
getDotAnchorProps?: (datum: DotDatum) => AnchorProps;
|
|
42
|
-
/** Method to determine whether a dot is selected or not. */
|
|
43
|
-
isDotSelected?: (datum: DotDatum) => boolean | undefined;
|
|
44
|
-
/** Method to override the data point labels. */
|
|
45
|
-
labelDecorator?: (datum: DotDatum, props?: {
|
|
46
|
-
index?: number;
|
|
47
|
-
isSelected?: boolean;
|
|
48
|
-
color?: string;
|
|
49
|
-
}) => string | ReactElement;
|
|
50
|
-
/** Method modifying what's displayed within the legend when the legendVariant is "custom". */
|
|
51
|
-
legendDecorator?: (datum: DotDatum, props?: {
|
|
52
|
-
index?: number;
|
|
53
|
-
isSelected?: boolean;
|
|
54
|
-
color?: string;
|
|
55
|
-
}) => string | ReactElement;
|
|
56
|
-
/** Define whether the labels should be displayed inside or outside the charts and if they should contain raw or percentage values. If set to "custom", use `legendDecorator` to customize it. */
|
|
57
|
-
legendVariant?: LineChartLegendVariant;
|
|
58
|
-
/** Props to forward to the Legend block. Can be used to make the legend selectable. */
|
|
59
|
-
legendProps?: Omit<LegendProps, 'data' | 'ref' | 'variant' | 'width'> & {
|
|
60
|
-
extraLegendItems?: Statistics;
|
|
61
|
-
};
|
|
62
|
-
/** Labels and texts. */
|
|
63
|
-
localeText?: LocaleText;
|
|
64
|
-
/** Custom margins, used to give more space for axes labels and legend for instance. */
|
|
65
|
-
margins?: MarginProps;
|
|
66
|
-
/** Method to be called on a click on a dot. For a navigation link, please use `getDotAnchorProps` instead. */
|
|
67
|
-
onDotClick?: (datum: DotDatum) => void;
|
|
68
|
-
/** LineChart size. */
|
|
69
|
-
size?: ChartSize | LineChartDimensions;
|
|
70
|
-
/** Define how to sort categories. */
|
|
71
|
-
sortingMethod?: SortingMethod;
|
|
72
|
-
/** Reference to the SVG tag. */
|
|
73
|
-
svgRef?: MutableRefObject<SVGSVGElement>;
|
|
74
|
-
/** Color palette to use. You can choose among the list of available color palette or also choose to use the success/warning/danger theme for which you have to specify which key corresponds to which status. */
|
|
75
|
-
colorTheme?: ChartTheme;
|
|
76
|
-
/** Method modifying what's displayed within the tooltip when the tooltipVariant is "custom". */
|
|
77
|
-
tooltipDecorator?: (data: DotDatum, props?: {
|
|
78
|
-
index?: number;
|
|
79
|
-
isSelected?: boolean;
|
|
80
|
-
color?: string;
|
|
81
|
-
}) => string | ReactElement;
|
|
82
|
-
/** Tooltip variant. */
|
|
83
|
-
tooltipVariant?: TooltipVariant;
|
|
84
|
-
/** Theme. */
|
|
85
|
-
theme?: Theme;
|
|
86
|
-
}
|
|
87
|
-
type StyledLineChartProps = LineChartProps & {};
|
|
88
|
-
|
|
89
|
-
declare const LineChart: Comp<LineChartProps, HTMLDivElement>;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Component style.
|
|
93
|
-
*/
|
|
94
|
-
declare const StyledLineChart: styled_components.StyledComponent<_redsift_design_system.Comp<ChartContainerProps, HTMLDivElement>, any, LineChartProps, never>;
|
|
95
|
-
declare const StyledLineChartEmptyText: styled_components.StyledComponent<"div", any, {
|
|
96
|
-
$maxWidth: number;
|
|
97
|
-
$textSize: number;
|
|
98
|
-
$theme: Theme;
|
|
99
|
-
}, never>;
|
|
100
|
-
|
|
101
|
-
export { LineChart as L, StyledLineChartProps as S, LineChartLegendVariant as a, LineChartDimensions as b, LineChartProps as c, StyledLineChart as d, StyledLineChartEmptyText as e };
|