@react-magma/charts 12.0.1 → 13.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/dist/charts.js +1 -2450
- package/dist/charts.js.map +1 -1
- package/dist/charts.modern.module.js +1 -2428
- package/dist/charts.modern.module.js.map +1 -1
- package/dist/charts.umd.js +1 -48555
- package/dist/charts.umd.js.map +1 -1
- package/dist/components/CarbonChart/CarbonChart.d.ts +1 -2
- package/dist/components/CarbonChart/CarbonChart.test.d.ts +1 -0
- package/dist/components/CarbonChart/embeddedStyles.d.ts +1 -0
- package/dist/index.d.ts +0 -1
- package/package.json +25 -27
- package/src/components/CarbonChart/CarbonChart.tsx +18 -13
- package/src/components/CarbonChart/CarbonChartArea.stories.tsx +1 -1
- package/src/components/CarbonChart/CarbonChartAreaStacked.stories.tsx +1 -1
- package/src/components/CarbonChart/CarbonChartBar.stories.tsx +1 -1
- package/src/components/CarbonChart/CarbonChartBarFloating.stories.tsx +1 -1
- package/src/components/CarbonChart/CarbonChartBarGrouped.stories.tsx +1 -1
- package/src/components/CarbonChart/CarbonChartBarStacked.stories.tsx +1 -1
- package/src/components/CarbonChart/CarbonChartBoxplot.stories.tsx +1 -1
- package/src/components/CarbonChart/CarbonChartBubble.stories.tsx +1 -1
- package/src/components/CarbonChart/CarbonChartBullet.stories.tsx +1 -1
- package/src/components/CarbonChart/CarbonChartCombo.stories.tsx +1 -1
- package/src/components/CarbonChart/CarbonChartDonut.stories.tsx +1 -1
- package/src/components/CarbonChart/CarbonChartGauge.stories.tsx +1 -1
- package/src/components/CarbonChart/CarbonChartHistogram.stories.tsx +1 -1
- package/src/components/CarbonChart/CarbonChartLine.stories.tsx +1 -1
- package/src/components/CarbonChart/CarbonChartLollipop.stories.tsx +1 -1
- package/src/components/CarbonChart/CarbonChartMeter.stories.tsx +1 -1
- package/src/components/CarbonChart/CarbonChartPie.stories.tsx +1 -1
- package/src/components/CarbonChart/CarbonChartRadar.stories.tsx +1 -1
- package/src/components/CarbonChart/CarbonChartScatter.stories.tsx +1 -1
- package/src/components/CarbonChart/CarbonChartSparkline.stories.tsx +1 -1
- package/src/components/CarbonChart/CarbonChartStep.stories.tsx +1 -1
- package/src/components/CarbonChart/embeddedStyles.ts +24880 -0
- package/src/index.ts +0 -1
- package/dist/components/CarbonChart/CarbonChartArea.stories.d.ts +0 -310
- package/dist/components/CarbonChart/CarbonChartAreaStacked.stories.d.ts +0 -136
- package/dist/components/CarbonChart/CarbonChartBar.stories.d.ts +0 -214
- package/dist/components/CarbonChart/CarbonChartBarFloating.stories.d.ts +0 -82
- package/dist/components/CarbonChart/CarbonChartBarGrouped.stories.d.ts +0 -234
- package/dist/components/CarbonChart/CarbonChartBarStacked.stories.d.ts +0 -266
- package/dist/components/CarbonChart/CarbonChartBoxplot.stories.d.ts +0 -53
- package/dist/components/CarbonChart/CarbonChartBubble.stories.d.ts +0 -196
- package/dist/components/CarbonChart/CarbonChartBullet.stories.d.ts +0 -35
- package/dist/components/CarbonChart/CarbonChartCombo.stories.d.ts +0 -580
- package/dist/components/CarbonChart/CarbonChartDonut.stories.d.ts +0 -120
- package/dist/components/CarbonChart/CarbonChartGauge.stories.d.ts +0 -43
- package/dist/components/CarbonChart/CarbonChartHistogram.stories.d.ts +0 -89
- package/dist/components/CarbonChart/CarbonChartLine.stories.d.ts +0 -577
- package/dist/components/CarbonChart/CarbonChartLollipop.stories.d.ts +0 -55
- package/dist/components/CarbonChart/CarbonChartMeter.stories.d.ts +0 -127
- package/dist/components/CarbonChart/CarbonChartPie.stories.d.ts +0 -101
- package/dist/components/CarbonChart/CarbonChartRadar.stories.d.ts +0 -98
- package/dist/components/CarbonChart/CarbonChartScatter.stories.d.ts +0 -173
- package/dist/components/CarbonChart/CarbonChartSparkline.stories.d.ts +0 -51
- package/dist/components/CarbonChart/CarbonChartStep.stories.d.ts +0 -38
- package/dist/components/LineChart/Chart.d.ts +0 -27
- package/dist/components/LineChart/ChartDataTable.d.ts +0 -17
- package/dist/components/LineChart/CustomAxisComponent.d.ts +0 -3
- package/dist/components/LineChart/CustomPointComponent.d.ts +0 -17
- package/dist/components/LineChart/DataTable.d.ts +0 -5
- package/dist/components/LineChart/GraphTooltip.d.ts +0 -3
- package/dist/components/LineChart/LegendButton.d.ts +0 -6
- package/dist/components/LineChart/LineChart.d.ts +0 -67
- package/dist/components/LineChart/LineChart.stories.d.ts +0 -113
- package/dist/components/LineChart/index.d.ts +0 -1
- package/dist/components/LineChart/magma-charts.d.ts +0 -1
- package/src/components/CarbonChart/carbon-charts.css +0 -7303
- package/src/components/LineChart/Chart.tsx +0 -241
- package/src/components/LineChart/ChartDataTable.test.js +0 -165
- package/src/components/LineChart/ChartDataTable.tsx +0 -135
- package/src/components/LineChart/CustomAxisComponent.tsx +0 -30
- package/src/components/LineChart/CustomPointComponent.tsx +0 -93
- package/src/components/LineChart/DataTable.tsx +0 -57
- package/src/components/LineChart/GraphTooltip.tsx +0 -100
- package/src/components/LineChart/LegendButton.tsx +0 -77
- package/src/components/LineChart/LineChart.stories.tsx +0 -399
- package/src/components/LineChart/LineChart.test.js +0 -501
- package/src/components/LineChart/LineChart.tsx +0 -669
- package/src/components/LineChart/index.ts +0 -1
- package/src/components/LineChart/magma-charts.ts +0 -279
- package/src/components/LineChart/test/exampleChartData.js +0 -289
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ChartOptions } from '@carbon/charts-react';
|
|
3
3
|
import { ThemeInterface } from 'react-magma-dom';
|
|
4
|
-
import './carbon-charts.css';
|
|
5
4
|
export declare enum CarbonChartType {
|
|
6
5
|
area = "area",
|
|
7
6
|
areaStacked = "areaStacked",
|
|
@@ -23,7 +22,7 @@ export declare enum CarbonChartType {
|
|
|
23
22
|
combo = "combo"
|
|
24
23
|
}
|
|
25
24
|
export interface CarbonChartProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
26
|
-
dataSet: Array<
|
|
25
|
+
dataSet: Array<object>;
|
|
27
26
|
isInverse?: boolean;
|
|
28
27
|
/**
|
|
29
28
|
* For a complete list of options, see Carbon Charts documentation
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const carbonChartStyles: import("@emotion/react").SerializedStyles;
|
package/dist/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-magma/charts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -19,40 +19,38 @@
|
|
|
19
19
|
"src"
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
|
-
"build": "
|
|
23
|
-
"build-watch": "
|
|
22
|
+
"build": "microbundle build --jsx jsx --jsxImportSource react --globals react/jsx-runtime=jsx,@emotion/react=EmotionReact,@emotion/styled=EmotionStyled,@carbon/charts-react=CarbonChartsReact",
|
|
23
|
+
"build-watch": "microbundle watch --jsx jsx --jsxImportSource react --globals react/jsx-runtime=jsx,@emotion/react=EmotionReact,@emotion/styled=EmotionStyled,@carbon/charts-react=CarbonChartsReact",
|
|
24
24
|
"lint": "eslint ./src",
|
|
25
|
+
"lint:fix": "eslint ./src --fix",
|
|
26
|
+
"lint:check": "eslint ./src --max-warnings=0",
|
|
25
27
|
"test": "jest",
|
|
26
|
-
"test-watch": "jest --watch"
|
|
28
|
+
"test-watch": "jest --watch",
|
|
29
|
+
"compiler-checks": "tsc --noEmit --project ./tsconfig.json"
|
|
27
30
|
},
|
|
28
31
|
"dependencies": {
|
|
29
|
-
"@carbon/charts-react": "
|
|
30
|
-
"d3": "
|
|
31
|
-
"d3-cloud": "
|
|
32
|
-
"d3-sankey": "
|
|
33
|
-
"victory": "^37.3.6"
|
|
32
|
+
"@carbon/charts-react": "1.23.7",
|
|
33
|
+
"d3": "7.9.0",
|
|
34
|
+
"d3-cloud": "1.2.7",
|
|
35
|
+
"d3-sankey": "0.12.3"
|
|
34
36
|
},
|
|
35
37
|
"devDependencies": {
|
|
36
|
-
"@emotion/react": "
|
|
37
|
-
"@emotion/styled": "
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"react": "
|
|
44
|
-
"react-
|
|
45
|
-
"react-magma-dom": "^4.10.1",
|
|
46
|
-
"react-magma-icons": "^3.2.0",
|
|
47
|
-
"rollup": "^4.52.4",
|
|
48
|
-
"rollup-plugin-postcss": "^4.0.2"
|
|
38
|
+
"@emotion/react": "11.14.0",
|
|
39
|
+
"@emotion/styled": "11.14.0",
|
|
40
|
+
"dom-to-image-more": "3.6.0",
|
|
41
|
+
"framer-motion": "^12.23.22",
|
|
42
|
+
"identity-obj-proxy": "3.0.0",
|
|
43
|
+
"react": "18.3.1",
|
|
44
|
+
"react-dom": "18.3.1",
|
|
45
|
+
"react-magma-dom": "4.9.0-next.27",
|
|
46
|
+
"react-magma-icons": "^3.1.0"
|
|
49
47
|
},
|
|
50
48
|
"peerDependencies": {
|
|
51
|
-
"@emotion/react": "^11.
|
|
52
|
-
"@emotion/styled": "^11.
|
|
53
|
-
"react": "^
|
|
54
|
-
"react-dom": "^
|
|
55
|
-
"react-magma-dom": "^4.
|
|
49
|
+
"@emotion/react": "^11.14.0",
|
|
50
|
+
"@emotion/styled": "^11.14.0",
|
|
51
|
+
"react": "^18.3.1",
|
|
52
|
+
"react-dom": "^18.3.1",
|
|
53
|
+
"react-magma-dom": "^4.9.0-next.27",
|
|
56
54
|
"react-magma-icons": "^3.2.0"
|
|
57
55
|
},
|
|
58
56
|
"engines": {
|
|
@@ -21,11 +21,12 @@ import {
|
|
|
21
21
|
ComboChart,
|
|
22
22
|
ChartOptions,
|
|
23
23
|
} from '@carbon/charts-react';
|
|
24
|
+
import { Global } from '@emotion/react';
|
|
24
25
|
import styled from '@emotion/styled';
|
|
25
26
|
import { transparentize } from 'polished';
|
|
26
27
|
import { ThemeInterface, ThemeContext, useIsInverse } from 'react-magma-dom';
|
|
27
28
|
|
|
28
|
-
import './
|
|
29
|
+
import { carbonChartStyles } from './embeddedStyles';
|
|
29
30
|
|
|
30
31
|
export enum CarbonChartType {
|
|
31
32
|
area = 'area',
|
|
@@ -49,7 +50,7 @@ export enum CarbonChartType {
|
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
export interface CarbonChartProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
52
|
-
dataSet: Array<
|
|
53
|
+
dataSet: Array<object>;
|
|
53
54
|
isInverse?: boolean;
|
|
54
55
|
/**
|
|
55
56
|
* For a complete list of options, see Carbon Charts documentation
|
|
@@ -582,6 +583,7 @@ export const CarbonChart = React.forwardRef<HTMLDivElement, CarbonChartProps>(
|
|
|
582
583
|
? allInverseColors[i]
|
|
583
584
|
: allColors[i]);
|
|
584
585
|
}
|
|
586
|
+
|
|
585
587
|
return {};
|
|
586
588
|
});
|
|
587
589
|
|
|
@@ -614,17 +616,20 @@ export const CarbonChart = React.forwardRef<HTMLDivElement, CarbonChartProps>(
|
|
|
614
616
|
const groupsLength = Object.keys(buildColors()).length;
|
|
615
617
|
|
|
616
618
|
return (
|
|
617
|
-
<
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
619
|
+
<React.Fragment>
|
|
620
|
+
<Global styles={carbonChartStyles} />
|
|
621
|
+
<CarbonChartWrapper
|
|
622
|
+
data-testid={testId}
|
|
623
|
+
ref={ref}
|
|
624
|
+
isInverse={isInverse}
|
|
625
|
+
theme={theme}
|
|
626
|
+
className="carbon-chart-wrapper"
|
|
627
|
+
groupsLength={groupsLength < 6 ? groupsLength : 14}
|
|
628
|
+
{...rest}
|
|
629
|
+
>
|
|
630
|
+
<ChartType data={dataSet} options={newOptions} />
|
|
631
|
+
</CarbonChartWrapper>
|
|
632
|
+
</React.Fragment>
|
|
628
633
|
);
|
|
629
634
|
}
|
|
630
635
|
);
|