@react-magma/charts 12.0.0-next.1 → 12.0.0-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 +5 -2
- package/dist/charts.js +1 -1
- package/dist/charts.js.map +1 -1
- package/dist/charts.map +1 -1
- package/dist/charts.modern.module.js +1 -1
- package/dist/charts.modern.module.js.map +1 -1
- package/dist/charts.umd.js +1 -1
- package/dist/charts.umd.js.map +1 -1
- package/dist/components/CarbonChart/CarbonChartArea.stories.d.ts +1 -0
- package/dist/components/CarbonChart/CarbonChartBoxplot.stories.d.ts +1 -0
- package/dist/components/CarbonChart/CarbonChartBubble.stories.d.ts +5 -0
- package/dist/components/CarbonChart/CarbonChartCombo.stories.d.ts +11 -0
- package/dist/components/CarbonChart/CarbonChartGauge.stories.d.ts +1 -0
- package/dist/components/CarbonChart/CarbonChartHistogram.stories.d.ts +2 -0
- package/dist/components/CarbonChart/CarbonChartMeter.stories.d.ts +4 -0
- package/dist/components/CarbonChart/CarbonChartRadar.stories.d.ts +3 -0
- package/dist/components/CarbonChart/CarbonChartScatter.stories.d.ts +5 -0
- package/package.json +5 -5
- package/src/components/CarbonChart/CarbonChart.tsx +26 -4
- package/src/components/CarbonChart/CarbonChartArea.stories.tsx +101 -0
- package/src/components/CarbonChart/CarbonChartBoxplot.stories.tsx +120 -122
- package/src/components/CarbonChart/CarbonChartBubble.stories.tsx +475 -477
- package/src/components/CarbonChart/CarbonChartCombo.stories.tsx +1282 -1284
- package/src/components/CarbonChart/CarbonChartGauge.stories.tsx +24 -26
- package/src/components/CarbonChart/CarbonChartHistogram.stories.tsx +593 -595
- package/src/components/CarbonChart/CarbonChartMeter.stories.tsx +147 -149
- package/src/components/CarbonChart/CarbonChartRadar.stories.tsx +375 -377
- package/src/components/CarbonChart/CarbonChartScatter.stories.tsx +363 -365
|
@@ -9,3 +9,4 @@ export declare const AreaMultipleBoundedAreasNaturalCurve: import("@storybook/cs
|
|
|
9
9
|
export declare const AreaMultipleBoundedAreasNaturalCurveZoomBarEnabled: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
10
10
|
export declare const AreaSkeleton: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
11
11
|
export declare const AreaEmptyState: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
12
|
+
export declare const AreaTimeSeriesWithCustomColors: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
@@ -2,3 +2,4 @@ import { CarbonChartProps } from '.';
|
|
|
2
2
|
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
|
|
3
3
|
export default _default;
|
|
4
4
|
export declare const HorizontalBoxplot: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
5
|
+
export declare const VerticalBoxplot: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
@@ -2,3 +2,8 @@ import { CarbonChartProps } from '.';
|
|
|
2
2
|
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
|
|
3
3
|
export default _default;
|
|
4
4
|
export declare const BubbleLinear: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
5
|
+
export declare const BubbleTimeSeries: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
6
|
+
export declare const BubbleDiscrete: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
7
|
+
export declare const BubbleDualDiscreteAxes: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
8
|
+
export declare const BubbleEmptyState: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
9
|
+
export declare const BubbleSkeleton: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
@@ -2,3 +2,14 @@ import { CarbonChartProps } from '.';
|
|
|
2
2
|
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
|
|
3
3
|
export default _default;
|
|
4
4
|
export declare const ComboLineAndSimpleBarCustomConfigs: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
5
|
+
export declare const ComboLineAndStackedBar: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
6
|
+
export declare const ComboLineAndGroupedBarCustomConfigs: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
7
|
+
export declare const ComboLineAndFloatingBar: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
8
|
+
export declare const ComboHorizontalLineAndGroupedBar: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
9
|
+
export declare const HorizontalComboLineAndSimpleBar: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
10
|
+
export declare const ComboLineAndArea: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
11
|
+
export declare const ComboStackedAreaAndLine: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
12
|
+
export declare const ComboLineAndScatterAndBar: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
13
|
+
export declare const ComboLineAndAreaTimeSeries: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
14
|
+
export declare const ComboChartEmpty: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
15
|
+
export declare const ComboChartLoading: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
@@ -2,3 +2,4 @@ import { CarbonChartProps } from '.';
|
|
|
2
2
|
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
|
|
3
3
|
export default _default;
|
|
4
4
|
export declare const GaugeSemicircularDangerStatus: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
5
|
+
export declare const GaugeCircularWarningStatus: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
@@ -2,3 +2,5 @@ import { CarbonChartProps } from '.';
|
|
|
2
2
|
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
|
|
3
3
|
export default _default;
|
|
4
4
|
export declare const HistogramLinear: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
5
|
+
export declare const HistogramDefinedBinsNumberLinear: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
6
|
+
export declare const HistogramDefinedBinsLinear: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
@@ -2,3 +2,7 @@ import { CarbonChartProps } from '.';
|
|
|
2
2
|
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
|
|
3
3
|
export default _default;
|
|
4
4
|
export declare const MeterChartWithStatuses: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
5
|
+
export declare const MeterChartNoStatus: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
6
|
+
export declare const ProportionalMeterChart: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
7
|
+
export declare const ProportionalMeterChartPeakAndStatuses: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
8
|
+
export declare const ProportionalMeterChartTruncated: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
@@ -2,3 +2,6 @@ import { CarbonChartProps } from '.';
|
|
|
2
2
|
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
|
|
3
3
|
export default _default;
|
|
4
4
|
export declare const Radar: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
5
|
+
export declare const RadarCentered: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
6
|
+
export declare const RadarMissingDatapoints: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
7
|
+
export declare const RadarDense: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
@@ -2,3 +2,8 @@ import { CarbonChartProps } from '.';
|
|
|
2
2
|
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
|
|
3
3
|
export default _default;
|
|
4
4
|
export declare const ScatterLinearXAndY: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
5
|
+
export declare const ScatterTimeSeries: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
6
|
+
export declare const ScatterDiscrete: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
7
|
+
export declare const ScatterDualAxes: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
8
|
+
export declare const ScatterEmptyState: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
|
9
|
+
export declare const ScatterSkeleton: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, CarbonChartProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-magma/charts",
|
|
3
|
-
"version": "12.0.0-next.
|
|
3
|
+
"version": "12.0.0-next.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./src",
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
"identity-obj-proxy": "^3.0.0",
|
|
38
38
|
"react": "^17.0.2",
|
|
39
39
|
"react-dom": "^17.0.2",
|
|
40
|
-
"react-magma-dom": "^4.10.0-next.
|
|
41
|
-
"react-magma-icons": "^3.
|
|
40
|
+
"react-magma-dom": "^4.10.0-next.3",
|
|
41
|
+
"react-magma-icons": "^3.2.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@emotion/react": "^11.13.0",
|
|
45
45
|
"@emotion/styled": "^11.13.0",
|
|
46
46
|
"react": "^17.0.2",
|
|
47
47
|
"react-dom": "^17.0.2",
|
|
48
|
-
"react-magma-dom": "^4.10.0-next.
|
|
49
|
-
"react-magma-icons": "^3.
|
|
48
|
+
"react-magma-dom": "^4.10.0-next.3",
|
|
49
|
+
"react-magma-icons": "^3.2.0"
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|
|
52
52
|
"node": ">=14.15.0",
|
|
@@ -66,6 +66,7 @@ export interface CarbonChartProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
66
66
|
|
|
67
67
|
const CarbonChartWrapper = styled.div<{
|
|
68
68
|
isInverse?: boolean;
|
|
69
|
+
groupsLength: number;
|
|
69
70
|
theme: ThemeInterface;
|
|
70
71
|
}>`
|
|
71
72
|
.cds--data-table thead tr th {
|
|
@@ -289,6 +290,22 @@ const CarbonChartWrapper = styled.div<{
|
|
|
289
290
|
transition: 0.1s all linear;
|
|
290
291
|
stroke-width: 1.1em;
|
|
291
292
|
}
|
|
293
|
+
|
|
294
|
+
.cds--cc--tooltip {
|
|
295
|
+
${props => {
|
|
296
|
+
const chartColors =
|
|
297
|
+
(props.isInverse
|
|
298
|
+
? props.theme.chartColorsInverse
|
|
299
|
+
: props.theme.chartColors) || [];
|
|
300
|
+
|
|
301
|
+
return chartColors.reduce((result, color, index) => {
|
|
302
|
+
const indexNum = index + 1;
|
|
303
|
+
|
|
304
|
+
result += `.tooltip-${props.groupsLength}-1-${indexNum} { background-color: ${color}; }`;
|
|
305
|
+
|
|
306
|
+
return result;
|
|
307
|
+
}, '');
|
|
308
|
+
}}
|
|
292
309
|
|
|
293
310
|
.cds--overflow-menu-options__btn:focus {
|
|
294
311
|
outline-color: ${props =>
|
|
@@ -480,7 +497,6 @@ interface ColorsObject {
|
|
|
480
497
|
export const CarbonChart = React.forwardRef<HTMLDivElement, CarbonChartProps>(
|
|
481
498
|
(props, ref) => {
|
|
482
499
|
const {
|
|
483
|
-
children,
|
|
484
500
|
testId,
|
|
485
501
|
isInverse: isInverseProp,
|
|
486
502
|
type,
|
|
@@ -520,12 +536,15 @@ export const CarbonChart = React.forwardRef<HTMLDivElement, CarbonChartProps>(
|
|
|
520
536
|
const uniqueGroups = allGroups.filter(
|
|
521
537
|
(g, index) => allGroups.indexOf(g) === index
|
|
522
538
|
);
|
|
539
|
+
const customColors = ((options as any).colors as string[]) || [];
|
|
540
|
+
const allColors = [...customColors, ...theme.chartColors];
|
|
541
|
+
const allInverseColors = [...customColors, ...theme.chartColorsInverse];
|
|
523
542
|
|
|
524
543
|
uniqueGroups.forEach((group, i) => {
|
|
525
|
-
if (uniqueGroups.length <=
|
|
544
|
+
if (uniqueGroups.length <= allColors.length) {
|
|
526
545
|
return (scaleColorsObj[group || ('null' as any)] = isInverse
|
|
527
|
-
?
|
|
528
|
-
:
|
|
546
|
+
? allInverseColors[i]
|
|
547
|
+
: allColors[i]);
|
|
529
548
|
}
|
|
530
549
|
return {};
|
|
531
550
|
});
|
|
@@ -555,6 +574,8 @@ export const CarbonChart = React.forwardRef<HTMLDivElement, CarbonChartProps>(
|
|
|
555
574
|
});
|
|
556
575
|
});
|
|
557
576
|
|
|
577
|
+
const groupsLength = Object.keys(buildColors()).length;
|
|
578
|
+
|
|
558
579
|
return (
|
|
559
580
|
<CarbonChartWrapper
|
|
560
581
|
data-testid={testId}
|
|
@@ -562,6 +583,7 @@ export const CarbonChart = React.forwardRef<HTMLDivElement, CarbonChartProps>(
|
|
|
562
583
|
isInverse={isInverse}
|
|
563
584
|
theme={theme}
|
|
564
585
|
className="carbon-chart-wrapper"
|
|
586
|
+
groupsLength={groupsLength < 6 ? groupsLength : 14}
|
|
565
587
|
{...rest}
|
|
566
588
|
>
|
|
567
589
|
<ChartType data={dataSet} options={newOptions} />
|
|
@@ -629,3 +629,104 @@ AreaEmptyState.args = {
|
|
|
629
629
|
height: '400px',
|
|
630
630
|
},
|
|
631
631
|
};
|
|
632
|
+
|
|
633
|
+
export const AreaTimeSeriesWithCustomColors = Template.bind({});
|
|
634
|
+
AreaTimeSeriesWithCustomColors.args = {
|
|
635
|
+
isInverse: false,
|
|
636
|
+
type: CarbonChartType.area,
|
|
637
|
+
dataSet: [
|
|
638
|
+
{
|
|
639
|
+
group: 'Dataset 1',
|
|
640
|
+
date: '2019-01-01T05:00:00.000Z',
|
|
641
|
+
value: 0,
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
group: 'Dataset 1',
|
|
645
|
+
date: '2019-01-06T05:00:00.000Z',
|
|
646
|
+
value: 57312,
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
group: 'Dataset 1',
|
|
650
|
+
date: '2019-01-08T05:00:00.000Z',
|
|
651
|
+
value: 21432,
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
group: 'Dataset 1',
|
|
655
|
+
date: '2019-01-15T05:00:00.000Z',
|
|
656
|
+
value: 70323,
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
group: 'Dataset 1',
|
|
660
|
+
date: '2019-01-19T05:00:00.000Z',
|
|
661
|
+
value: 21300,
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
group: 'Dataset 2',
|
|
665
|
+
date: '2019-01-01T05:00:00.000Z',
|
|
666
|
+
value: 50000,
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
group: 'Dataset 2',
|
|
670
|
+
date: '2019-01-05T05:00:00.000Z',
|
|
671
|
+
value: 15000,
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
group: 'Dataset 2',
|
|
675
|
+
date: '2019-01-08T05:00:00.000Z',
|
|
676
|
+
value: 20000,
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
group: 'Dataset 2',
|
|
680
|
+
date: '2019-01-13T05:00:00.000Z',
|
|
681
|
+
value: 39213,
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
group: 'Dataset 2',
|
|
685
|
+
date: '2019-01-19T05:00:00.000Z',
|
|
686
|
+
value: 61213,
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
group: 'Dataset 3',
|
|
690
|
+
date: '2019-01-02T05:00:00.000Z',
|
|
691
|
+
value: 10,
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
group: 'Dataset 3',
|
|
695
|
+
date: '2019-01-06T05:00:00.000Z',
|
|
696
|
+
value: 37312,
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
group: 'Dataset 3',
|
|
700
|
+
date: '2019-01-08T05:00:00.000Z',
|
|
701
|
+
value: 51432,
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
group: 'Dataset 3',
|
|
705
|
+
date: '2019-01-13T05:00:00.000Z',
|
|
706
|
+
value: 40323,
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
group: 'Dataset 3',
|
|
710
|
+
date: '2019-01-19T05:00:00.000Z',
|
|
711
|
+
value: 31300,
|
|
712
|
+
},
|
|
713
|
+
],
|
|
714
|
+
|
|
715
|
+
options: {
|
|
716
|
+
title: 'Area (time series) with custom colors',
|
|
717
|
+
axes: {
|
|
718
|
+
bottom: {
|
|
719
|
+
title: '2019 Annual Sales Figures',
|
|
720
|
+
mapsTo: 'date',
|
|
721
|
+
scaleType: 'time',
|
|
722
|
+
},
|
|
723
|
+
left: {
|
|
724
|
+
mapsTo: 'value',
|
|
725
|
+
title: 'Conversion rate',
|
|
726
|
+
scaleType: 'linear',
|
|
727
|
+
},
|
|
728
|
+
},
|
|
729
|
+
height: '400px',
|
|
730
|
+
colors: ['red', 'green'],
|
|
731
|
+
},
|
|
732
|
+
};
|
|
@@ -150,125 +150,123 @@ HorizontalBoxplot.args = {
|
|
|
150
150
|
},
|
|
151
151
|
};
|
|
152
152
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
// },
|
|
274
|
-
// };
|
|
153
|
+
export const VerticalBoxplot = Template.bind({});
|
|
154
|
+
VerticalBoxplot.args = {
|
|
155
|
+
isInverse: false,
|
|
156
|
+
type: CarbonChartType.boxplot,
|
|
157
|
+
dataSet: [
|
|
158
|
+
{
|
|
159
|
+
group: 'Q1',
|
|
160
|
+
key: 'Monday',
|
|
161
|
+
value: 65000,
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
group: 'Q1',
|
|
165
|
+
key: 'Tuesday',
|
|
166
|
+
value: 29123,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
group: 'Q1',
|
|
170
|
+
key: 'Wednesday',
|
|
171
|
+
value: 35213,
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
group: 'Q1',
|
|
175
|
+
key: 'Thursday',
|
|
176
|
+
value: 51213,
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
group: 'Q1',
|
|
180
|
+
key: 'Friday',
|
|
181
|
+
value: 16932,
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
group: 'Q2',
|
|
185
|
+
key: 'Monday',
|
|
186
|
+
value: 32432,
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
group: 'Q2',
|
|
190
|
+
key: 'Tuesday',
|
|
191
|
+
value: 14312,
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
group: 'Q2',
|
|
195
|
+
key: 'Wednesday',
|
|
196
|
+
value: 66456,
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
group: 'Q2',
|
|
200
|
+
key: 'Thursday',
|
|
201
|
+
value: 21312,
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
group: 'Q2',
|
|
205
|
+
key: 'Friday',
|
|
206
|
+
value: 37234,
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
group: 'Q3',
|
|
210
|
+
key: 'Monday',
|
|
211
|
+
value: 5312,
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
group: 'Q3',
|
|
215
|
+
key: 'Tuesday',
|
|
216
|
+
value: 23232,
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
group: 'Q3',
|
|
220
|
+
key: 'Wednesday',
|
|
221
|
+
value: 34232,
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
group: 'Q3',
|
|
225
|
+
key: 'Thursday',
|
|
226
|
+
value: 12312,
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
group: 'Q3',
|
|
230
|
+
key: 'Friday',
|
|
231
|
+
value: 44234,
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
group: 'Q4',
|
|
235
|
+
key: 'Monday',
|
|
236
|
+
value: 32423,
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
group: 'Q4',
|
|
240
|
+
key: 'Tuesday',
|
|
241
|
+
value: 21313,
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
group: 'Q4',
|
|
245
|
+
key: 'Wednesday',
|
|
246
|
+
value: 64353,
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
group: 'Q4',
|
|
250
|
+
key: 'Thursday',
|
|
251
|
+
value: 24134,
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
group: 'Q4',
|
|
255
|
+
key: 'Friday',
|
|
256
|
+
value: 45134,
|
|
257
|
+
},
|
|
258
|
+
],
|
|
259
|
+
options: {
|
|
260
|
+
title: 'Vertical box plot',
|
|
261
|
+
axes: {
|
|
262
|
+
left: {
|
|
263
|
+
mapsTo: 'value',
|
|
264
|
+
},
|
|
265
|
+
bottom: {
|
|
266
|
+
scaleType: 'labels',
|
|
267
|
+
mapsTo: 'group',
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
height: '400px',
|
|
271
|
+
},
|
|
272
|
+
};
|