@react-magma/charts 16.0.0-next.1 → 16.0.0-v6-next.3
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/dist/charts.js +1517 -114
- package/dist/charts.js.map +1 -1
- package/dist/charts.modern.module.js +1519 -117
- package/dist/charts.modern.module.js.map +1 -1
- package/dist/charts.umd.js +49860 -28910
- package/dist/charts.umd.js.map +1 -1
- package/dist/components/CarbonChart/CarbonChart.d.ts +1 -1
- package/dist/components/CarbonChart/CarbonChartArea.stories.d.ts +310 -0
- package/dist/components/CarbonChart/CarbonChartAreaStacked.stories.d.ts +136 -0
- package/dist/components/CarbonChart/CarbonChartBar.stories.d.ts +232 -0
- package/dist/components/CarbonChart/CarbonChartBarFloating.stories.d.ts +82 -0
- package/dist/components/CarbonChart/CarbonChartBarGrouped.stories.d.ts +234 -0
- package/dist/components/CarbonChart/CarbonChartBarStacked.stories.d.ts +266 -0
- package/dist/components/CarbonChart/CarbonChartBoxplot.stories.d.ts +53 -0
- package/dist/components/CarbonChart/CarbonChartBubble.stories.d.ts +196 -0
- package/dist/components/CarbonChart/CarbonChartBullet.stories.d.ts +35 -0
- package/dist/components/CarbonChart/CarbonChartCombo.stories.d.ts +580 -0
- package/dist/components/CarbonChart/CarbonChartDonut.stories.d.ts +120 -0
- package/dist/components/CarbonChart/CarbonChartGauge.stories.d.ts +43 -0
- package/dist/components/CarbonChart/CarbonChartHistogram.stories.d.ts +89 -0
- package/dist/components/CarbonChart/CarbonChartLine.stories.d.ts +577 -0
- package/dist/components/CarbonChart/CarbonChartLollipop.stories.d.ts +55 -0
- package/dist/components/CarbonChart/CarbonChartMeter.stories.d.ts +127 -0
- package/dist/components/CarbonChart/CarbonChartPie.stories.d.ts +101 -0
- package/dist/components/CarbonChart/CarbonChartRadar.stories.d.ts +98 -0
- package/dist/components/CarbonChart/CarbonChartScatter.stories.d.ts +173 -0
- package/dist/components/CarbonChart/CarbonChartSparkline.stories.d.ts +51 -0
- package/dist/components/CarbonChart/CarbonChartStep.stories.d.ts +38 -0
- package/dist/components/ChartTable/ChartTable.stories.d.ts +166 -0
- package/dist/components/LineChart/Chart.d.ts +27 -0
- package/dist/components/LineChart/ChartDataTable.d.ts +17 -0
- package/dist/components/LineChart/CustomAxisComponent.d.ts +3 -0
- package/dist/components/LineChart/CustomPointComponent.d.ts +17 -0
- package/dist/components/LineChart/DataTable.d.ts +5 -0
- package/dist/components/LineChart/GraphTooltip.d.ts +3 -0
- package/dist/components/LineChart/LegendButton.d.ts +6 -0
- package/dist/components/LineChart/LineChart.d.ts +67 -0
- package/dist/components/LineChart/LineChart.stories.d.ts +113 -0
- package/dist/components/LineChart/index.d.ts +1 -0
- package/dist/components/LineChart/magma-charts.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/package.json +21 -24
- package/src/components/CarbonChart/CarbonChart.test.js +257 -173
- package/src/components/CarbonChart/CarbonChart.tsx +44 -39
- package/src/components/CarbonChart/CarbonChartArea.stories.tsx +5 -3
- package/src/components/CarbonChart/CarbonChartAreaStacked.stories.tsx +5 -3
- package/src/components/CarbonChart/CarbonChartBar.stories.tsx +5 -3
- package/src/components/CarbonChart/CarbonChartBarFloating.stories.tsx +5 -3
- package/src/components/CarbonChart/CarbonChartBarGrouped.stories.tsx +5 -3
- package/src/components/CarbonChart/CarbonChartBarStacked.stories.tsx +5 -3
- package/src/components/CarbonChart/CarbonChartBoxplot.stories.tsx +5 -3
- package/src/components/CarbonChart/CarbonChartBubble.stories.tsx +5 -3
- package/src/components/CarbonChart/CarbonChartBullet.stories.tsx +5 -3
- package/src/components/CarbonChart/CarbonChartCombo.stories.tsx +5 -3
- package/src/components/CarbonChart/CarbonChartDonut.stories.tsx +5 -3
- package/src/components/CarbonChart/CarbonChartGauge.stories.tsx +5 -3
- package/src/components/CarbonChart/CarbonChartHistogram.stories.tsx +5 -3
- package/src/components/CarbonChart/CarbonChartLine.stories.tsx +5 -3
- package/src/components/CarbonChart/CarbonChartLollipop.stories.tsx +5 -3
- package/src/components/CarbonChart/CarbonChartMeter.stories.tsx +5 -3
- package/src/components/CarbonChart/CarbonChartPie.stories.tsx +5 -3
- package/src/components/CarbonChart/CarbonChartRadar.stories.tsx +5 -3
- package/src/components/CarbonChart/CarbonChartScatter.stories.tsx +5 -3
- package/src/components/CarbonChart/CarbonChartSparkline.stories.tsx +5 -3
- package/src/components/CarbonChart/CarbonChartStep.stories.tsx +5 -3
- package/src/components/ChartTable/ChartDataTable.tsx +0 -3
- package/src/components/ChartTable/ChartMoreOptionsButton.tsx +0 -1
- package/src/components/ChartTable/ChartTable.test.js +0 -8
- package/src/components/ChartTable/ChartTableButton.tsx +0 -1
- package/src/components/ChartTable/ChartToolbar.tsx +0 -1
- package/src/components/ChartTable/chartToolbarI18n.ts +1 -1
- package/src/components/LineChart/Chart.tsx +241 -0
- package/src/components/LineChart/ChartDataTable.test.js +165 -0
- package/src/components/LineChart/ChartDataTable.tsx +135 -0
- package/src/components/LineChart/CustomAxisComponent.tsx +30 -0
- package/src/components/LineChart/CustomPointComponent.tsx +93 -0
- package/src/components/LineChart/DataTable.tsx +57 -0
- package/src/components/LineChart/GraphTooltip.tsx +100 -0
- package/src/components/LineChart/LegendButton.tsx +77 -0
- package/src/components/LineChart/LineChart.stories.tsx +399 -0
- package/src/components/LineChart/LineChart.test.js +501 -0
- package/src/components/LineChart/LineChart.tsx +669 -0
- package/src/components/LineChart/index.ts +1 -0
- package/src/components/LineChart/magma-charts.ts +279 -0
- package/src/components/LineChart/test/exampleChartData.js +289 -0
- package/src/hooks/useCarbonModalFocusManagement.ts +0 -12
- package/src/index.ts +1 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CarbonChartProps, CarbonChartType } from '../CarbonChart';
|
|
3
|
+
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const DonutWithToolbar: {
|
|
6
|
+
render: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
7
|
+
args: {
|
|
8
|
+
isInverse: boolean;
|
|
9
|
+
type: CarbonChartType;
|
|
10
|
+
dataSet: {
|
|
11
|
+
group: string;
|
|
12
|
+
value: number;
|
|
13
|
+
}[];
|
|
14
|
+
options: {
|
|
15
|
+
title: string;
|
|
16
|
+
resizable: boolean;
|
|
17
|
+
height: string;
|
|
18
|
+
donut: {
|
|
19
|
+
center: {
|
|
20
|
+
label: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
legend: {
|
|
24
|
+
truncation: {
|
|
25
|
+
type: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
chartToolbar: {};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export declare const BarWithToolbar: {
|
|
33
|
+
render: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
34
|
+
args: {
|
|
35
|
+
isInverse: boolean;
|
|
36
|
+
type: CarbonChartType;
|
|
37
|
+
dataSet: {
|
|
38
|
+
group: string;
|
|
39
|
+
value: number;
|
|
40
|
+
}[];
|
|
41
|
+
options: {
|
|
42
|
+
title: string;
|
|
43
|
+
axes: {
|
|
44
|
+
left: {
|
|
45
|
+
mapsTo: string;
|
|
46
|
+
};
|
|
47
|
+
bottom: {
|
|
48
|
+
mapsTo: string;
|
|
49
|
+
scaleType: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
height: string;
|
|
53
|
+
};
|
|
54
|
+
chartToolbar: {
|
|
55
|
+
tableColumns: {
|
|
56
|
+
header: string;
|
|
57
|
+
key: string;
|
|
58
|
+
}[];
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
export declare const InverseTheme: {
|
|
63
|
+
render: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
64
|
+
args: {
|
|
65
|
+
isInverse: boolean;
|
|
66
|
+
type: CarbonChartType;
|
|
67
|
+
dataSet: {
|
|
68
|
+
group: string;
|
|
69
|
+
value: number;
|
|
70
|
+
}[];
|
|
71
|
+
options: {
|
|
72
|
+
title: string;
|
|
73
|
+
resizable: boolean;
|
|
74
|
+
height: string;
|
|
75
|
+
donut: {
|
|
76
|
+
center: {
|
|
77
|
+
label: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
legend: {
|
|
81
|
+
truncation: {
|
|
82
|
+
type: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
chartToolbar: {};
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
export declare const TableOnly: {
|
|
90
|
+
render: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
91
|
+
args: {
|
|
92
|
+
isInverse: boolean;
|
|
93
|
+
type: CarbonChartType;
|
|
94
|
+
dataSet: {
|
|
95
|
+
group: string;
|
|
96
|
+
value: number;
|
|
97
|
+
}[];
|
|
98
|
+
options: {
|
|
99
|
+
title: string;
|
|
100
|
+
resizable: boolean;
|
|
101
|
+
height: string;
|
|
102
|
+
donut: {
|
|
103
|
+
center: {
|
|
104
|
+
label: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
legend: {
|
|
108
|
+
truncation: {
|
|
109
|
+
type: string;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
chartToolbar: {
|
|
114
|
+
fullscreen: boolean;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
declare const slotContent: {
|
|
119
|
+
tooltip: React.JSX.Element;
|
|
120
|
+
badge: React.JSX.Element;
|
|
121
|
+
none: undefined;
|
|
122
|
+
};
|
|
123
|
+
interface TitleSlotsArgs extends Omit<CarbonChartProps, 'options'> {
|
|
124
|
+
content: keyof typeof slotContent;
|
|
125
|
+
slotPosition: 'titleSuffix' | 'titlePrefix';
|
|
126
|
+
title: string;
|
|
127
|
+
}
|
|
128
|
+
export declare const TitleSlots: {
|
|
129
|
+
render: ({ content, slotPosition, title, ...args }: TitleSlotsArgs) => React.JSX.Element;
|
|
130
|
+
argTypes: {
|
|
131
|
+
content: {
|
|
132
|
+
control: {
|
|
133
|
+
type: string;
|
|
134
|
+
};
|
|
135
|
+
options: string[];
|
|
136
|
+
};
|
|
137
|
+
slotPosition: {
|
|
138
|
+
control: {
|
|
139
|
+
type: string;
|
|
140
|
+
};
|
|
141
|
+
options: string[];
|
|
142
|
+
};
|
|
143
|
+
title: {
|
|
144
|
+
control: {
|
|
145
|
+
type: string;
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
args: {
|
|
150
|
+
content: string;
|
|
151
|
+
isInverse: boolean;
|
|
152
|
+
slotPosition: string;
|
|
153
|
+
title: string;
|
|
154
|
+
type: CarbonChartType;
|
|
155
|
+
dataSet: {
|
|
156
|
+
group: string;
|
|
157
|
+
value: number;
|
|
158
|
+
}[];
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
export declare const AdditionalContent: {
|
|
162
|
+
render: ({ isInverse }: Pick<CarbonChartProps, 'isInverse'>) => React.JSX.Element;
|
|
163
|
+
args: {
|
|
164
|
+
isInverse: boolean;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { LineChartProps } from './LineChart';
|
|
3
|
+
interface BaseChartProps {
|
|
4
|
+
/**
|
|
5
|
+
* Description of what the line chart data represents placed above the chart
|
|
6
|
+
*/
|
|
7
|
+
description?: string;
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
testId?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Title of the line chart
|
|
14
|
+
*/
|
|
15
|
+
title: string;
|
|
16
|
+
/**
|
|
17
|
+
* Type of chart - for now just 'line' is accepted
|
|
18
|
+
*/
|
|
19
|
+
type: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ChartProps<T extends any> extends BaseChartProps, Omit<React.HTMLAttributes<HTMLDivElement>, 'title'>, LineChartProps<T> {
|
|
22
|
+
}
|
|
23
|
+
declare function BaseChart<T>(props: ChartProps<T>, ref: React.Ref<HTMLDivElement>): React.JSX.Element;
|
|
24
|
+
export declare const Chart: <T>(props: ChartProps<T> & {
|
|
25
|
+
ref?: React.MutableRefObject<HTMLDivElement> | undefined;
|
|
26
|
+
}) => ReturnType<typeof BaseChart>;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { VictoryAxisProps } from 'victory';
|
|
3
|
+
export declare function toCamelCase(str: string): string;
|
|
4
|
+
export interface DataTableProps {
|
|
5
|
+
data?: any[];
|
|
6
|
+
xData: {
|
|
7
|
+
keyValue?: string | number | symbol;
|
|
8
|
+
label?: VictoryAxisProps['label'];
|
|
9
|
+
tickFormat?: Partial<VictoryAxisProps['tickFormat']>;
|
|
10
|
+
tickValues?: VictoryAxisProps['tickValues'];
|
|
11
|
+
};
|
|
12
|
+
yData: {
|
|
13
|
+
keyValue?: string | number | symbol;
|
|
14
|
+
tickFormat?: Partial<VictoryAxisProps['tickFormat']>;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export declare const ChartDataTable: (props: DataTableProps) => React.JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { PointProps } from 'victory';
|
|
3
|
+
export interface CustomScatterDataComponentInterface extends PointProps {
|
|
4
|
+
lineIndex: number;
|
|
5
|
+
pointRefArray: React.MutableRefObject<React.MutableRefObject<Element>[]>;
|
|
6
|
+
registerPoint: (refArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, ref: React.MutableRefObject<Element>) => void;
|
|
7
|
+
unregisterPoint: (refArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, ref: React.MutableRefObject<Element>) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface CustomPointComponentInterface {
|
|
10
|
+
lineIndex: number;
|
|
11
|
+
pointIndex: PointProps['index'];
|
|
12
|
+
pointRefArray: React.MutableRefObject<React.MutableRefObject<Element>[]>;
|
|
13
|
+
registerPoint: (refArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, ref: React.MutableRefObject<Element>) => void;
|
|
14
|
+
unregisterPoint: (refArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, ref: React.MutableRefObject<Element>) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const CustomScatterDataComponent: (props: CustomScatterDataComponentInterface) => React.JSX.Element;
|
|
17
|
+
export declare const CustomPointComponent: (props: CustomPointComponentInterface) => React.JSX.Element;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { VictoryAxisProps, VictoryChartProps, VictoryLineProps, VictoryScatterProps } from 'victory';
|
|
3
|
+
export declare type LineChartAxisStyle = VictoryAxisProps['style'];
|
|
4
|
+
export declare type DataGetterPropType = VictoryLineProps['x'];
|
|
5
|
+
export declare type ChartDataOptions = {
|
|
6
|
+
label: string;
|
|
7
|
+
x: string | number;
|
|
8
|
+
y: string | number;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
} | {
|
|
11
|
+
label: string;
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
} | any;
|
|
14
|
+
export interface LineChartData<T> {
|
|
15
|
+
name: string;
|
|
16
|
+
data: T[];
|
|
17
|
+
}
|
|
18
|
+
export interface LineChartComponentProps {
|
|
19
|
+
chart?: VictoryChartProps;
|
|
20
|
+
line?: VictoryLineProps;
|
|
21
|
+
scatter?: VictoryScatterProps;
|
|
22
|
+
xAxis?: VictoryAxisProps;
|
|
23
|
+
yAxis?: VictoryAxisProps;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Please use CarbonChart instead
|
|
27
|
+
*/
|
|
28
|
+
export interface LineChartProps<T extends ChartDataOptions> {
|
|
29
|
+
/**
|
|
30
|
+
* Props passed to each component that makes up the line chart. See `victory` for accepted props.
|
|
31
|
+
*/
|
|
32
|
+
componentProps?: LineChartComponentProps;
|
|
33
|
+
/**
|
|
34
|
+
* Data used to build the chart
|
|
35
|
+
*/
|
|
36
|
+
data?: LineChartData<T>[];
|
|
37
|
+
isMulti?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
lastFocusedScatterPoint: React.MutableRefObject<SVGPathElement | null>;
|
|
42
|
+
/**
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
pointRefArray: React.MutableRefObject<React.MutableRefObject<Element>[]>;
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
registerPoint: (refArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, ref: React.MutableRefObject<Element>) => void;
|
|
50
|
+
/**
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
tabRef: React.MutableRefObject<HTMLButtonElement | null>;
|
|
54
|
+
/**
|
|
55
|
+
* @internal
|
|
56
|
+
*/
|
|
57
|
+
unregisterPoint: (refArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, ref: React.MutableRefObject<Element>) => void;
|
|
58
|
+
/**
|
|
59
|
+
* Value of x key in chart data
|
|
60
|
+
*/
|
|
61
|
+
x?: keyof T;
|
|
62
|
+
/**
|
|
63
|
+
* Value of y key in chart data
|
|
64
|
+
*/
|
|
65
|
+
y?: keyof T;
|
|
66
|
+
}
|
|
67
|
+
export declare function LineChart<T>(props: LineChartProps<T>): React.JSX.Element;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
|
|
2
|
+
export default _default;
|
|
3
|
+
export declare const Default: {
|
|
4
|
+
args: {
|
|
5
|
+
data: {
|
|
6
|
+
name: string;
|
|
7
|
+
data: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
label: string;
|
|
11
|
+
}[];
|
|
12
|
+
}[];
|
|
13
|
+
description: string;
|
|
14
|
+
title: string;
|
|
15
|
+
type: string;
|
|
16
|
+
componentProps: {
|
|
17
|
+
xAxis: {
|
|
18
|
+
label: string;
|
|
19
|
+
tickFormat: string[];
|
|
20
|
+
};
|
|
21
|
+
yAxis: {
|
|
22
|
+
domain: number[];
|
|
23
|
+
label: string;
|
|
24
|
+
tickFormat: (t: any) => string;
|
|
25
|
+
tickValues: number[];
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare const ExplicitData: {
|
|
31
|
+
args: {
|
|
32
|
+
componentProps: {
|
|
33
|
+
xAxis: {
|
|
34
|
+
tickFormat: string[];
|
|
35
|
+
label: string;
|
|
36
|
+
};
|
|
37
|
+
yAxis: {
|
|
38
|
+
domain: number[];
|
|
39
|
+
label: string;
|
|
40
|
+
tickFormat: (t: any) => string;
|
|
41
|
+
tickValues: number[];
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
data: {
|
|
45
|
+
name: string;
|
|
46
|
+
data: {
|
|
47
|
+
month: number;
|
|
48
|
+
sales: number;
|
|
49
|
+
label: string;
|
|
50
|
+
}[];
|
|
51
|
+
}[];
|
|
52
|
+
x: string;
|
|
53
|
+
y: string;
|
|
54
|
+
description: string;
|
|
55
|
+
title: string;
|
|
56
|
+
type: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export declare const HistoryOfTexas: {
|
|
60
|
+
args: {
|
|
61
|
+
description: string;
|
|
62
|
+
title: string;
|
|
63
|
+
componentProps: {
|
|
64
|
+
xAxis: {
|
|
65
|
+
label: string;
|
|
66
|
+
tickValues: number[];
|
|
67
|
+
};
|
|
68
|
+
yAxis: {
|
|
69
|
+
label: string;
|
|
70
|
+
tickFormat: (t: any) => any;
|
|
71
|
+
tickValues: number[];
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
data: any;
|
|
75
|
+
x: string;
|
|
76
|
+
y: string;
|
|
77
|
+
type: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
export declare const SpendingRevenue: {
|
|
81
|
+
args: {
|
|
82
|
+
data: any;
|
|
83
|
+
title: string;
|
|
84
|
+
type: string;
|
|
85
|
+
componentProps: {
|
|
86
|
+
xAxis: {
|
|
87
|
+
label: string;
|
|
88
|
+
};
|
|
89
|
+
yAxis: {
|
|
90
|
+
label: string;
|
|
91
|
+
tickValues: number[];
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
export declare const VotingParticipation: {
|
|
97
|
+
args: {
|
|
98
|
+
data: any;
|
|
99
|
+
title: string;
|
|
100
|
+
type: string;
|
|
101
|
+
componentProps: {
|
|
102
|
+
xAxis: {
|
|
103
|
+
label: string;
|
|
104
|
+
};
|
|
105
|
+
yAxis: {
|
|
106
|
+
domain: number[];
|
|
107
|
+
label: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
x: string;
|
|
111
|
+
y: string;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Chart';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const magmaTheme: any;
|
package/dist/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-magma/charts",
|
|
3
|
-
"version": "16.0.0-next.
|
|
3
|
+
"version": "16.0.0-v6-next.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,41 +27,38 @@
|
|
|
27
27
|
"build": "rollup -c rollup.config.js --bundleConfigAsCjs",
|
|
28
28
|
"build-watch": "rollup -c rollup.config.js --watch --bundleConfigAsCjs",
|
|
29
29
|
"lint": "eslint ./src",
|
|
30
|
-
"lint:fix": "eslint ./src --fix",
|
|
31
|
-
"lint:check": "eslint ./src --max-warnings=0",
|
|
32
30
|
"test": "jest",
|
|
33
|
-
"test-watch": "jest --watch"
|
|
34
|
-
"compiler-checks": "tsc --noEmit --project ./tsconfig.json"
|
|
31
|
+
"test-watch": "jest --watch"
|
|
35
32
|
},
|
|
36
33
|
"dependencies": {
|
|
37
|
-
"@carbon/charts-react": "1.
|
|
38
|
-
"d3": "7.9.0",
|
|
39
|
-
"d3-cloud": "1.2.7",
|
|
40
|
-
"d3-sankey": "0.12.3"
|
|
34
|
+
"@carbon/charts-react": "^1.14.8",
|
|
35
|
+
"d3": "^7.9.0",
|
|
36
|
+
"d3-cloud": "^1.2.7",
|
|
37
|
+
"d3-sankey": "^0.12.3",
|
|
38
|
+
"victory": "^37.3.6"
|
|
41
39
|
},
|
|
42
40
|
"devDependencies": {
|
|
43
|
-
"@emotion/react": "11.
|
|
44
|
-
"@emotion/styled": "11.
|
|
45
|
-
"dom-to-image-more": "3.6.0",
|
|
41
|
+
"@emotion/react": "^11.13.0",
|
|
42
|
+
"@emotion/styled": "^11.13.0",
|
|
46
43
|
"@rollup/plugin-commonjs": "^28.0.8",
|
|
47
44
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
48
45
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
49
|
-
"
|
|
50
|
-
"identity-obj-proxy": "3.0.0",
|
|
51
|
-
"react": "
|
|
52
|
-
"react-dom": "
|
|
53
|
-
"react-magma-dom": "^
|
|
54
|
-
"react-magma-icons": "^3.
|
|
46
|
+
"dom-to-image-more": "3.1.4",
|
|
47
|
+
"identity-obj-proxy": "^3.0.0",
|
|
48
|
+
"react": "^17.0.2",
|
|
49
|
+
"react-dom": "^17.0.2",
|
|
50
|
+
"react-magma-dom": "^6.1.0-v6-next.10",
|
|
51
|
+
"react-magma-icons": "^3.3.1",
|
|
55
52
|
"rollup": "^4.52.4",
|
|
56
53
|
"rollup-plugin-postcss": "^4.0.2"
|
|
57
54
|
},
|
|
58
55
|
"peerDependencies": {
|
|
59
|
-
"@emotion/react": "^11.
|
|
60
|
-
"@emotion/styled": "^11.
|
|
61
|
-
"react": "^
|
|
62
|
-
"react-dom": "^
|
|
63
|
-
"react-magma-dom": "^
|
|
64
|
-
"react-magma-icons": "^3.
|
|
56
|
+
"@emotion/react": "^11.13.0",
|
|
57
|
+
"@emotion/styled": "^11.13.0",
|
|
58
|
+
"react": "^17.0.2",
|
|
59
|
+
"react-dom": "^17.0.2",
|
|
60
|
+
"react-magma-dom": "^6.1.0-v6-next.2",
|
|
61
|
+
"react-magma-icons": "^3.3.1"
|
|
65
62
|
},
|
|
66
63
|
"engines": {
|
|
67
64
|
"node": ">=22.14.0",
|