@bbl-digital/snorre 4.0.62 → 4.0.64
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/bundle.js +17 -7
- package/esm/core/BarAndLineComposedChart/BarAndLineComposedChart.stories.js +88 -0
- package/esm/core/BarAndLineComposedChart/index.js +17 -7
- package/lib/core/BarAndLineComposedChart/BarAndLineComposedChart.stories.d.ts +4 -0
- package/lib/core/BarAndLineComposedChart/BarAndLineComposedChart.stories.d.ts.map +1 -1
- package/lib/core/BarAndLineComposedChart/BarAndLineComposedChart.stories.js +88 -0
- package/lib/core/BarAndLineComposedChart/index.d.ts +9 -1
- package/lib/core/BarAndLineComposedChart/index.d.ts.map +1 -1
- package/lib/core/BarAndLineComposedChart/index.js +17 -7
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
@@ -26653,6 +26653,13 @@
|
|
26653
26653
|
legendPadding,
|
26654
26654
|
layout = 'horizontal',
|
26655
26655
|
lineStrokeWidth = 1,
|
26656
|
+
hasYAxis = true,
|
26657
|
+
cartesianGrid = true,
|
26658
|
+
legend = true,
|
26659
|
+
stack = true,
|
26660
|
+
maxBarSize,
|
26661
|
+
barGap,
|
26662
|
+
barRadius,
|
26656
26663
|
...rest
|
26657
26664
|
}) => {
|
26658
26665
|
return /*#__PURE__*/jsxRuntime$1.jsx(BarAndLineComposedChartContainer, {
|
@@ -26670,8 +26677,12 @@
|
|
26670
26677
|
},
|
26671
26678
|
layout: layout && layout,
|
26672
26679
|
stackOffset: "sign",
|
26680
|
+
barGap: barGap,
|
26673
26681
|
...rest,
|
26674
|
-
children: [/*#__PURE__*/jsxRuntime$1.jsx(recharts.
|
26682
|
+
children: [/*#__PURE__*/jsxRuntime$1.jsx(recharts.ReferenceLine, {
|
26683
|
+
y: 0,
|
26684
|
+
stroke: "white"
|
26685
|
+
}), cartesianGrid && /*#__PURE__*/jsxRuntime$1.jsx(recharts.CartesianGrid, {
|
26675
26686
|
strokeDasharray: "0",
|
26676
26687
|
vertical: false
|
26677
26688
|
}), /*#__PURE__*/jsxRuntime$1.jsx(recharts.XAxis, {
|
@@ -26681,10 +26692,7 @@
|
|
26681
26692
|
type: layout === 'vertical' ? 'number' : 'category',
|
26682
26693
|
tickMargin: 5,
|
26683
26694
|
tickFormatter: formatAxisPrice
|
26684
|
-
}), /*#__PURE__*/jsxRuntime$1.jsx(recharts.
|
26685
|
-
y: 0,
|
26686
|
-
stroke: "white"
|
26687
|
-
}), /*#__PURE__*/jsxRuntime$1.jsx(recharts.YAxis, {
|
26695
|
+
}), hasYAxis && /*#__PURE__*/jsxRuntime$1.jsx(recharts.YAxis, {
|
26688
26696
|
dataKey: yAxisDataKey && yAxisDataKey,
|
26689
26697
|
axisLine: yAxisLine && yAxisLine,
|
26690
26698
|
tickLine: tickLineY && tickLineY,
|
@@ -26695,7 +26703,7 @@
|
|
26695
26703
|
barConfig: bars && bars,
|
26696
26704
|
lineConfig: lines && lines
|
26697
26705
|
})
|
26698
|
-
}), /*#__PURE__*/jsxRuntime$1.jsx(recharts.Legend, {
|
26706
|
+
}), legend && /*#__PURE__*/jsxRuntime$1.jsx(recharts.Legend, {
|
26699
26707
|
verticalAlign: legendVAlign && legendVAlign,
|
26700
26708
|
align: legendHAlign && legendHAlign,
|
26701
26709
|
content: /*#__PURE__*/jsxRuntime$1.jsx(CustomLegend, {}),
|
@@ -26710,7 +26718,9 @@
|
|
26710
26718
|
dataKey: bar.dataKey,
|
26711
26719
|
fill: bar.fill,
|
26712
26720
|
name: bar.name,
|
26713
|
-
|
26721
|
+
maxBarSize: maxBarSize || undefined,
|
26722
|
+
stackId: stack ? 'stack' : undefined,
|
26723
|
+
radius: barRadius
|
26714
26724
|
}, bar.name);
|
26715
26725
|
}), lines?.length && lines.map(line => {
|
26716
26726
|
return /*#__PURE__*/jsxRuntime$1.jsx(recharts.Line, {
|
@@ -65,6 +65,67 @@ const DefaultData = [{
|
|
65
65
|
kostnad: -5500,
|
66
66
|
akkumulert: 50500
|
67
67
|
}];
|
68
|
+
const ValuePairData = [{
|
69
|
+
name: 'Jan',
|
70
|
+
inntekt: 40000,
|
71
|
+
kostnad: 23000,
|
72
|
+
stackId: ''
|
73
|
+
}, {
|
74
|
+
name: 'Feb',
|
75
|
+
inntekt: 60000,
|
76
|
+
kostnad: 25000,
|
77
|
+
stackId: ''
|
78
|
+
}, {
|
79
|
+
name: 'Mars',
|
80
|
+
inntekt: 50000,
|
81
|
+
kostnad: 34000,
|
82
|
+
stackId: ''
|
83
|
+
}, {
|
84
|
+
name: 'April',
|
85
|
+
inntekt: 55000,
|
86
|
+
kostnad: 20000,
|
87
|
+
stackId: ''
|
88
|
+
}, {
|
89
|
+
name: 'Mai',
|
90
|
+
inntekt: 54400,
|
91
|
+
kostnad: 30000,
|
92
|
+
stackId: ''
|
93
|
+
}, {
|
94
|
+
name: 'Jun',
|
95
|
+
inntekt: 65000,
|
96
|
+
kostnad: 25000,
|
97
|
+
stackId: ''
|
98
|
+
}, {
|
99
|
+
name: 'Jul',
|
100
|
+
inntekt: 43000,
|
101
|
+
kostnad: 30000,
|
102
|
+
stackId: ''
|
103
|
+
}, {
|
104
|
+
name: 'Aug',
|
105
|
+
inntekt: 60000,
|
106
|
+
kostnad: 40000,
|
107
|
+
stackId: ''
|
108
|
+
}, {
|
109
|
+
name: 'Sept',
|
110
|
+
inntekt: 70000,
|
111
|
+
kostnad: 50000,
|
112
|
+
stackId: ''
|
113
|
+
}, {
|
114
|
+
name: 'Okt',
|
115
|
+
inntekt: 60000,
|
116
|
+
kostnad: 34000,
|
117
|
+
stackId: ''
|
118
|
+
}, {
|
119
|
+
name: 'Nov',
|
120
|
+
inntekt: 40040,
|
121
|
+
kostnad: 24000,
|
122
|
+
stackId: ''
|
123
|
+
}, {
|
124
|
+
name: 'Des',
|
125
|
+
inntekt: 56000,
|
126
|
+
kostnad: 5500,
|
127
|
+
stackId: ''
|
128
|
+
}];
|
68
129
|
export const Default = {
|
69
130
|
render: (_args, {
|
70
131
|
loaded: {
|
@@ -91,4 +152,31 @@ export const Default = {
|
|
91
152
|
xAxisDataKey: "name"
|
92
153
|
}),
|
93
154
|
name: 'Default'
|
155
|
+
};
|
156
|
+
export const ValuePair = {
|
157
|
+
render: (_args, {
|
158
|
+
loaded: {
|
159
|
+
theme
|
160
|
+
}
|
161
|
+
}) => /*#__PURE__*/_jsx(BarAndLineComposedChart, {
|
162
|
+
data: ValuePairData,
|
163
|
+
bars: [{
|
164
|
+
name: 'Inntekt',
|
165
|
+
dataKey: 'inntekt',
|
166
|
+
fill: theme.primary50opa
|
167
|
+
}, {
|
168
|
+
name: 'Kostnad',
|
169
|
+
dataKey: 'kostnad',
|
170
|
+
fill: theme.primary
|
171
|
+
}],
|
172
|
+
hasYAxis: false,
|
173
|
+
cartesianGrid: false,
|
174
|
+
xAxisDataKey: "name",
|
175
|
+
stack: false,
|
176
|
+
maxBarSize: 10,
|
177
|
+
barGap: -20,
|
178
|
+
barRadius: 30,
|
179
|
+
legend: false
|
180
|
+
}),
|
181
|
+
name: 'ValuePair'
|
94
182
|
};
|
@@ -24,6 +24,13 @@ const BarAndLineComposedChart = ({
|
|
24
24
|
legendPadding,
|
25
25
|
layout = 'horizontal',
|
26
26
|
lineStrokeWidth = 1,
|
27
|
+
hasYAxis = true,
|
28
|
+
cartesianGrid = true,
|
29
|
+
legend = true,
|
30
|
+
stack = true,
|
31
|
+
maxBarSize,
|
32
|
+
barGap,
|
33
|
+
barRadius,
|
27
34
|
...rest
|
28
35
|
}) => {
|
29
36
|
return /*#__PURE__*/_jsx(BarAndLineComposedChartContainer, {
|
@@ -41,8 +48,12 @@ const BarAndLineComposedChart = ({
|
|
41
48
|
},
|
42
49
|
layout: layout && layout,
|
43
50
|
stackOffset: "sign",
|
51
|
+
barGap: barGap,
|
44
52
|
...rest,
|
45
|
-
children: [/*#__PURE__*/_jsx(
|
53
|
+
children: [/*#__PURE__*/_jsx(ReferenceLine, {
|
54
|
+
y: 0,
|
55
|
+
stroke: "white"
|
56
|
+
}), cartesianGrid && /*#__PURE__*/_jsx(CartesianGrid, {
|
46
57
|
strokeDasharray: "0",
|
47
58
|
vertical: false
|
48
59
|
}), /*#__PURE__*/_jsx(XAxis, {
|
@@ -52,10 +63,7 @@ const BarAndLineComposedChart = ({
|
|
52
63
|
type: layout === 'vertical' ? 'number' : 'category',
|
53
64
|
tickMargin: 5,
|
54
65
|
tickFormatter: formatAxisPrice
|
55
|
-
}), /*#__PURE__*/_jsx(
|
56
|
-
y: 0,
|
57
|
-
stroke: "white"
|
58
|
-
}), /*#__PURE__*/_jsx(YAxis, {
|
66
|
+
}), hasYAxis && /*#__PURE__*/_jsx(YAxis, {
|
59
67
|
dataKey: yAxisDataKey && yAxisDataKey,
|
60
68
|
axisLine: yAxisLine && yAxisLine,
|
61
69
|
tickLine: tickLineY && tickLineY,
|
@@ -66,7 +74,7 @@ const BarAndLineComposedChart = ({
|
|
66
74
|
barConfig: bars && bars,
|
67
75
|
lineConfig: lines && lines
|
68
76
|
})
|
69
|
-
}), /*#__PURE__*/_jsx(Legend, {
|
77
|
+
}), legend && /*#__PURE__*/_jsx(Legend, {
|
70
78
|
verticalAlign: legendVAlign && legendVAlign,
|
71
79
|
align: legendHAlign && legendHAlign,
|
72
80
|
content: /*#__PURE__*/_jsx(CustomLegend, {}),
|
@@ -81,7 +89,9 @@ const BarAndLineComposedChart = ({
|
|
81
89
|
dataKey: bar.dataKey,
|
82
90
|
fill: bar.fill,
|
83
91
|
name: bar.name,
|
84
|
-
|
92
|
+
maxBarSize: maxBarSize || undefined,
|
93
|
+
stackId: stack ? 'stack' : undefined,
|
94
|
+
radius: barRadius
|
85
95
|
}, bar.name);
|
86
96
|
}), lines?.length && lines.map(line => {
|
87
97
|
return /*#__PURE__*/_jsx(Line, {
|
@@ -6,4 +6,8 @@ export declare const Default: {
|
|
6
6
|
render: (_args: unknown, { loaded: { theme } }: LoadedType) => import("react").JSX.Element;
|
7
7
|
name: string;
|
8
8
|
};
|
9
|
+
export declare const ValuePair: {
|
10
|
+
render: (_args: unknown, { loaded: { theme } }: LoadedType) => import("react").JSX.Element;
|
11
|
+
name: string;
|
12
|
+
};
|
9
13
|
//# sourceMappingURL=BarAndLineComposedChart.stories.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BarAndLineComposedChart.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/BarAndLineComposedChart/BarAndLineComposedChart.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAA;;AAE1D,wBAGS;
|
1
|
+
{"version":3,"file":"BarAndLineComposedChart.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/BarAndLineComposedChart/BarAndLineComposedChart.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAA;;AAE1D,wBAGS;AAgCT,eAAO,MAAM,OAAO;oBACF,OAAO,yBAAyB,UAAU;;CA6B3D,CAAA;AAED,eAAO,MAAM,SAAS;oBACJ,OAAO,yBAAyB,UAAU;;CA2B3D,CAAA"}
|
@@ -65,6 +65,67 @@ const DefaultData = [{
|
|
65
65
|
kostnad: -5500,
|
66
66
|
akkumulert: 50500
|
67
67
|
}];
|
68
|
+
const ValuePairData = [{
|
69
|
+
name: 'Jan',
|
70
|
+
inntekt: 40000,
|
71
|
+
kostnad: 23000,
|
72
|
+
stackId: ''
|
73
|
+
}, {
|
74
|
+
name: 'Feb',
|
75
|
+
inntekt: 60000,
|
76
|
+
kostnad: 25000,
|
77
|
+
stackId: ''
|
78
|
+
}, {
|
79
|
+
name: 'Mars',
|
80
|
+
inntekt: 50000,
|
81
|
+
kostnad: 34000,
|
82
|
+
stackId: ''
|
83
|
+
}, {
|
84
|
+
name: 'April',
|
85
|
+
inntekt: 55000,
|
86
|
+
kostnad: 20000,
|
87
|
+
stackId: ''
|
88
|
+
}, {
|
89
|
+
name: 'Mai',
|
90
|
+
inntekt: 54400,
|
91
|
+
kostnad: 30000,
|
92
|
+
stackId: ''
|
93
|
+
}, {
|
94
|
+
name: 'Jun',
|
95
|
+
inntekt: 65000,
|
96
|
+
kostnad: 25000,
|
97
|
+
stackId: ''
|
98
|
+
}, {
|
99
|
+
name: 'Jul',
|
100
|
+
inntekt: 43000,
|
101
|
+
kostnad: 30000,
|
102
|
+
stackId: ''
|
103
|
+
}, {
|
104
|
+
name: 'Aug',
|
105
|
+
inntekt: 60000,
|
106
|
+
kostnad: 40000,
|
107
|
+
stackId: ''
|
108
|
+
}, {
|
109
|
+
name: 'Sept',
|
110
|
+
inntekt: 70000,
|
111
|
+
kostnad: 50000,
|
112
|
+
stackId: ''
|
113
|
+
}, {
|
114
|
+
name: 'Okt',
|
115
|
+
inntekt: 60000,
|
116
|
+
kostnad: 34000,
|
117
|
+
stackId: ''
|
118
|
+
}, {
|
119
|
+
name: 'Nov',
|
120
|
+
inntekt: 40040,
|
121
|
+
kostnad: 24000,
|
122
|
+
stackId: ''
|
123
|
+
}, {
|
124
|
+
name: 'Des',
|
125
|
+
inntekt: 56000,
|
126
|
+
kostnad: 5500,
|
127
|
+
stackId: ''
|
128
|
+
}];
|
68
129
|
export const Default = {
|
69
130
|
render: (_args, {
|
70
131
|
loaded: {
|
@@ -91,4 +152,31 @@ export const Default = {
|
|
91
152
|
xAxisDataKey: "name"
|
92
153
|
}),
|
93
154
|
name: 'Default'
|
155
|
+
};
|
156
|
+
export const ValuePair = {
|
157
|
+
render: (_args, {
|
158
|
+
loaded: {
|
159
|
+
theme
|
160
|
+
}
|
161
|
+
}) => /*#__PURE__*/_jsx(BarAndLineComposedChart, {
|
162
|
+
data: ValuePairData,
|
163
|
+
bars: [{
|
164
|
+
name: 'Inntekt',
|
165
|
+
dataKey: 'inntekt',
|
166
|
+
fill: theme.primary50opa
|
167
|
+
}, {
|
168
|
+
name: 'Kostnad',
|
169
|
+
dataKey: 'kostnad',
|
170
|
+
fill: theme.primary
|
171
|
+
}],
|
172
|
+
hasYAxis: false,
|
173
|
+
cartesianGrid: false,
|
174
|
+
xAxisDataKey: "name",
|
175
|
+
stack: false,
|
176
|
+
maxBarSize: 10,
|
177
|
+
barGap: -20,
|
178
|
+
barRadius: 30,
|
179
|
+
legend: false
|
180
|
+
}),
|
181
|
+
name: 'ValuePair'
|
94
182
|
};
|
@@ -10,10 +10,11 @@ interface IProps extends Partial<typeof ComposedChart> {
|
|
10
10
|
name: string;
|
11
11
|
dataKey: string;
|
12
12
|
fill: string;
|
13
|
+
stackId?: string;
|
13
14
|
shortName?: string;
|
14
15
|
}[];
|
15
16
|
/** Array of each line in the ComposedChart: e.g [{ name:"Akkumulert", dataKey: "akkumulert", stroke: theme.secondary. type:"monotone"}]. Value of dataKey correlates to a property in the data source. Stroke sets the color of the line. */
|
16
|
-
lines
|
17
|
+
lines?: {
|
17
18
|
name: string;
|
18
19
|
dataKey: string;
|
19
20
|
stroke: string;
|
@@ -53,6 +54,13 @@ interface IProps extends Partial<typeof ComposedChart> {
|
|
53
54
|
layout?: 'horizontal' | 'vertical';
|
54
55
|
/**lineStrokeWidth: Sets the stroke width of the line. Defaults to 1 */
|
55
56
|
lineStrokeWidth?: number;
|
57
|
+
hasYAxis?: boolean;
|
58
|
+
cartesianGrid?: boolean;
|
59
|
+
legend?: boolean;
|
60
|
+
stack?: boolean;
|
61
|
+
maxBarSize?: number;
|
62
|
+
barGap?: number;
|
63
|
+
barRadius?: number;
|
56
64
|
}
|
57
65
|
declare const BarAndLineComposedChart: React.FC<IProps>;
|
58
66
|
export default BarAndLineComposedChart;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/BarAndLineComposedChart/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAGL,aAAa,EAQd,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAKlD,UAAU,MAAO,SAAQ,OAAO,CAAC,OAAO,aAAa,CAAC;IACpD,wFAAwF;IACxF,IAAI,EAAE,GAAG,EAAE,CAAA;IACX,6MAA6M;IAC7M,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,MAAM,CAAA;QACf,IAAI,EAAE,MAAM,CAAA;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/BarAndLineComposedChart/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAGL,aAAa,EAQd,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAKlD,UAAU,MAAO,SAAQ,OAAO,CAAC,OAAO,aAAa,CAAC;IACpD,wFAAwF;IACxF,IAAI,EAAE,GAAG,EAAE,CAAA;IACX,6MAA6M;IAC7M,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,MAAM,CAAA;QACf,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,CAAC,EAAE,MAAM,CAAA;QAEhB,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,EAAE,CAAA;IACH,6OAA6O;IAC7O,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,MAAM,CAAA;QACf,MAAM,EAAE,MAAM,CAAA;QACd,IAAI,EAAE,SAAS,CAAA;QAEf,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,EAAE,CAAA;IACH,iHAAiH;IACjH,YAAY,EAAE,MAAM,CAAA;IACpB,gHAAgH;IAChH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,sEAAsE;IACtE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,qEAAqE;IACrE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,wDAAwD;IACxD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,wDAAwD;IACxD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,uFAAuF;IACvF,YAAY,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;IAC1C,uFAAuF;IACvF,YAAY,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAA;IAC1C,wGAAwG;IACxG,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,uGAAuG;IACvG,aAAa,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IAC5E,sEAAsE;IACtE,MAAM,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IAClC,uEAAuE;IACvE,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AACD,QAAA,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAoH7C,CAAA;AAED,eAAe,uBAAuB,CAAA"}
|
@@ -24,6 +24,13 @@ const BarAndLineComposedChart = ({
|
|
24
24
|
legendPadding,
|
25
25
|
layout = 'horizontal',
|
26
26
|
lineStrokeWidth = 1,
|
27
|
+
hasYAxis = true,
|
28
|
+
cartesianGrid = true,
|
29
|
+
legend = true,
|
30
|
+
stack = true,
|
31
|
+
maxBarSize,
|
32
|
+
barGap,
|
33
|
+
barRadius,
|
27
34
|
...rest
|
28
35
|
}) => {
|
29
36
|
return /*#__PURE__*/_jsx(BarAndLineComposedChartContainer, {
|
@@ -41,8 +48,12 @@ const BarAndLineComposedChart = ({
|
|
41
48
|
},
|
42
49
|
layout: layout && layout,
|
43
50
|
stackOffset: "sign",
|
51
|
+
barGap: barGap,
|
44
52
|
...rest,
|
45
|
-
children: [/*#__PURE__*/_jsx(
|
53
|
+
children: [/*#__PURE__*/_jsx(ReferenceLine, {
|
54
|
+
y: 0,
|
55
|
+
stroke: "white"
|
56
|
+
}), cartesianGrid && /*#__PURE__*/_jsx(CartesianGrid, {
|
46
57
|
strokeDasharray: "0",
|
47
58
|
vertical: false
|
48
59
|
}), /*#__PURE__*/_jsx(XAxis, {
|
@@ -52,10 +63,7 @@ const BarAndLineComposedChart = ({
|
|
52
63
|
type: layout === 'vertical' ? 'number' : 'category',
|
53
64
|
tickMargin: 5,
|
54
65
|
tickFormatter: formatAxisPrice
|
55
|
-
}), /*#__PURE__*/_jsx(
|
56
|
-
y: 0,
|
57
|
-
stroke: "white"
|
58
|
-
}), /*#__PURE__*/_jsx(YAxis, {
|
66
|
+
}), hasYAxis && /*#__PURE__*/_jsx(YAxis, {
|
59
67
|
dataKey: yAxisDataKey && yAxisDataKey,
|
60
68
|
axisLine: yAxisLine && yAxisLine,
|
61
69
|
tickLine: tickLineY && tickLineY,
|
@@ -66,7 +74,7 @@ const BarAndLineComposedChart = ({
|
|
66
74
|
barConfig: bars && bars,
|
67
75
|
lineConfig: lines && lines
|
68
76
|
})
|
69
|
-
}), /*#__PURE__*/_jsx(Legend, {
|
77
|
+
}), legend && /*#__PURE__*/_jsx(Legend, {
|
70
78
|
verticalAlign: legendVAlign && legendVAlign,
|
71
79
|
align: legendHAlign && legendHAlign,
|
72
80
|
content: /*#__PURE__*/_jsx(CustomLegend, {}),
|
@@ -81,7 +89,9 @@ const BarAndLineComposedChart = ({
|
|
81
89
|
dataKey: bar.dataKey,
|
82
90
|
fill: bar.fill,
|
83
91
|
name: bar.name,
|
84
|
-
|
92
|
+
maxBarSize: maxBarSize || undefined,
|
93
|
+
stackId: stack ? 'stack' : undefined,
|
94
|
+
radius: barRadius
|
85
95
|
}, bar.name);
|
86
96
|
}), lines?.length && lines.map(line => {
|
87
97
|
return /*#__PURE__*/_jsx(Line, {
|