@cdc/chart 4.22.11 → 4.23.2
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 +54569 -16
- package/examples/Barchart_with_negative.json +34 -0
- package/examples/box-plot-data.json +71 -0
- package/examples/box-plot.csv +5 -0
- package/examples/box-plot.json +124 -0
- package/examples/dynamic-legends.json +1 -1
- package/examples/example-bar-chart-nonnumeric.json +36 -0
- package/examples/example-bar-chart.json +33 -0
- package/examples/example-combo-bar-nonnumeric.json +105 -0
- package/examples/gallery/bar-chart-vertical/combo-line-chart.json +3 -1
- package/examples/gallery/bar-chart-vertical/vertical-bar-chart-categorical.json +1 -1
- package/examples/gallery/bar-chart-vertical/vertical-bar-chart.json +86 -17
- package/examples/gallery/paired-bar/paired-bar-chart.json +65 -13
- package/examples/line-chart-nonnumeric.json +32 -0
- package/examples/line-chart.json +21 -63
- package/examples/new-data.csv +17 -0
- package/examples/newdata.json +90 -0
- package/examples/planet-combo-example-config.json +143 -20
- package/examples/planet-example-data-nonnumeric.json +56 -0
- package/examples/planet-example-data.json +2 -2
- package/examples/planet-pie-example-config-nonnumeric.json +30 -0
- package/examples/scatterplot-continuous.csv +17 -0
- package/examples/{private/yaxis-test.json → scatterplot.json} +53 -50
- package/examples/sparkline-chart-nonnumeric.json +76 -0
- package/examples/stacked-vertical-bar-example-negative.json +154 -0
- package/examples/stacked-vertical-bar-example-nonnumerics.json +154 -0
- package/{src/index.html → index.html} +18 -11
- package/package.json +29 -22
- package/src/{CdcChart.tsx → CdcChart.jsx} +193 -119
- package/src/components/BarChart.jsx +517 -0
- package/src/components/BoxPlot.jsx +88 -0
- package/src/components/{DataTable.tsx → DataTable.jsx} +125 -32
- package/src/components/{EditorPanel.js → EditorPanel.jsx} +376 -115
- package/src/components/Filters.jsx +125 -0
- package/src/components/Legend.jsx +303 -0
- package/src/components/{LineChart.tsx → LineChart.jsx} +87 -22
- package/src/components/{LinearChart.tsx → LinearChart.jsx} +172 -113
- package/src/components/{PairedBarChart.tsx → PairedBarChart.jsx} +46 -79
- package/src/components/{PieChart.tsx → PieChart.jsx} +29 -34
- package/src/components/ScatterPlot.jsx +48 -0
- package/src/components/{SparkLine.js → SparkLine.jsx} +49 -18
- package/src/components/useIntersectionObserver.jsx +29 -0
- package/src/data/initial-state.js +44 -8
- package/src/hooks/{useColorPalette.ts → useColorPalette.js} +10 -28
- package/src/hooks/{useReduceData.ts → useReduceData.js} +27 -13
- package/src/hooks/useRightAxis.js +3 -1
- package/src/index.jsx +16 -0
- package/src/scss/DataTable.scss +23 -1
- package/src/scss/main.scss +83 -32
- package/vite.config.js +4 -0
- package/examples/private/filters.json +0 -170
- package/examples/private/line-test-data.json +0 -22
- package/examples/private/line-test-two.json +0 -210
- package/examples/private/line-test.json +0 -102
- package/examples/private/new.json +0 -48800
- package/examples/private/newtest.csv +0 -101
- package/examples/private/shawn.json +0 -1106
- package/examples/private/test.json +0 -10124
- package/examples/private/yaxis-testing.csv +0 -27
- package/examples/private/yaxis.json +0 -28
- package/src/components/BarChart.tsx +0 -579
- package/src/components/Legend.js +0 -284
- package/src/components/useIntersectionObserver.tsx +0 -27
- package/src/index.tsx +0 -18
- /package/src/{context.tsx → ConfigContext.jsx} +0 -0
|
@@ -31,20 +31,54 @@ export default {
|
|
|
31
31
|
tickColor: '#333',
|
|
32
32
|
rightHideAxis: true,
|
|
33
33
|
rightAxisSize: 50,
|
|
34
|
+
rightLabel: '',
|
|
34
35
|
rightLabelOffsetSize: 0,
|
|
35
36
|
rightAxisLabelColor: '#333',
|
|
36
37
|
rightAxisTickLabelColor: '#333',
|
|
37
38
|
rightAxisTickColor: '#333',
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
numTicks: '',
|
|
40
|
+
axisPadding: 0,
|
|
41
|
+
tickRotation: 0
|
|
42
|
+
},
|
|
43
|
+
boxplot: {
|
|
44
|
+
plots: [],
|
|
45
|
+
borders: 'true',
|
|
46
|
+
firstQuartilePercentage: 25,
|
|
47
|
+
thirdQuartilePercentage: 75,
|
|
48
|
+
boxWidthPercentage: 40,
|
|
49
|
+
plotOutlierValues: false,
|
|
50
|
+
plotNonOutlierValues: true,
|
|
51
|
+
legend: {
|
|
52
|
+
showHowToReadText: false,
|
|
53
|
+
howToReadText: ''
|
|
54
|
+
},
|
|
55
|
+
labels: {
|
|
56
|
+
q1: 'Lower Quartile',
|
|
57
|
+
q2: 'q2',
|
|
58
|
+
q3: 'Upper Quartile',
|
|
59
|
+
q4: 'q4',
|
|
60
|
+
minimum: 'Minimum',
|
|
61
|
+
maximum: 'Maximum',
|
|
62
|
+
mean: 'Mean',
|
|
63
|
+
median: 'Median',
|
|
64
|
+
sd: 'Standard Deviation',
|
|
65
|
+
iqr: 'Interquartile Range',
|
|
66
|
+
count: 'Count',
|
|
67
|
+
outliers: 'Outliers',
|
|
68
|
+
values: 'Values'
|
|
69
|
+
}
|
|
41
70
|
},
|
|
42
71
|
topAxis: {
|
|
43
72
|
hasLine: false
|
|
44
73
|
},
|
|
74
|
+
isLegendValue: false,
|
|
45
75
|
barThickness: 0.35,
|
|
46
76
|
barHeight: 25,
|
|
47
|
-
|
|
77
|
+
barSpace: 15,
|
|
78
|
+
heights: {
|
|
79
|
+
vertical: 300,
|
|
80
|
+
horizontal: 750
|
|
81
|
+
},
|
|
48
82
|
xAxis: {
|
|
49
83
|
type: 'categorical',
|
|
50
84
|
hideAxis: false,
|
|
@@ -57,15 +91,17 @@ export default {
|
|
|
57
91
|
labelColor: '#333',
|
|
58
92
|
tickLabelColor: '#333',
|
|
59
93
|
tickColor: '#333',
|
|
60
|
-
|
|
61
|
-
|
|
94
|
+
numTicks: '',
|
|
95
|
+
labelOffset: 65,
|
|
96
|
+
axisPadding: 0
|
|
62
97
|
},
|
|
63
98
|
table: {
|
|
64
99
|
label: 'Data Table',
|
|
65
100
|
expanded: true,
|
|
66
101
|
limitHeight: false,
|
|
67
102
|
height: '',
|
|
68
|
-
caption: ''
|
|
103
|
+
caption: '',
|
|
104
|
+
showDownloadUrl: false
|
|
69
105
|
},
|
|
70
106
|
orientation: 'vertical',
|
|
71
107
|
legend: {
|
|
@@ -88,7 +124,7 @@ export default {
|
|
|
88
124
|
palette: 'qualitative-bold',
|
|
89
125
|
isPaletteReversed: false,
|
|
90
126
|
labels: false,
|
|
91
|
-
dataFormat: { commas: false, prefix: '', suffix: '' },
|
|
127
|
+
dataFormat: { commas: false, prefix: '', suffix: '', abbreviated: false },
|
|
92
128
|
confidenceKeys: {},
|
|
93
129
|
visual: {
|
|
94
130
|
border: true,
|
|
@@ -5,59 +5,41 @@ const SEQUENTIAL = 'SEQUENTIAL'
|
|
|
5
5
|
const SEQUENTIAL_REVERSE = 'SEQUENTIAL_REVERSE'
|
|
6
6
|
export const GET_PALETTE = 'GET_PALETTE'
|
|
7
7
|
|
|
8
|
-
// types & interfaces
|
|
9
|
-
interface State {
|
|
10
|
-
readonly filteredPallets: string[]
|
|
11
|
-
readonly filteredQualitative: string[]
|
|
12
|
-
readonly isPaletteReversed: boolean
|
|
13
|
-
paletteName: string | undefined
|
|
14
|
-
}
|
|
15
|
-
interface Action<Palettes> {
|
|
16
|
-
type: 'SEQUENTIAL' | 'SEQUENTIAL_REVERSE' | 'GET_PALETTE'
|
|
17
|
-
payload: Palettes
|
|
18
|
-
paletteName?: string
|
|
19
|
-
}
|
|
20
|
-
|
|
21
8
|
// create initial state
|
|
22
|
-
const initialState
|
|
9
|
+
const initialState = {
|
|
23
10
|
filteredPallets: [],
|
|
24
11
|
isPaletteReversed: false,
|
|
25
12
|
filteredQualitative: [],
|
|
26
13
|
paletteName: undefined
|
|
27
14
|
}
|
|
28
15
|
|
|
29
|
-
function reducer
|
|
30
|
-
//
|
|
31
|
-
|
|
32
|
-
let paletteName: string = ''
|
|
16
|
+
function reducer(state, action) {
|
|
17
|
+
const palletNamesArr = Object.keys(action.payload) // action.payload === colorPalettes object
|
|
18
|
+
let paletteName = ''
|
|
33
19
|
switch (action.type) {
|
|
34
20
|
case GET_PALETTE:
|
|
35
21
|
return { ...state, paletteName: action.paletteName }
|
|
36
22
|
case SEQUENTIAL:
|
|
37
23
|
paletteName = state.paletteName && state.paletteName.endsWith('reverse') ? String(state.paletteName).substring(0, state.paletteName.length - 7) : String(state.paletteName)
|
|
38
|
-
const qualitative = palletNamesArr.filter((name
|
|
39
|
-
const sequential = palletNamesArr.filter((name
|
|
24
|
+
const qualitative = palletNamesArr.filter((name) => String(name).startsWith('qualitative') && !String(name).endsWith('reverse'))
|
|
25
|
+
const sequential = palletNamesArr.filter((name) => String(name).startsWith('sequential') && !String(name).endsWith('reverse'))
|
|
40
26
|
return { ...state, filteredPallets: sequential, filteredQualitative: qualitative, paletteName: paletteName, isPaletteReversed: false }
|
|
41
27
|
|
|
42
28
|
case SEQUENTIAL_REVERSE:
|
|
43
|
-
paletteName = palletNamesArr.find((name
|
|
44
|
-
const qualitativeReverse
|
|
45
|
-
const sequentialReverse
|
|
29
|
+
paletteName = palletNamesArr.find((name) => name === String(state.paletteName).concat('reverse') || name === String(state.paletteName).concat('-reverse'))
|
|
30
|
+
const qualitativeReverse = palletNamesArr.filter((name) => String(name).startsWith('qualitative') && String(name).endsWith('reverse'))
|
|
31
|
+
const sequentialReverse = palletNamesArr.filter((name) => String(name).startsWith('sequential') && String(name).endsWith('reverse'))
|
|
46
32
|
return { ...state, filteredQualitative: qualitativeReverse, filteredPallets: sequentialReverse, paletteName: paletteName, isPaletteReversed: true }
|
|
47
33
|
default:
|
|
48
34
|
return state
|
|
49
35
|
}
|
|
50
36
|
}
|
|
51
37
|
|
|
52
|
-
interface Keyable {
|
|
53
|
-
palette: string
|
|
54
|
-
isPaletteReversed: boolean
|
|
55
|
-
}
|
|
56
38
|
function init(initialState) {
|
|
57
39
|
return initialState
|
|
58
40
|
}
|
|
59
41
|
|
|
60
|
-
export function useColorPalette
|
|
42
|
+
export function useColorPalette(colorPalettes, configState) {
|
|
61
43
|
const [state, dispatch] = useReducer(reducer, initialState, init)
|
|
62
44
|
const { paletteName, isPaletteReversed, filteredPallets, filteredQualitative } = state
|
|
63
45
|
|
|
@@ -1,10 +1,24 @@
|
|
|
1
|
+
import isNumber from '@cdc/core/helpers/isNumber'
|
|
2
|
+
|
|
1
3
|
function useReduceData(config, data) {
|
|
2
|
-
// for combo charts check all Data Series
|
|
4
|
+
// for combo charts check if all Data Series selected to Bar;
|
|
3
5
|
const isBar = config?.series?.every(element => element?.type === 'Bar')
|
|
4
|
-
|
|
6
|
+
// for combo charts check if all Data series selected Line or dashed-md/sm/lg.
|
|
7
|
+
const isAllLine = config?.series?.every(el => el.type === 'Line' || el.type === 'dashed-sm' || el.type === 'dashed-md' || el.type === 'dashed-lg')
|
|
8
|
+
const cleanChars = value => {
|
|
9
|
+
// remove comma and $ signs
|
|
10
|
+
let tmp
|
|
11
|
+
if (typeof value === 'string') {
|
|
12
|
+
tmp = value !== null && value !== '' ? value.replace(/[,\$]/g, '') : ''
|
|
13
|
+
} else {
|
|
14
|
+
tmp = value !== null && value !== '' ? value : ''
|
|
15
|
+
}
|
|
16
|
+
return tmp
|
|
17
|
+
}
|
|
5
18
|
const getMaxValueFromData = () => {
|
|
6
19
|
let max // will hold max number from data.
|
|
7
20
|
if ((config.visualizationType === 'Bar' || (config.visualizationType === 'Combo' && isBar)) && config.visualizationSubType === 'stacked') {
|
|
21
|
+
|
|
8
22
|
const yTotals = data.reduce((allTotals, xValue) => {
|
|
9
23
|
const totalYValues = config.runtime.seriesKeys.reduce((yTotal, k) => {
|
|
10
24
|
yTotal += Number(xValue[k])
|
|
@@ -16,11 +30,12 @@ function useReduceData(config, data) {
|
|
|
16
30
|
max = totalYValues
|
|
17
31
|
}
|
|
18
32
|
return allTotals
|
|
19
|
-
}, []
|
|
33
|
+
}, [])
|
|
20
34
|
|
|
21
35
|
max = Math.max(...yTotals)
|
|
22
36
|
} else if (config.visualizationType === 'Bar' && config.series && config.series.dataKey) {
|
|
23
|
-
max = Math.max(...data.map(d => Number(d[config.series.dataKey])))
|
|
37
|
+
max = Math.max(...data.map(d => (isNumber(d[config.series.dataKey]) ? Number(cleanChars(d[config.series.dataKey])) : 0)))
|
|
38
|
+
//max = Math.max(...data.map(d => Number(d[config.series.dataKey])))
|
|
24
39
|
} else if (config.visualizationType === 'Combo' && config.visualizationSubType === 'stacked' && !isBar) {
|
|
25
40
|
let total = []
|
|
26
41
|
|
|
@@ -34,28 +49,26 @@ function useReduceData(config, data) {
|
|
|
34
49
|
total.push(totalYValues)
|
|
35
50
|
})
|
|
36
51
|
// get lineSeries largest values
|
|
37
|
-
const lineMax = Math.max(...data.map(d => Math.max(...config.runtime.lineSeriesKeys.map(key => Number(d[key])))))
|
|
52
|
+
const lineMax = Math.max(...data.map(d => Math.max(...config.runtime.lineSeriesKeys.map(key => Number(cleanChars(d[key]))))))
|
|
38
53
|
|
|
39
54
|
const barMax = Math.max(...total)
|
|
40
55
|
|
|
41
56
|
max = Number(barMax) > Number(lineMax) ? barMax : lineMax
|
|
42
57
|
}
|
|
43
58
|
} else {
|
|
44
|
-
max = Math.max(...data.map(d => Math.max(...config.runtime.seriesKeys.map(key => Number(d[key])))))
|
|
59
|
+
max = Math.max(...data.map(d => Math.max(...config.runtime.seriesKeys.map(key => (isNumber(d[key]) ? Number(cleanChars(d[key])) : 0)))))
|
|
45
60
|
}
|
|
46
|
-
|
|
47
61
|
return max
|
|
48
62
|
}
|
|
49
63
|
|
|
50
64
|
const getMinValueFromData = () => {
|
|
51
65
|
let min
|
|
52
|
-
const minNumberFromData = Math.min(...data.map(d => Math.min(...config.runtime.seriesKeys.map(key => Number(d[key])))))
|
|
66
|
+
const minNumberFromData = Math.min(...data.map(d => Math.min(...config.runtime.seriesKeys.map(key => (isNumber(d[key]) ? Number(cleanChars(d[key])) : 1000000000)))))
|
|
53
67
|
min = String(minNumberFromData)
|
|
54
|
-
|
|
55
68
|
return min
|
|
56
69
|
}
|
|
57
70
|
|
|
58
|
-
const findPositiveNum = ()
|
|
71
|
+
const findPositiveNum = () => {
|
|
59
72
|
// loop throught provided data to find positve number in arr based on series keys.
|
|
60
73
|
let existPositiveValue = false
|
|
61
74
|
if (config.runtime.seriesKeys) {
|
|
@@ -66,10 +79,11 @@ function useReduceData(config, data) {
|
|
|
66
79
|
return existPositiveValue
|
|
67
80
|
}
|
|
68
81
|
|
|
69
|
-
const maxValue = getMaxValueFromData()
|
|
70
|
-
const minValue = getMinValueFromData()
|
|
82
|
+
const maxValue = Number(getMaxValueFromData())
|
|
83
|
+
const minValue = Number(getMinValueFromData())
|
|
71
84
|
const existPositiveValue = findPositiveNum()
|
|
72
|
-
|
|
85
|
+
|
|
86
|
+
return { minValue, maxValue, existPositiveValue, isAllLine }
|
|
73
87
|
}
|
|
74
88
|
|
|
75
89
|
export default useReduceData
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { scaleLinear } from '@visx/scale'
|
|
2
|
+
import useReduceData from '../hooks/useReduceData'
|
|
2
3
|
|
|
3
4
|
export default function useRightAxis({ config, yMax = 0, data = [], updateConfig }) {
|
|
4
5
|
const hasRightAxis = config.visualizationType === 'Combo' && config.orientation === 'vertical'
|
|
5
6
|
const rightSeriesKeys = config.series && config.series.filter(series => series.axis === 'Right').map(key => key.dataKey)
|
|
7
|
+
const { minValue } = useReduceData(config, data)
|
|
6
8
|
|
|
7
9
|
const allRightAxisData = rightSeriesKeys => {
|
|
8
10
|
if (!rightSeriesKeys) return [0]
|
|
@@ -17,7 +19,7 @@ export default function useRightAxis({ config, yMax = 0, data = [], updateConfig
|
|
|
17
19
|
const max = Math.max.apply(null, allRightAxisData(rightSeriesKeys))
|
|
18
20
|
|
|
19
21
|
const yScaleRight = scaleLinear({
|
|
20
|
-
domain: [
|
|
22
|
+
domain: [minValue, max],
|
|
21
23
|
range: [yMax, 0]
|
|
22
24
|
})
|
|
23
25
|
|
package/src/index.jsx
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import ReactDOM from 'react-dom/client'
|
|
3
|
+
|
|
4
|
+
import CdcChart from './CdcChart'
|
|
5
|
+
|
|
6
|
+
import 'react-tooltip/dist/react-tooltip.css'
|
|
7
|
+
|
|
8
|
+
let isEditor = window.location.href.includes('editor=true')
|
|
9
|
+
|
|
10
|
+
let domContainer = document.getElementsByClassName('react-container')[0]
|
|
11
|
+
|
|
12
|
+
ReactDOM.createRoot(domContainer).render(
|
|
13
|
+
<React.StrictMode>
|
|
14
|
+
<CdcChart configUrl={domContainer.attributes['data-config'].value} isEditor={isEditor} />
|
|
15
|
+
</React.StrictMode>,
|
|
16
|
+
)
|
package/src/scss/DataTable.scss
CHANGED
|
@@ -1,10 +1,32 @@
|
|
|
1
1
|
@include breakpointClass(md) {
|
|
2
2
|
.data-table-container {
|
|
3
|
-
margin: 1em;
|
|
3
|
+
margin: 5px 1em;
|
|
4
4
|
}
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.data-table-container {
|
|
8
|
+
// Hides Category Column
|
|
9
|
+
.row-Box-Plot--0 {
|
|
10
|
+
display: none !important;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Highlight Boxplot 5 Number Summary
|
|
14
|
+
.row-Box-Plot--1 > td:first-child,
|
|
15
|
+
.row-Box-Plot--2 > td:first-child,
|
|
16
|
+
.row-Box-Plot--3 > td:first-child,
|
|
17
|
+
.row-Box-Plot--4 > td:first-child,
|
|
18
|
+
.row-Box-Plot--5 > td:first-child {
|
|
19
|
+
background-color: #ffe699;
|
|
20
|
+
}
|
|
21
|
+
// Highlight Boxplot Measures
|
|
22
|
+
.row-Box-Plot--6 > td:first-child,
|
|
23
|
+
.row-Box-Plot--7 > td:first-child,
|
|
24
|
+
.row-Box-Plot--8 > td:first-child,
|
|
25
|
+
.row-Box-Plot--9 > td:first-child,
|
|
26
|
+
.row-Box-Plot--10 > td:first-child,
|
|
27
|
+
.row-Box-Plot--11 > td:first-child {
|
|
28
|
+
background-color: #d9d9d9;
|
|
29
|
+
}
|
|
8
30
|
.region-table {
|
|
9
31
|
display: table;
|
|
10
32
|
|
package/src/scss/main.scss
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
@import '
|
|
2
|
-
@import '
|
|
1
|
+
@import '@cdc/core/styles/base';
|
|
2
|
+
@import '@cdc/core/styles/heading-colors';
|
|
3
3
|
@import 'mixins';
|
|
4
4
|
@import 'variables';
|
|
5
|
-
@import '
|
|
5
|
+
@import '@cdc/core/styles/v2/themes/color-definitions';
|
|
6
6
|
|
|
7
7
|
.form-container {
|
|
8
8
|
overflow-y: auto;
|
|
@@ -120,30 +120,30 @@
|
|
|
120
120
|
order: 1;
|
|
121
121
|
position: relative;
|
|
122
122
|
|
|
123
|
-
&__inner{
|
|
124
|
-
&.bottom{
|
|
123
|
+
&__inner {
|
|
124
|
+
&.bottom {
|
|
125
125
|
display: grid;
|
|
126
126
|
grid-template-columns: auto auto;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
&.single-row{
|
|
129
|
+
&.single-row {
|
|
130
130
|
display: flex;
|
|
131
131
|
flex-direction: row;
|
|
132
132
|
flex-wrap: wrap;
|
|
133
133
|
justify-content: flex-start;
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
padding:0 1.2em 1em 0;
|
|
134
|
+
|
|
135
|
+
& > div {
|
|
136
|
+
padding: 0 1.2em 1em 0;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
& div>span {
|
|
140
|
-
|
|
139
|
+
& div > span {
|
|
140
|
+
margin-right: 0 !important;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
& >div.legend-item{
|
|
143
|
+
& > div.legend-item {
|
|
144
144
|
margin: 0 !important;
|
|
145
145
|
}
|
|
146
|
-
|
|
146
|
+
}
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
.legend-reset {
|
|
@@ -186,14 +186,15 @@
|
|
|
186
186
|
font-size: 1.3em;
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
h2,
|
|
189
|
+
h2,
|
|
190
|
+
p {
|
|
190
191
|
margin-bottom: 0.8em;
|
|
191
192
|
}
|
|
192
|
-
& div.legend-item{
|
|
193
|
+
& div.legend-item {
|
|
193
194
|
margin-bottom: 0.5em !important;
|
|
194
195
|
|
|
195
|
-
&:last-child{
|
|
196
|
-
|
|
196
|
+
&:last-child {
|
|
197
|
+
margin: 0 !important;
|
|
197
198
|
}
|
|
198
199
|
}
|
|
199
200
|
|
|
@@ -231,14 +232,20 @@
|
|
|
231
232
|
}
|
|
232
233
|
|
|
233
234
|
.tooltip {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
box-shadow: rgba(0, 0, 0, 0.1) 3px 3px 7px;
|
|
237
|
-
line-height: 1.4em;
|
|
238
|
-
font-size: 1em !important;
|
|
239
|
-
border-radius: 4px !important;
|
|
240
|
-
padding: 8px 12px !important;
|
|
235
|
+
border: rgba(0,0,0,.3) 1px solid;
|
|
236
|
+
box-shadow: rgba(0,0,0,.1) 3px 3px 7px;
|
|
241
237
|
opacity: 1;
|
|
238
|
+
line-height: 1.4em;
|
|
239
|
+
font-size: 1em;
|
|
240
|
+
border-radius: 4px;
|
|
241
|
+
padding: 8px 12px;
|
|
242
|
+
z-index: 1;
|
|
243
|
+
|
|
244
|
+
.react-tooltip-arrow {
|
|
245
|
+
border-bottom: rgba(0,0,0,.3) 1px solid;
|
|
246
|
+
border-right: rgba(0,0,0,.3) 1px solid;
|
|
247
|
+
backface-visibility: hidden;
|
|
248
|
+
}
|
|
242
249
|
}
|
|
243
250
|
|
|
244
251
|
.region-table {
|
|
@@ -249,9 +256,8 @@
|
|
|
249
256
|
display: flex;
|
|
250
257
|
align-items: flex-start;
|
|
251
258
|
flex-wrap: wrap;
|
|
252
|
-
margin-bottom: 1em;
|
|
253
259
|
|
|
254
|
-
&.bottom{
|
|
260
|
+
&.bottom {
|
|
255
261
|
flex-wrap: nowrap;
|
|
256
262
|
flex-direction: column;
|
|
257
263
|
}
|
|
@@ -323,6 +329,28 @@
|
|
|
323
329
|
}
|
|
324
330
|
|
|
325
331
|
.filters-section {
|
|
332
|
+
margin-left: 1rem;
|
|
333
|
+
margin-right: 1rem;
|
|
334
|
+
|
|
335
|
+
&__title {
|
|
336
|
+
margin: 15px 0;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
&__wrapper {
|
|
340
|
+
margin-bottom: 40px;
|
|
341
|
+
|
|
342
|
+
hr {
|
|
343
|
+
margin-bottom: 20px;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
label {
|
|
347
|
+
display: inherit;
|
|
348
|
+
margin-bottom: 5px;
|
|
349
|
+
font-weight: 600;
|
|
350
|
+
font-size: 16px;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
326
354
|
@include breakpoint(md) {
|
|
327
355
|
display: flex;
|
|
328
356
|
gap: 30px;
|
|
@@ -334,6 +362,7 @@
|
|
|
334
362
|
|
|
335
363
|
select {
|
|
336
364
|
font-size: 1em;
|
|
365
|
+
padding-right: 5px;
|
|
337
366
|
}
|
|
338
367
|
|
|
339
368
|
.single-filter {
|
|
@@ -377,6 +406,10 @@
|
|
|
377
406
|
.chart-container {
|
|
378
407
|
flex-wrap: nowrap;
|
|
379
408
|
|
|
409
|
+
.no-wrap {
|
|
410
|
+
flex-wrap: nowrap;
|
|
411
|
+
}
|
|
412
|
+
|
|
380
413
|
.legend-container {
|
|
381
414
|
width: 25%;
|
|
382
415
|
margin-left: 1em;
|
|
@@ -387,7 +420,7 @@
|
|
|
387
420
|
margin-right: 1em;
|
|
388
421
|
order: 0;
|
|
389
422
|
}
|
|
390
|
-
&.bottom{
|
|
423
|
+
&.bottom {
|
|
391
424
|
width: 100%;
|
|
392
425
|
margin-left: 0;
|
|
393
426
|
}
|
|
@@ -422,8 +455,6 @@
|
|
|
422
455
|
}
|
|
423
456
|
}
|
|
424
457
|
|
|
425
|
-
|
|
426
|
-
|
|
427
458
|
@include breakpointClass(lg) {
|
|
428
459
|
&.font-small {
|
|
429
460
|
font-size: 1em;
|
|
@@ -457,6 +488,7 @@
|
|
|
457
488
|
// ANIMATIONS
|
|
458
489
|
// Pie Chart Animations
|
|
459
490
|
.animated-pie {
|
|
491
|
+
margin: auto !important;
|
|
460
492
|
transition: all 0.4s ease-in-out;
|
|
461
493
|
opacity: 0;
|
|
462
494
|
transform-origin: center;
|
|
@@ -494,19 +526,20 @@
|
|
|
494
526
|
.linear,
|
|
495
527
|
.Line,
|
|
496
528
|
.Combo {
|
|
497
|
-
&.animated path {
|
|
529
|
+
&.animated path.animation {
|
|
498
530
|
opacity: 0;
|
|
499
531
|
}
|
|
500
532
|
&.animate {
|
|
501
|
-
path {
|
|
533
|
+
path.animation {
|
|
502
534
|
opacity: 1;
|
|
503
535
|
stroke-dasharray: 2000;
|
|
504
|
-
stroke-dashoffset:
|
|
536
|
+
stroke-dashoffset: 4000;
|
|
505
537
|
animation: dash 2s ease-in-out forwards;
|
|
506
538
|
}
|
|
507
539
|
@keyframes dash {
|
|
508
540
|
to {
|
|
509
541
|
stroke-dashoffset: 0;
|
|
542
|
+
opacity: 0;
|
|
510
543
|
}
|
|
511
544
|
}
|
|
512
545
|
}
|
|
@@ -530,6 +563,7 @@
|
|
|
530
563
|
|
|
531
564
|
.horizontal rect,
|
|
532
565
|
.horizontal foreignObject {
|
|
566
|
+
opacity: 0;
|
|
533
567
|
animation: growBarH 0.5s linear forwards;
|
|
534
568
|
animation-play-state: paused;
|
|
535
569
|
}
|
|
@@ -545,6 +579,10 @@
|
|
|
545
579
|
.group-2 {
|
|
546
580
|
transform-origin: center;
|
|
547
581
|
}
|
|
582
|
+
|
|
583
|
+
.visx-linepath .animation {
|
|
584
|
+
opacity: 0;
|
|
585
|
+
}
|
|
548
586
|
}
|
|
549
587
|
}
|
|
550
588
|
|
|
@@ -562,13 +600,26 @@
|
|
|
562
600
|
|
|
563
601
|
@keyframes growBarH {
|
|
564
602
|
from {
|
|
603
|
+
opacity: 1;
|
|
565
604
|
transform: scale(0, 1);
|
|
566
605
|
}
|
|
567
606
|
|
|
568
607
|
to {
|
|
608
|
+
opacity: 1;
|
|
569
609
|
transform: scale(1);
|
|
570
610
|
}
|
|
571
611
|
}
|
|
612
|
+
|
|
613
|
+
.fieldset--boxplot {
|
|
614
|
+
padding: 10px;
|
|
615
|
+
border-radius: 5px;
|
|
616
|
+
border: 2px solid rgba(0, 0, 0, 0.2);
|
|
617
|
+
padding: 10px;
|
|
618
|
+
|
|
619
|
+
label {
|
|
620
|
+
margin: 5px 0;
|
|
621
|
+
}
|
|
622
|
+
}
|
|
572
623
|
}
|
|
573
624
|
|
|
574
625
|
.cdc-visualization__paired-bar-chart {
|
package/vite.config.js
ADDED