@cdc/chart 4.24.9 → 4.24.11
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/LICENSE +201 -0
- package/dist/cdcchart.js +45911 -41739
- package/examples/feature/boxplot/boxplot-data.json +88 -22
- package/examples/feature/boxplot/boxplot.json +540 -16
- package/examples/feature/boxplot/testing.csv +7 -7
- package/examples/feature/sankey/sankey-example-data.json +0 -1
- package/examples/private/test.json +20092 -0
- package/index.html +4 -4
- package/package.json +2 -2
- package/src/CdcChart.tsx +209 -188
- package/src/_stories/Chart.CustomColors.stories.tsx +19 -0
- package/src/_stories/Chart.DynamicSeries.stories.tsx +27 -0
- package/src/_stories/Chart.Legend.Gradient.stories.tsx +74 -0
- package/src/_stories/Chart.stories.tsx +30 -3
- package/src/_stories/ChartAxisLabels.stories.tsx +20 -0
- package/src/_stories/ChartAxisTitles.stories.tsx +53 -0
- package/src/_stories/ChartEditor.stories.tsx +27 -0
- package/src/_stories/ChartLine.Suppression.stories.tsx +25 -0
- package/src/_stories/ChartPrefixSuffix.stories.tsx +159 -0
- package/src/_stories/_mock/boxplot_multiseries.json +647 -0
- package/src/_stories/_mock/dynamic_series_bar_config.json +723 -0
- package/src/_stories/_mock/dynamic_series_config.json +979 -0
- package/src/_stories/_mock/horizontal_bar.json +257 -0
- package/src/_stories/_mock/large_x_axis_labels.json +261 -0
- package/src/_stories/_mock/paired-bar.json +262 -0
- package/src/_stories/_mock/pie_with_data.json +255 -0
- package/{examples/feature/scatterplot/scatterplot.json → src/_stories/_mock/scatterplot_mock.json} +62 -92
- package/src/_stories/_mock/simplified_line.json +1510 -0
- package/src/_stories/_mock/suppression_mock.json +1549 -0
- package/src/components/Annotations/components/AnnotationDraggable.tsx +0 -3
- package/src/components/Annotations/components/AnnotationDropdown.tsx +1 -1
- package/src/components/Axis/Categorical.Axis.tsx +22 -4
- package/src/components/BarChart/components/BarChart.Horizontal.tsx +95 -16
- package/src/components/BarChart/components/BarChart.StackedHorizontal.tsx +41 -17
- package/src/components/BarChart/components/BarChart.StackedVertical.tsx +43 -9
- package/src/components/BarChart/components/BarChart.Vertical.tsx +123 -47
- package/src/components/BarChart/helpers/index.ts +23 -5
- package/src/components/BoxPlot/BoxPlot.tsx +189 -0
- package/src/components/BrushChart.tsx +3 -2
- package/src/components/DeviationBar.jsx +58 -8
- package/src/components/EditorPanel/EditorPanel.tsx +127 -102
- package/src/components/EditorPanel/components/Panels/Panel.Annotate.tsx +11 -28
- package/src/components/EditorPanel/components/Panels/Panel.BoxPlot.tsx +51 -6
- package/src/components/EditorPanel/components/Panels/Panel.General.tsx +21 -4
- package/src/components/EditorPanel/components/Panels/Panel.Regions.tsx +40 -9
- package/src/components/EditorPanel/components/Panels/Panel.Sankey.tsx +3 -3
- package/src/components/EditorPanel/components/Panels/Panel.Series.tsx +121 -56
- package/src/components/EditorPanel/components/Panels/Panel.Visual.tsx +296 -35
- package/src/components/EditorPanel/components/panels.scss +4 -6
- package/src/components/EditorPanel/editor-panel.scss +0 -8
- package/src/components/EditorPanel/helpers/tests/updateFieldRankByValue.test.ts +38 -0
- package/src/components/EditorPanel/helpers/updateFieldRankByValue.ts +42 -0
- package/src/components/EditorPanel/useEditorPermissions.ts +16 -1
- package/src/components/ForestPlot/ForestPlot.tsx +2 -3
- package/src/components/ForestPlot/ForestPlotProps.ts +2 -0
- package/src/components/Legend/Legend.Component.tsx +23 -24
- package/src/components/Legend/Legend.Suppression.tsx +25 -20
- package/src/components/Legend/Legend.tsx +16 -18
- package/src/components/Legend/helpers/index.ts +16 -19
- package/src/components/LegendWrapper.tsx +3 -1
- package/src/components/LineChart/components/LineChart.Circle.tsx +10 -0
- package/src/components/LineChart/helpers.ts +48 -43
- package/src/components/LineChart/index.tsx +88 -82
- package/src/components/LinearChart.tsx +747 -562
- package/src/components/PairedBarChart.jsx +50 -10
- package/src/components/PieChart/PieChart.tsx +1 -6
- package/src/components/Regions/components/Regions.tsx +33 -19
- package/src/components/Sankey/index.tsx +50 -32
- package/src/components/Sankey/sankey.scss +6 -5
- package/src/components/Sankey/useSankeyAlert.tsx +60 -0
- package/src/components/ScatterPlot/ScatterPlot.jsx +20 -4
- package/src/components/ZoomBrush.tsx +25 -6
- package/src/coreStyles_chart.scss +3 -0
- package/src/data/initial-state.js +8 -10
- package/src/helpers/configHelpers.ts +28 -0
- package/src/helpers/handleRankByValue.ts +15 -0
- package/src/helpers/sizeHelpers.ts +25 -0
- package/src/helpers/tests/handleRankByValue.test.ts +37 -0
- package/src/helpers/tests/sizeHelpers.test.ts +80 -0
- package/src/hooks/useColorPalette.js +10 -2
- package/src/hooks/useLegendClasses.ts +13 -22
- package/src/hooks/useMinMax.ts +27 -13
- package/src/hooks/useReduceData.ts +43 -10
- package/src/hooks/useScales.ts +87 -38
- package/src/hooks/useTooltip.tsx +62 -53
- package/src/index.jsx +1 -0
- package/src/scss/DataTable.scss +5 -4
- package/src/scss/main.scss +57 -70
- package/src/types/ChartConfig.ts +43 -34
- package/src/types/ChartContext.ts +22 -15
- package/src/types/ForestPlot.ts +8 -0
- package/src/_stories/Chart.Legend.Gradient.tsx +0 -19
- package/src/_stories/ChartBrush.stories.tsx +0 -19
- package/src/components/BoxPlot/BoxPlot.jsx +0 -111
- package/src/components/LinearChart.jsx +0 -817
|
@@ -1,90 +1,156 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
3
|
"Group_Category": "category one",
|
|
4
|
-
"Value": "21"
|
|
4
|
+
"Value": "21",
|
|
5
|
+
"Price": "100",
|
|
6
|
+
"Month": "January",
|
|
7
|
+
"Radius": "10"
|
|
5
8
|
},
|
|
6
9
|
{
|
|
7
10
|
"Group_Category": "category one",
|
|
8
|
-
"Value": "19"
|
|
11
|
+
"Value": "19",
|
|
12
|
+
"Price": "105",
|
|
13
|
+
"Month": "January",
|
|
14
|
+
"Radius": "12"
|
|
9
15
|
},
|
|
10
16
|
{
|
|
11
17
|
"Group_Category": "category one",
|
|
12
|
-
"Value": "23"
|
|
18
|
+
"Value": "23",
|
|
19
|
+
"Price": "110",
|
|
20
|
+
"Month": "February",
|
|
21
|
+
"Radius": "7"
|
|
13
22
|
},
|
|
14
23
|
{
|
|
15
24
|
"Group_Category": "category one",
|
|
16
|
-
"Value": "24"
|
|
25
|
+
"Value": "24",
|
|
26
|
+
"Price": "115",
|
|
27
|
+
"Month": "February",
|
|
28
|
+
"Radius": "5"
|
|
17
29
|
},
|
|
18
30
|
{
|
|
19
31
|
"Group_Category": "category two",
|
|
20
|
-
"Value": "18"
|
|
32
|
+
"Value": "18",
|
|
33
|
+
"Price": "120",
|
|
34
|
+
"Month": "March",
|
|
35
|
+
"Radius": "9"
|
|
21
36
|
},
|
|
22
37
|
{
|
|
23
38
|
"Group_Category": "category two",
|
|
24
|
-
"Value": "10"
|
|
39
|
+
"Value": "10",
|
|
40
|
+
"Price": "125",
|
|
41
|
+
"Month": "March",
|
|
42
|
+
"Radius": "14"
|
|
25
43
|
},
|
|
26
44
|
{
|
|
27
45
|
"Group_Category": "category two",
|
|
28
|
-
"Value": "12"
|
|
46
|
+
"Value": "12",
|
|
47
|
+
"Price": "130",
|
|
48
|
+
"Month": "April",
|
|
49
|
+
"Radius": "11"
|
|
29
50
|
},
|
|
30
51
|
{
|
|
31
52
|
"Group_Category": "category two",
|
|
32
|
-
"Value": "19"
|
|
53
|
+
"Value": "19",
|
|
54
|
+
"Price": "135",
|
|
55
|
+
"Month": "April",
|
|
56
|
+
"Radius": "6"
|
|
33
57
|
},
|
|
34
58
|
{
|
|
35
59
|
"Group_Category": "category three",
|
|
36
|
-
"Value": "30"
|
|
60
|
+
"Value": "30",
|
|
61
|
+
"Price": "140",
|
|
62
|
+
"Month": "May",
|
|
63
|
+
"Radius": "8"
|
|
37
64
|
},
|
|
38
65
|
{
|
|
39
66
|
"Group_Category": "category three",
|
|
40
|
-
"Value": "35"
|
|
67
|
+
"Value": "35",
|
|
68
|
+
"Price": "145",
|
|
69
|
+
"Month": "May",
|
|
70
|
+
"Radius": "10"
|
|
41
71
|
},
|
|
42
72
|
{
|
|
43
73
|
"Group_Category": "category three",
|
|
44
|
-
"Value": "36"
|
|
74
|
+
"Value": "36",
|
|
75
|
+
"Price": "150",
|
|
76
|
+
"Month": "June",
|
|
77
|
+
"Radius": "12"
|
|
45
78
|
},
|
|
46
79
|
{
|
|
47
80
|
"Group_Category": "category three",
|
|
48
|
-
"Value": "46"
|
|
81
|
+
"Value": "46",
|
|
82
|
+
"Price": "155",
|
|
83
|
+
"Month": "June",
|
|
84
|
+
"Radius": "13"
|
|
49
85
|
},
|
|
50
86
|
{
|
|
51
87
|
"Group_Category": "category four",
|
|
52
|
-
"Value": "30"
|
|
88
|
+
"Value": "30",
|
|
89
|
+
"Price": "160",
|
|
90
|
+
"Month": "July",
|
|
91
|
+
"Radius": "5"
|
|
53
92
|
},
|
|
54
93
|
{
|
|
55
94
|
"Group_Category": "category four",
|
|
56
|
-
"Value": "40"
|
|
95
|
+
"Value": "40",
|
|
96
|
+
"Price": "165",
|
|
97
|
+
"Month": "July",
|
|
98
|
+
"Radius": "9"
|
|
57
99
|
},
|
|
58
100
|
{
|
|
59
101
|
"Group_Category": "category four",
|
|
60
|
-
"Value": "50"
|
|
102
|
+
"Value": "50",
|
|
103
|
+
"Price": "170",
|
|
104
|
+
"Month": "August",
|
|
105
|
+
"Radius": "14"
|
|
61
106
|
},
|
|
62
107
|
{
|
|
63
108
|
"Group_Category": "category four",
|
|
64
|
-
"Value": "50"
|
|
109
|
+
"Value": "50",
|
|
110
|
+
"Price": "175",
|
|
111
|
+
"Month": "August",
|
|
112
|
+
"Radius": "15"
|
|
65
113
|
},
|
|
66
114
|
{
|
|
67
115
|
"Group_Category": "category four",
|
|
68
|
-
"Value": "85"
|
|
116
|
+
"Value": "85",
|
|
117
|
+
"Price": "180",
|
|
118
|
+
"Month": "September",
|
|
119
|
+
"Radius": "7"
|
|
69
120
|
},
|
|
70
121
|
{
|
|
71
122
|
"Group_Category": "category four",
|
|
72
|
-
"Value": "82"
|
|
123
|
+
"Value": "82",
|
|
124
|
+
"Price": "185",
|
|
125
|
+
"Month": "September",
|
|
126
|
+
"Radius": "8"
|
|
73
127
|
},
|
|
74
128
|
{
|
|
75
129
|
"Group_Category": "category four",
|
|
76
|
-
"Value": "43"
|
|
130
|
+
"Value": "43",
|
|
131
|
+
"Price": "190",
|
|
132
|
+
"Month": "October",
|
|
133
|
+
"Radius": "10"
|
|
77
134
|
},
|
|
78
135
|
{
|
|
79
136
|
"Group_Category": "category four",
|
|
80
|
-
"Value": "42"
|
|
137
|
+
"Value": "42",
|
|
138
|
+
"Price": "195",
|
|
139
|
+
"Month": "October",
|
|
140
|
+
"Radius": "12"
|
|
81
141
|
},
|
|
82
142
|
{
|
|
83
143
|
"Group_Category": "category four",
|
|
84
|
-
"Value": "41"
|
|
144
|
+
"Value": "41",
|
|
145
|
+
"Price": "200",
|
|
146
|
+
"Month": "November",
|
|
147
|
+
"Radius": "11"
|
|
85
148
|
},
|
|
86
149
|
{
|
|
87
150
|
"Group_Category": "category four",
|
|
88
|
-
"Value": "21"
|
|
151
|
+
"Value": "21",
|
|
152
|
+
"Price": "205",
|
|
153
|
+
"Month": "November",
|
|
154
|
+
"Radius": "9"
|
|
89
155
|
}
|
|
90
156
|
]
|