@cdc/chart 4.24.2 → 4.24.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/cdcchart.js +47386 -36618
- package/examples/chart-regression-1.json +378 -0
- package/examples/chart-regression-2.json +2360 -0
- package/examples/feature/filters/url-filter.json +1076 -0
- package/examples/feature/line/line-chart.json +2 -1
- package/examples/feature/regions/index.json +50 -4
- package/examples/feature/sankey/sankey-example-data.json +1364 -0
- package/examples/feature/sankey/sankey_chart_data.csv +20 -0
- package/examples/gallery/bar-chart-vertical/vertical-bar-chart-stacked.json +306 -19
- package/examples/sparkline.json +868 -0
- package/index.html +128 -123
- package/package.json +4 -2
- package/src/CdcChart.tsx +40 -22
- package/src/_stories/ChartEditor.stories.tsx +14 -3
- package/src/_stories/_mock/url_filter.json +1076 -0
- package/src/components/AreaChart/components/AreaChart.Stacked.jsx +2 -1
- package/src/components/AreaChart/components/AreaChart.jsx +2 -1
- package/src/components/BarChart/components/BarChart.Horizontal.tsx +39 -49
- package/src/components/BarChart/components/BarChart.StackedHorizontal.tsx +36 -56
- package/src/components/BarChart/components/BarChart.StackedVertical.tsx +32 -39
- package/src/components/BarChart/components/BarChart.Vertical.tsx +40 -55
- package/src/components/BoxPlot/BoxPlot.jsx +2 -1
- package/src/components/DeviationBar.jsx +3 -3
- package/src/components/EditorPanel/EditorPanel.tsx +167 -15
- package/src/components/EditorPanel/components/Panels/Panel.Regions.tsx +1 -1
- package/src/components/EditorPanel/components/Panels/Panel.Sankey.tsx +108 -0
- package/src/components/EditorPanel/components/Panels/Panel.Series.tsx +48 -4
- package/src/components/EditorPanel/components/Panels/Panel.Visual.tsx +41 -0
- package/src/components/EditorPanel/components/Panels/index.tsx +9 -7
- package/src/components/EditorPanel/components/panels.scss +11 -0
- package/src/components/EditorPanel/useEditorPermissions.js +40 -14
- package/src/components/Legend/Legend.Component.tsx +23 -15
- package/src/components/Legend/Legend.tsx +4 -4
- package/src/components/LineChart/LineChartProps.ts +1 -0
- package/src/components/LineChart/helpers.ts +2 -2
- package/src/components/LineChart/index.tsx +7 -7
- package/src/components/LinearChart.jsx +9 -30
- package/src/components/PairedBarChart.jsx +6 -10
- package/src/components/PieChart/PieChart.tsx +3 -3
- package/src/components/Regions/components/Regions.tsx +120 -78
- package/src/components/Sankey/index.tsx +434 -0
- package/src/components/Sankey/sankey.scss +153 -0
- package/src/components/Sankey/types/index.ts +16 -0
- package/src/components/ScatterPlot/ScatterPlot.jsx +1 -0
- package/src/components/Sparkline/{SparkLine.jsx → components/SparkLine.tsx} +14 -30
- package/src/components/Sparkline/index.scss +3 -0
- package/src/components/Sparkline/index.tsx +1 -1
- package/src/components/ZoomBrush.tsx +2 -1
- package/src/data/initial-state.js +46 -2
- package/src/helpers/computeMarginBottom.ts +2 -1
- package/src/helpers/tests/computeMarginBottom.test.ts +2 -1
- package/src/hooks/useBarChart.js +5 -2
- package/src/hooks/useScales.ts +15 -18
- package/src/hooks/useTooltip.tsx +9 -8
- package/src/scss/main.scss +8 -29
- package/src/types/ChartConfig.ts +32 -14
- package/src/types/ChartContext.ts +7 -0
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"rightAxisTickColor": "#333",
|
|
53
53
|
"numTicks": "9",
|
|
54
54
|
"axisPadding": 0,
|
|
55
|
+
"scalePadding": 10,
|
|
55
56
|
"tickRotation": 0,
|
|
56
57
|
"anchors": [],
|
|
57
58
|
"label": "Y-Axis Example Label"
|
|
@@ -98,7 +99,7 @@
|
|
|
98
99
|
"horizontal": 750
|
|
99
100
|
},
|
|
100
101
|
"xAxis": {
|
|
101
|
-
"sortDates":
|
|
102
|
+
"sortDates": false,
|
|
102
103
|
"anchors": [],
|
|
103
104
|
"type": "date",
|
|
104
105
|
"showTargetLabel": true,
|
|
@@ -135,6 +136,7 @@
|
|
|
135
136
|
"indexLabel": "Data Group",
|
|
136
137
|
"download": true,
|
|
137
138
|
"showVertical": false,
|
|
139
|
+
"dateDisplayFormat": "",
|
|
138
140
|
"show": true
|
|
139
141
|
},
|
|
140
142
|
"orientation": "vertical",
|
|
@@ -155,6 +157,7 @@
|
|
|
155
157
|
"lineMode": false,
|
|
156
158
|
"verticalSorted": false,
|
|
157
159
|
"highlightOnHover": false,
|
|
160
|
+
"seriesHighlight": [],
|
|
158
161
|
"position": "right",
|
|
159
162
|
"label": "Type of Data"
|
|
160
163
|
},
|
|
@@ -279,7 +282,8 @@
|
|
|
279
282
|
],
|
|
280
283
|
"tooltips": {
|
|
281
284
|
"opacity": 90,
|
|
282
|
-
"singleSeries": false
|
|
285
|
+
"singleSeries": false,
|
|
286
|
+
"dateDisplayFormat": ""
|
|
283
287
|
},
|
|
284
288
|
"forestPlot": {
|
|
285
289
|
"startAt": 0,
|
|
@@ -332,6 +336,48 @@
|
|
|
332
336
|
"area": {
|
|
333
337
|
"isStacked": false
|
|
334
338
|
},
|
|
339
|
+
"sankey": {
|
|
340
|
+
"title": {
|
|
341
|
+
"defaultColor": "black"
|
|
342
|
+
},
|
|
343
|
+
"iterations": 1,
|
|
344
|
+
"rxValue": 0.9,
|
|
345
|
+
"overallSize": {
|
|
346
|
+
"width": 900,
|
|
347
|
+
"height": 700
|
|
348
|
+
},
|
|
349
|
+
"margin": {
|
|
350
|
+
"margin_y": 25,
|
|
351
|
+
"margin_x": 0
|
|
352
|
+
},
|
|
353
|
+
"nodeSize": {
|
|
354
|
+
"nodeWidth": 26,
|
|
355
|
+
"nodeHeight": 40
|
|
356
|
+
},
|
|
357
|
+
"nodePadding": 55,
|
|
358
|
+
"nodeFontColor": "black",
|
|
359
|
+
"nodeColor": {
|
|
360
|
+
"default": "#ff8500",
|
|
361
|
+
"inactive": "#808080"
|
|
362
|
+
},
|
|
363
|
+
"linkColor": {
|
|
364
|
+
"default": "#ffc900",
|
|
365
|
+
"inactive": "#D3D3D3"
|
|
366
|
+
},
|
|
367
|
+
"opacity": {
|
|
368
|
+
"nodeOpacityDefault": 1,
|
|
369
|
+
"nodeOpacityInactive": 0.1,
|
|
370
|
+
"LinkOpacityDefault": 1,
|
|
371
|
+
"LinkOpacityInactive": 0.1
|
|
372
|
+
},
|
|
373
|
+
"storyNodeFontColor": "#006778",
|
|
374
|
+
"storyNodeText": [],
|
|
375
|
+
"nodeValueStyle": {
|
|
376
|
+
"textBefore": "(",
|
|
377
|
+
"textAfter": ")"
|
|
378
|
+
},
|
|
379
|
+
"data": []
|
|
380
|
+
},
|
|
335
381
|
"showChartBrush": false,
|
|
336
382
|
"height": "375",
|
|
337
383
|
"data": [
|
|
@@ -398,10 +444,10 @@
|
|
|
398
444
|
"label": "Region Applied to Timeline",
|
|
399
445
|
"color": "Black",
|
|
400
446
|
"background": "Grey",
|
|
401
|
-
"fromType": "
|
|
447
|
+
"fromType": "Fixed"
|
|
402
448
|
}
|
|
403
449
|
],
|
|
404
|
-
"validated": 4.
|
|
450
|
+
"validated": "4.24.3",
|
|
405
451
|
"formattedData": [
|
|
406
452
|
{
|
|
407
453
|
"Date": "1/15/2016",
|