@cdc/chart 4.25.6 → 4.25.8
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 +53500 -32825
- package/package.json +3 -2
- package/src/CdcChart.tsx +9 -2
- package/src/CdcChartComponent.tsx +30 -12
- package/src/_stories/Chart.BoxPlot.stories.tsx +35 -0
- package/src/_stories/Chart.stories.tsx +0 -7
- package/src/_stories/Chart.tooltip.stories.tsx +35 -275
- package/src/_stories/_mock/bar-chart-suppressed.json +2 -80
- package/src/_stories/_mock/boxplot_multiseries.json +252 -166
- package/src/components/AreaChart/components/AreaChart.Stacked.jsx +1 -1
- package/src/components/AreaChart/components/AreaChart.jsx +4 -8
- package/src/components/BarChart/components/BarChart.Horizontal.tsx +45 -7
- package/src/components/BarChart/components/BarChart.StackedHorizontal.tsx +1 -1
- package/src/components/BarChart/components/BarChart.Vertical.tsx +36 -4
- package/src/components/BoxPlot/BoxPlot.Horizontal.tsx +131 -0
- package/src/components/BoxPlot/{BoxPlot.tsx → BoxPlot.Vertical.tsx} +4 -4
- package/src/components/BoxPlot/helpers/index.ts +32 -12
- package/src/components/Brush/BrushChart.tsx +65 -10
- package/src/components/Brush/BrushController.tsx +71 -0
- package/src/components/Brush/types.tsx +8 -0
- package/src/components/BrushChart.tsx +1 -1
- package/src/components/EditorPanel/EditorPanel.tsx +19 -14
- package/src/components/EditorPanel/components/Panels/Panel.Annotate.tsx +2 -2
- package/src/components/EditorPanel/components/Panels/Panel.General.tsx +2 -2
- package/src/components/EditorPanel/components/Panels/Panel.Series.tsx +2 -34
- package/src/components/Forecasting/{Forecasting.jsx → Forecasting.tsx} +32 -12
- package/src/components/Legend/Legend.Component.tsx +16 -1
- package/src/components/Legend/Legend.tsx +3 -1
- package/src/components/Legend/LegendGroup/LegendGroup.tsx +1 -0
- package/src/components/Legend/helpers/index.ts +2 -2
- package/src/components/LineChart/components/LineChart.BumpCircle.tsx +27 -26
- package/src/components/LineChart/helpers.ts +7 -7
- package/src/components/LinearChart.tsx +130 -75
- package/src/data/initial-state.js +12 -15
- package/src/helpers/countNumOfTicks.ts +4 -19
- package/src/helpers/filterAndShiftLinearDateTicks.ts +58 -0
- package/src/helpers/getBridgedData.ts +13 -0
- package/src/helpers/tests/getBridgedData.test.ts +64 -0
- package/src/hooks/useScales.ts +42 -42
- package/src/hooks/useTooltip.tsx +3 -2
- package/src/index.jsx +6 -1
- package/src/scss/main.scss +2 -4
- package/src/store/chart.actions.ts +2 -2
- package/src/store/chart.reducer.ts +4 -12
- package/src/types/ChartConfig.ts +1 -6
- package/src/components/BoxPlot/index.tsx +0 -3
- package/src/components/Brush/BrushController..tsx +0 -39
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdc/chart",
|
|
3
|
-
"version": "4.25.
|
|
3
|
+
"version": "4.25.8",
|
|
4
4
|
"description": "React component for visualizing tabular data in various types of charts",
|
|
5
5
|
"moduleName": "CdcChart",
|
|
6
6
|
"main": "dist/cdcchart",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"license": "Apache-2.0",
|
|
28
28
|
"dependencies": {
|
|
29
|
+
"@cdc/core": "^4.25.8",
|
|
29
30
|
"@hello-pangea/dnd": "^16.2.0",
|
|
30
31
|
"@react-spring/web": "^9.7.5",
|
|
31
32
|
"@visx/axis": "3.12.0",
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
"react": "^18.2.0",
|
|
54
55
|
"react-dom": "^18.2.0"
|
|
55
56
|
},
|
|
56
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "e369994230b5e3facff224e1d89d5937528ac5a0",
|
|
57
58
|
"devDependencies": {
|
|
58
59
|
"@types/d3-array": "^3.2.1",
|
|
59
60
|
"@types/d3-format": "^3.0.4",
|
package/src/CdcChart.tsx
CHANGED
|
@@ -14,9 +14,16 @@ interface CdcChartProps {
|
|
|
14
14
|
isEditor?: boolean
|
|
15
15
|
isDebug?: boolean
|
|
16
16
|
config?: ChartConfig
|
|
17
|
+
interactionLabel?: string
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
const CdcChartWrapper: React.FC<CdcChartProps> = ({
|
|
20
|
+
const CdcChartWrapper: React.FC<CdcChartProps> = ({
|
|
21
|
+
configUrl,
|
|
22
|
+
isEditor,
|
|
23
|
+
isDebug,
|
|
24
|
+
config: editorsConfig,
|
|
25
|
+
interactionLabel = ''
|
|
26
|
+
}) => {
|
|
20
27
|
const editorContext = useContext(EditorContext)
|
|
21
28
|
const [config, _setConfig] = useState<ChartConfig>({} as ChartConfig)
|
|
22
29
|
const setConfig = newConfig => {
|
|
@@ -89,7 +96,7 @@ const CdcChartWrapper: React.FC<CdcChartProps> = ({ configUrl, isEditor, isDebug
|
|
|
89
96
|
|
|
90
97
|
if (isLoading) return <Loading />
|
|
91
98
|
|
|
92
|
-
return <CdcChart config={config} isEditor={isEditor} isDebug={isDebug} />
|
|
99
|
+
return <CdcChart config={config} isEditor={isEditor} isDebug={isDebug} interactionLabel={interactionLabel} />
|
|
93
100
|
}
|
|
94
101
|
|
|
95
102
|
export default CdcChartWrapper
|
|
@@ -65,6 +65,7 @@ import isNumber from '@cdc/core/helpers/isNumber'
|
|
|
65
65
|
import coveUpdateWorker from '@cdc/core/helpers/coveUpdateWorker'
|
|
66
66
|
import EditorContext from '../../editor/src/ConfigContext'
|
|
67
67
|
import { EDITOR_WIDTH } from '@cdc/core/helpers/constants'
|
|
68
|
+
import { extractCoveData, updateVegaData } from '@cdc/core/helpers/vegaConfig'
|
|
68
69
|
// Local helpers
|
|
69
70
|
import { isConvertLineToBarGraph } from './helpers/isConvertLineToBarGraph'
|
|
70
71
|
import { getBoxPlotConfig } from './helpers/getBoxPlotConfig'
|
|
@@ -81,6 +82,7 @@ import { VizFilter } from '@cdc/core/types/VizFilter'
|
|
|
81
82
|
import { getNewRuntime } from './helpers/getNewRuntime'
|
|
82
83
|
import FootnotesStandAlone from '@cdc/core/components/Footnotes/FootnotesStandAlone'
|
|
83
84
|
import { Datasets } from '@cdc/core/types/DataSet'
|
|
85
|
+
import { publishAnalyticsEvent } from '@cdc/core/helpers/metrics/helpers'
|
|
84
86
|
|
|
85
87
|
interface CdcChartProps {
|
|
86
88
|
config?: ChartConfig
|
|
@@ -95,6 +97,7 @@ interface CdcChartProps {
|
|
|
95
97
|
setSharedFilterValue?: (value: any) => void
|
|
96
98
|
dashboardConfig?: DashboardConfig
|
|
97
99
|
datasets?: Datasets
|
|
100
|
+
interactionLabel: string
|
|
98
101
|
}
|
|
99
102
|
const CdcChart: React.FC<CdcChartProps> = ({
|
|
100
103
|
config: configObj,
|
|
@@ -107,7 +110,8 @@ const CdcChart: React.FC<CdcChartProps> = ({
|
|
|
107
110
|
setSharedFilter,
|
|
108
111
|
setSharedFilterValue,
|
|
109
112
|
dashboardConfig,
|
|
110
|
-
datasets
|
|
113
|
+
datasets,
|
|
114
|
+
interactionLabel
|
|
111
115
|
}) => {
|
|
112
116
|
const transform = new DataTransform()
|
|
113
117
|
const initialState = getInitialState(configObj)
|
|
@@ -124,8 +128,7 @@ const CdcChart: React.FC<CdcChartProps> = ({
|
|
|
124
128
|
coveLoadedEventRan,
|
|
125
129
|
imageId,
|
|
126
130
|
seriesHighlight,
|
|
127
|
-
colorScale
|
|
128
|
-
brushConfig
|
|
131
|
+
colorScale
|
|
129
132
|
} = state
|
|
130
133
|
const { description, visualizationType } = config
|
|
131
134
|
const svgRef = useRef(null)
|
|
@@ -261,6 +264,7 @@ const CdcChart: React.FC<CdcChartProps> = ({
|
|
|
261
264
|
const [plots, categories] = getBoxPlotConfig(newConfig, stateData)
|
|
262
265
|
newConfig.boxplot['categories'] = categories
|
|
263
266
|
newConfig.boxplot.plots = plots
|
|
267
|
+
newConfig.yAxis.labelPlacement = 'On Date/Category Axis'
|
|
264
268
|
}
|
|
265
269
|
if (newConfig.visualizationType === 'Combo' && newConfig.series) {
|
|
266
270
|
newConfig.runtime = getComboChartConfig(newConfig)
|
|
@@ -286,7 +290,8 @@ const CdcChart: React.FC<CdcChartProps> = ({
|
|
|
286
290
|
}
|
|
287
291
|
|
|
288
292
|
if (
|
|
289
|
-
(newConfig.visualizationType === 'Bar'
|
|
293
|
+
((newConfig.visualizationType === 'Bar' || newConfig.visualizationType === 'Box Plot') &&
|
|
294
|
+
newConfig.orientation === 'horizontal') ||
|
|
290
295
|
['Deviation Bar', 'Paired Bar', 'Forest Plot'].includes(newConfig.visualizationType)
|
|
291
296
|
) {
|
|
292
297
|
newConfig.runtime.xAxis = _.cloneDeep(newConfig.yAxis.yAxis || newConfig.yAxis)
|
|
@@ -298,7 +303,7 @@ const CdcChart: React.FC<CdcChartProps> = ({
|
|
|
298
303
|
// remove after COVE supports categorical axis on horizonatal bars
|
|
299
304
|
newConfig.yAxis.type = newConfig.yAxis.type === 'categorical' ? 'linear' : newConfig.yAxis.type
|
|
300
305
|
} else if (
|
|
301
|
-
['
|
|
306
|
+
['Scatter Plot', 'Area Chart', 'Line', 'Forecasting'].includes(newConfig.visualizationType) &&
|
|
302
307
|
!convertLineToBarGraph
|
|
303
308
|
) {
|
|
304
309
|
newConfig.runtime.xAxis = newConfig.xAxis
|
|
@@ -409,6 +414,10 @@ const CdcChart: React.FC<CdcChartProps> = ({
|
|
|
409
414
|
if (newConfig.dataUrl) newConfig.dataUrl = `${newConfig.dataUrl}`
|
|
410
415
|
let newData = await fetchRemoteData(newConfig.dataUrl)
|
|
411
416
|
|
|
417
|
+
if (newConfig.vegaConfig) {
|
|
418
|
+
newData = extractCoveData(updateVegaData(newConfig.vegaConfig, newData))
|
|
419
|
+
}
|
|
420
|
+
|
|
412
421
|
if (newData && newConfig.dataDescription) {
|
|
413
422
|
newData = transform.autoStandardize(newData)
|
|
414
423
|
newData = transform.developerStandardize(newData, newConfig.dataDescription)
|
|
@@ -459,6 +468,7 @@ const CdcChart: React.FC<CdcChartProps> = ({
|
|
|
459
468
|
if (container && !isLoading && !_.isEmpty(config) && !coveLoadedEventRan) {
|
|
460
469
|
publish('cove_loaded', { config: config })
|
|
461
470
|
dispatch({ type: 'SET_LOADED_EVENT', payload: true })
|
|
471
|
+
publishAnalyticsEvent('chart_loaded', 'load', interactionLabel, 'chart')
|
|
462
472
|
}
|
|
463
473
|
}, [container, config, isLoading]) // eslint-disable-line
|
|
464
474
|
|
|
@@ -548,6 +558,7 @@ const CdcChart: React.FC<CdcChartProps> = ({
|
|
|
548
558
|
} catch (e) {
|
|
549
559
|
console.error('COVE:', e.message)
|
|
550
560
|
}
|
|
561
|
+
publishAnalyticsEvent('chart_legend_reset', 'click', interactionLabel, 'chart')
|
|
551
562
|
dispatch({ type: 'SET_SERIES_HIGHLIGHT', payload: [] })
|
|
552
563
|
}
|
|
553
564
|
|
|
@@ -840,7 +851,7 @@ const CdcChart: React.FC<CdcChartProps> = ({
|
|
|
840
851
|
if (legend?.hide) classes.push('legend-hidden')
|
|
841
852
|
if (lineDatapointClass) classes.push(lineDatapointClass)
|
|
842
853
|
if (!config.barHasBorder) classes.push('chart-bar--no-border')
|
|
843
|
-
if (config.
|
|
854
|
+
if (config.xAxis.brushActive && dashboardConfig?.type === 'dashboard' && (!isLegendOnBottom || legend.hide))
|
|
844
855
|
classes.push('dashboard-brush')
|
|
845
856
|
classes.push(...contentClasses)
|
|
846
857
|
return classes
|
|
@@ -851,8 +862,8 @@ const CdcChart: React.FC<CdcChartProps> = ({
|
|
|
851
862
|
const isLegendOnBottom = legend?.position === 'bottom' || isLegendWrapViewport(currentViewport)
|
|
852
863
|
|
|
853
864
|
if (config.isResponsiveTicks) classes.push('subtext--responsive-ticks ')
|
|
854
|
-
if (config.
|
|
855
|
-
if (config.
|
|
865
|
+
if (config.xAxis.brushActive && !isLegendOnBottom) classes.push('subtext--brush-active ')
|
|
866
|
+
if (config.xAxis.brushActive && config.legend.hide) classes.push('subtext--brush-active ')
|
|
856
867
|
return classes
|
|
857
868
|
}
|
|
858
869
|
|
|
@@ -862,7 +873,6 @@ const CdcChart: React.FC<CdcChartProps> = ({
|
|
|
862
873
|
{config.dataKey} (Go to Table)
|
|
863
874
|
</a>
|
|
864
875
|
)
|
|
865
|
-
|
|
866
876
|
body = (
|
|
867
877
|
<>
|
|
868
878
|
{isEditor && <EditorPanel datasets={datasets} />}
|
|
@@ -902,6 +912,7 @@ const CdcChart: React.FC<CdcChartProps> = ({
|
|
|
902
912
|
setFilters={setFilters}
|
|
903
913
|
excludedData={excludedData}
|
|
904
914
|
dimensions={dimensions}
|
|
915
|
+
interactionLabel={interactionLabel}
|
|
905
916
|
/>
|
|
906
917
|
)}
|
|
907
918
|
<SkipTo skipId={handleChartTabbing(config, legendId)} skipMessage='Skip Over Chart Container' />
|
|
@@ -980,6 +991,7 @@ const CdcChart: React.FC<CdcChartProps> = ({
|
|
|
980
991
|
setFilters={setFilters}
|
|
981
992
|
excludedData={excludedData}
|
|
982
993
|
dimensions={dimensions}
|
|
994
|
+
interactionLabel={interactionLabel}
|
|
983
995
|
/>
|
|
984
996
|
{config?.introText && (
|
|
985
997
|
<section className='introText mb-4' style={{ padding: '0px 0 35px' }}>
|
|
@@ -1007,7 +1019,11 @@ const CdcChart: React.FC<CdcChartProps> = ({
|
|
|
1007
1019
|
{!config.legend.hide &&
|
|
1008
1020
|
config.visualizationType !== 'Spark Line' &&
|
|
1009
1021
|
config.visualizationType !== 'Sankey' && (
|
|
1010
|
-
<Legend
|
|
1022
|
+
<Legend
|
|
1023
|
+
ref={legendRef}
|
|
1024
|
+
skipId={handleChartTabbing(config, legendId)}
|
|
1025
|
+
interactionLabel={interactionLabel}
|
|
1026
|
+
/>
|
|
1011
1027
|
)}
|
|
1012
1028
|
</LegendWrapper>
|
|
1013
1029
|
{/* Link */}
|
|
@@ -1029,6 +1045,7 @@ const CdcChart: React.FC<CdcChartProps> = ({
|
|
|
1029
1045
|
type='image'
|
|
1030
1046
|
state={config}
|
|
1031
1047
|
elementToCapture={imageId}
|
|
1048
|
+
interactionLabel={interactionLabel}
|
|
1032
1049
|
/>
|
|
1033
1050
|
)}
|
|
1034
1051
|
{config.table.showDownloadPdfButton && (
|
|
@@ -1038,6 +1055,7 @@ const CdcChart: React.FC<CdcChartProps> = ({
|
|
|
1038
1055
|
type='pdf'
|
|
1039
1056
|
state={config}
|
|
1040
1057
|
elementToCapture={imageId}
|
|
1058
|
+
interactionLabel={interactionLabel}
|
|
1041
1059
|
/>
|
|
1042
1060
|
)}
|
|
1043
1061
|
</MediaControls.Section>
|
|
@@ -1049,7 +1067,7 @@ const CdcChart: React.FC<CdcChartProps> = ({
|
|
|
1049
1067
|
(config.visualizationType === 'Sankey' && config.table.show)) && (
|
|
1050
1068
|
<DataTable
|
|
1051
1069
|
/* changing the "key" will force the table to re-render
|
|
1052
|
-
|
|
1070
|
+
when the default sort changes while editing */
|
|
1053
1071
|
key={dataTableDefaultSortBy}
|
|
1054
1072
|
config={pivotDynamicSeries(config)}
|
|
1055
1073
|
rawData={
|
|
@@ -1071,6 +1089,7 @@ const CdcChart: React.FC<CdcChartProps> = ({
|
|
|
1071
1089
|
viewport={currentViewport}
|
|
1072
1090
|
tabbingId={handleChartTabbing(config, legendId)}
|
|
1073
1091
|
colorScale={colorScale}
|
|
1092
|
+
interactionLabel={interactionLabel}
|
|
1074
1093
|
/>
|
|
1075
1094
|
)}
|
|
1076
1095
|
{config?.annotations?.length > 0 && <Annotation.Dropdown />}
|
|
@@ -1102,7 +1121,6 @@ const CdcChart: React.FC<CdcChartProps> = ({
|
|
|
1102
1121
|
|
|
1103
1122
|
const contextValues = {
|
|
1104
1123
|
...state,
|
|
1105
|
-
brushConfig,
|
|
1106
1124
|
capitalize,
|
|
1107
1125
|
convertLineToBarGraph,
|
|
1108
1126
|
clean,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import boxPlotConfig from './_mock/boxplot_multiseries.json'
|
|
3
|
+
import Chart from '../CdcChartComponent'
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof Chart> = {
|
|
6
|
+
title: 'Components/Templates/Chart/Box Plot',
|
|
7
|
+
component: Chart
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
type Story = StoryObj<typeof Chart>
|
|
11
|
+
|
|
12
|
+
export const BoxPlot_Vertical: Story = {
|
|
13
|
+
args: {
|
|
14
|
+
config: {
|
|
15
|
+
...boxPlotConfig,
|
|
16
|
+
orientation: 'vertical',
|
|
17
|
+
title: 'Vertical Multiseries Box Plot',
|
|
18
|
+
isEditor: false
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const BoxPlot_Horizontal: Story = {
|
|
24
|
+
args: {
|
|
25
|
+
config: {
|
|
26
|
+
...boxPlotConfig,
|
|
27
|
+
orientation: 'horizontal',
|
|
28
|
+
title: 'Horizontal Multiseries Box Plot',
|
|
29
|
+
yAxis: { ...boxPlotConfig.yAxis, labelPlacement: 'Above Bar' }
|
|
30
|
+
},
|
|
31
|
+
isEditor: false
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default meta
|
|
@@ -10,7 +10,6 @@ import horizontalBarConfig from './_mock/horizontal_bar.json'
|
|
|
10
10
|
import barChartLabels from './_mock/barchart_labels.mock.json'
|
|
11
11
|
import pieConfig from './_mock/pie_with_data.json'
|
|
12
12
|
import pieCalculatedArea from './_mock/pie_calculated_area.json'
|
|
13
|
-
import boxPlotConfig from './_mock/boxplot_multiseries.json'
|
|
14
13
|
import areaChartStacked from './_mock/area_chart_stacked.json'
|
|
15
14
|
import multipleLines from './_mock/short_dates.json'
|
|
16
15
|
import { editConfigKeys } from '../helpers/configHelpers'
|
|
@@ -82,12 +81,6 @@ export const Paired_Bar: Story = {
|
|
|
82
81
|
config: pairedBar
|
|
83
82
|
}
|
|
84
83
|
}
|
|
85
|
-
export const BoxPlot_Multiseries: Story = {
|
|
86
|
-
args: {
|
|
87
|
-
config: boxPlotConfig,
|
|
88
|
-
isEditor: false
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
84
|
|
|
92
85
|
export const Area_Chart_stacked: Story = {
|
|
93
86
|
args: {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
2
|
|
|
3
3
|
import Chart from '../CdcChartComponent'
|
|
4
|
-
|
|
4
|
+
import barChartStacked from './_mock/barchart_labels.mock.json'
|
|
5
|
+
import barChartSuppressed from './_mock/bar-chart-suppressed.json'
|
|
5
6
|
const meta: Meta<typeof Chart> = {
|
|
6
7
|
title: 'Components/Templates/Chart/Tooltip',
|
|
7
8
|
component: Chart
|
|
@@ -9,294 +10,53 @@ const meta: Meta<typeof Chart> = {
|
|
|
9
10
|
|
|
10
11
|
type Story = StoryObj<typeof Chart>
|
|
11
12
|
|
|
13
|
+
export const Increased_Tooltip_Range: Story = {
|
|
14
|
+
args: {
|
|
15
|
+
config: {
|
|
16
|
+
...barChartSuppressed,
|
|
17
|
+
title: 'Increased Tooltip hovers range for missing and suppressed bars',
|
|
18
|
+
tooltips: {
|
|
19
|
+
...barChartSuppressed.tooltips,
|
|
20
|
+
singleSeries: true
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
12
26
|
export const Additional_Tooltip: Story = {
|
|
13
27
|
args: {
|
|
14
28
|
config: {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
chartMessage: {
|
|
18
|
-
noData: 'No Data Available'
|
|
19
|
-
},
|
|
20
|
-
title: 'Example Stacked Bar Chart with Additional tolltip column',
|
|
29
|
+
...barChartStacked,
|
|
30
|
+
title: 'Stacked Bar Chart with Additional Tooltip Column',
|
|
21
31
|
showTitle: true,
|
|
22
|
-
showDownloadMediaButton: false,
|
|
23
|
-
theme: 'theme-orange',
|
|
24
|
-
animate: false,
|
|
25
|
-
lineDatapointStyle: 'hover',
|
|
26
|
-
barHasBorder: 'false',
|
|
27
|
-
isLollipopChart: false,
|
|
28
|
-
lollipopShape: 'circle',
|
|
29
|
-
lollipopColorStyle: 'two-tone',
|
|
30
32
|
visualizationSubType: 'stacked',
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
padding: {
|
|
39
|
-
left: 5,
|
|
40
|
-
right: 5
|
|
41
|
-
},
|
|
42
|
-
yAxis: {
|
|
43
|
-
hideAxis: false,
|
|
44
|
-
displayNumbersOnBar: false,
|
|
45
|
-
hideLabel: false,
|
|
46
|
-
hideTicks: false,
|
|
47
|
-
size: '64',
|
|
48
|
-
gridLines: false,
|
|
49
|
-
enablePadding: false,
|
|
50
|
-
min: '',
|
|
51
|
-
max: '',
|
|
52
|
-
labelColor: '#333',
|
|
53
|
-
tickLabelColor: '#333',
|
|
54
|
-
tickColor: '#333',
|
|
55
|
-
rightHideAxis: true,
|
|
56
|
-
rightAxisSize: 0,
|
|
57
|
-
rightLabel: '',
|
|
58
|
-
rightLabelOffsetSize: 0,
|
|
59
|
-
rightAxisLabelColor: '#333',
|
|
60
|
-
rightAxisTickLabelColor: '#333',
|
|
61
|
-
rightAxisTickColor: '#333',
|
|
62
|
-
numTicks: '',
|
|
63
|
-
axisPadding: 0,
|
|
64
|
-
tickRotation: 0,
|
|
65
|
-
anchors: [],
|
|
66
|
-
label: 'Y-Axis Label Example'
|
|
67
|
-
},
|
|
68
|
-
boxplot: {
|
|
69
|
-
plots: [],
|
|
70
|
-
borders: 'true',
|
|
71
|
-
firstQuartilePercentage: 25,
|
|
72
|
-
thirdQuartilePercentage: 75,
|
|
73
|
-
boxWidthPercentage: 40,
|
|
74
|
-
plotOutlierValues: false,
|
|
75
|
-
plotNonOutlierValues: true,
|
|
76
|
-
legend: {
|
|
77
|
-
showHowToReadText: false,
|
|
78
|
-
howToReadText: ''
|
|
79
|
-
},
|
|
80
|
-
labels: {
|
|
81
|
-
q1: 'Lower Quartile',
|
|
82
|
-
q2: 'q2',
|
|
83
|
-
q3: 'Upper Quartile',
|
|
84
|
-
q4: 'q4',
|
|
85
|
-
minimum: 'Minimum',
|
|
86
|
-
maximum: 'Maximum',
|
|
87
|
-
mean: 'Mean',
|
|
88
|
-
median: 'Median',
|
|
89
|
-
sd: 'Standard Deviation',
|
|
90
|
-
iqr: 'Interquartile Range',
|
|
91
|
-
total: 'Total',
|
|
92
|
-
outliers: 'Outliers',
|
|
93
|
-
values: 'Values',
|
|
94
|
-
lowerBounds: 'Lower Bounds',
|
|
95
|
-
upperBounds: 'Upper Bounds'
|
|
33
|
+
series: [
|
|
34
|
+
...barChartStacked.series,
|
|
35
|
+
{
|
|
36
|
+
dataKey: 'White, non-Hispanic',
|
|
37
|
+
type: 'Bar',
|
|
38
|
+
axis: 'Left',
|
|
39
|
+
tooltip: true
|
|
96
40
|
}
|
|
97
|
-
|
|
98
|
-
topAxis: {
|
|
99
|
-
hasLine: false
|
|
100
|
-
},
|
|
101
|
-
isLegendValue: false,
|
|
102
|
-
barThickness: 0.35,
|
|
103
|
-
barHeight: 25,
|
|
104
|
-
barSpace: 15,
|
|
105
|
-
heights: {
|
|
106
|
-
vertical: 300,
|
|
107
|
-
horizontal: 750
|
|
108
|
-
},
|
|
109
|
-
xAxis: {
|
|
110
|
-
sortDates: false,
|
|
111
|
-
anchors: [],
|
|
112
|
-
type: 'categorical',
|
|
113
|
-
showTargetLabel: true,
|
|
114
|
-
targetLabel: 'Target',
|
|
115
|
-
hideAxis: false,
|
|
116
|
-
hideLabel: false,
|
|
117
|
-
hideTicks: false,
|
|
118
|
-
size: '67',
|
|
119
|
-
tickRotation: '25',
|
|
120
|
-
min: '',
|
|
121
|
-
max: '',
|
|
122
|
-
labelColor: '#333',
|
|
123
|
-
tickLabelColor: '#333',
|
|
124
|
-
tickColor: '#333',
|
|
125
|
-
numTicks: '',
|
|
126
|
-
labelOffset: 65,
|
|
127
|
-
axisPadding: 0,
|
|
128
|
-
target: 0,
|
|
129
|
-
maxTickRotation: 0,
|
|
130
|
-
dataKey: 'Year',
|
|
131
|
-
label: 'X-Axis Label Example',
|
|
132
|
-
tickWidthMax: 41
|
|
133
|
-
},
|
|
134
|
-
table: {
|
|
135
|
-
label: 'Data Table',
|
|
136
|
-
expanded: true,
|
|
137
|
-
limitHeight: false,
|
|
138
|
-
height: '',
|
|
139
|
-
caption: '',
|
|
140
|
-
showDownloadUrl: false,
|
|
141
|
-
showDataTableLink: true,
|
|
142
|
-
indexLabel: '',
|
|
143
|
-
download: true,
|
|
144
|
-
showVertical: false,
|
|
145
|
-
show: true
|
|
146
|
-
},
|
|
147
|
-
orientation: 'vertical',
|
|
148
|
-
color: 'pinkpurple',
|
|
41
|
+
],
|
|
149
42
|
columns: {
|
|
150
|
-
|
|
151
|
-
label: '
|
|
152
|
-
dataTable:
|
|
43
|
+
'American Indian/Alaska Native': {
|
|
44
|
+
label: 'Additional Tooltip',
|
|
45
|
+
dataTable: true,
|
|
153
46
|
tooltips: true,
|
|
154
47
|
prefix: '',
|
|
155
48
|
suffix: '',
|
|
156
49
|
forestPlot: false,
|
|
157
50
|
startingPoint: '0',
|
|
158
51
|
forestPlotAlignRight: false,
|
|
159
|
-
|
|
52
|
+
roundToPlace: 0,
|
|
53
|
+
commas: true,
|
|
54
|
+
showInViz: false,
|
|
55
|
+
forestPlotStartingPoint: 0,
|
|
56
|
+
name: 'American Indian/Alaska Native',
|
|
57
|
+
series: 'Hispanic'
|
|
160
58
|
}
|
|
161
|
-
}
|
|
162
|
-
legend: {
|
|
163
|
-
hide: false,
|
|
164
|
-
behavior: 'isolate',
|
|
165
|
-
singleRow: false,
|
|
166
|
-
colorCode: '',
|
|
167
|
-
reverseLabelOrder: false,
|
|
168
|
-
description: '',
|
|
169
|
-
dynamicLegend: false,
|
|
170
|
-
dynamicLegendDefaultText: 'Show All',
|
|
171
|
-
dynamicLegendItemLimit: 5,
|
|
172
|
-
dynamicLegendItemLimitMessage: 'Dynamic Legend Item Limit Hit.',
|
|
173
|
-
dynamicLegendChartMessage: 'Select Options from the Legend',
|
|
174
|
-
lineMode: false,
|
|
175
|
-
verticalSorted: false,
|
|
176
|
-
position: 'right',
|
|
177
|
-
label: 'Data Type'
|
|
178
|
-
},
|
|
179
|
-
brush: {
|
|
180
|
-
height: 25,
|
|
181
|
-
data: [],
|
|
182
|
-
active: false
|
|
183
|
-
},
|
|
184
|
-
exclusions: {
|
|
185
|
-
active: false,
|
|
186
|
-
keys: []
|
|
187
|
-
},
|
|
188
|
-
palette: 'qualitative-bold',
|
|
189
|
-
isPaletteReversed: false,
|
|
190
|
-
twoColor: {
|
|
191
|
-
palette: 'monochrome-1',
|
|
192
|
-
isPaletteReversed: false
|
|
193
|
-
},
|
|
194
|
-
labels: false,
|
|
195
|
-
dataFormat: {
|
|
196
|
-
commas: false,
|
|
197
|
-
prefix: '',
|
|
198
|
-
suffix: '%',
|
|
199
|
-
abbreviated: false,
|
|
200
|
-
bottomSuffix: '',
|
|
201
|
-
bottomPrefix: '',
|
|
202
|
-
bottomAbbreviated: false
|
|
203
|
-
},
|
|
204
|
-
confidenceKeys: {},
|
|
205
|
-
visual: {
|
|
206
|
-
border: true,
|
|
207
|
-
accent: true,
|
|
208
|
-
background: true,
|
|
209
|
-
verticalHoverLine: false,
|
|
210
|
-
horizontalHoverLine: false
|
|
211
|
-
},
|
|
212
|
-
useLogScale: false,
|
|
213
|
-
filterBehavior: 'Filter Change',
|
|
214
|
-
highlightedBarValues: [],
|
|
215
|
-
series: [
|
|
216
|
-
{
|
|
217
|
-
dataKey: 'Data 2',
|
|
218
|
-
type: 'Bar',
|
|
219
|
-
tooltip: true
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
dataKey: 'Data 3',
|
|
223
|
-
type: 'Bar',
|
|
224
|
-
tooltip: true
|
|
225
|
-
}
|
|
226
|
-
],
|
|
227
|
-
tooltips: {
|
|
228
|
-
opacity: 90
|
|
229
|
-
},
|
|
230
|
-
forestPlot: {
|
|
231
|
-
startAt: 0,
|
|
232
|
-
width: 'auto',
|
|
233
|
-
colors: {
|
|
234
|
-
line: '',
|
|
235
|
-
shape: ''
|
|
236
|
-
},
|
|
237
|
-
estimateField: '',
|
|
238
|
-
estimateRadius: '',
|
|
239
|
-
lowerCiField: '',
|
|
240
|
-
upperCiField: '',
|
|
241
|
-
shape: '',
|
|
242
|
-
rowHeight: 20,
|
|
243
|
-
showZeroLine: false,
|
|
244
|
-
description: {
|
|
245
|
-
show: true,
|
|
246
|
-
text: 'description',
|
|
247
|
-
location: 0
|
|
248
|
-
},
|
|
249
|
-
result: {
|
|
250
|
-
show: true,
|
|
251
|
-
text: 'result',
|
|
252
|
-
location: 100
|
|
253
|
-
},
|
|
254
|
-
radius: {
|
|
255
|
-
min: 1,
|
|
256
|
-
max: 8,
|
|
257
|
-
scalingColumn: ''
|
|
258
|
-
},
|
|
259
|
-
regression: {
|
|
260
|
-
lower: 0,
|
|
261
|
-
upper: 0,
|
|
262
|
-
estimateField: 0
|
|
263
|
-
},
|
|
264
|
-
leftWidthOffset: 0,
|
|
265
|
-
rightWidthOffset: 0
|
|
266
|
-
},
|
|
267
|
-
area: {
|
|
268
|
-
isStacked: false
|
|
269
|
-
},
|
|
270
|
-
height: '375',
|
|
271
|
-
data: [
|
|
272
|
-
{
|
|
273
|
-
Year: '2015',
|
|
274
|
-
'Data 1': '25',
|
|
275
|
-
'Data 2': '20',
|
|
276
|
-
'Data 3': '55'
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
Year: '2016',
|
|
280
|
-
'Data 1': '35',
|
|
281
|
-
'Data 2': '30',
|
|
282
|
-
'Data 3': '35'
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
Year: '2017',
|
|
286
|
-
'Data 1': '22',
|
|
287
|
-
'Data 2': '38',
|
|
288
|
-
'Data 3': '40'
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
Year: '2018',
|
|
292
|
-
'Data 1': '40',
|
|
293
|
-
'Data 2': '40',
|
|
294
|
-
'Data 3': '20'
|
|
295
|
-
}
|
|
296
|
-
],
|
|
297
|
-
visualizationType: 'Bar',
|
|
298
|
-
validated: 4.23,
|
|
299
|
-
dynamicMarginTop: 0
|
|
59
|
+
}
|
|
300
60
|
}
|
|
301
61
|
}
|
|
302
62
|
}
|