@cdc/chart 4.23.7 → 4.23.9
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 +28341 -27278
- package/examples/feature/__data__/area-chart-date-apple.json +5122 -0
- package/examples/feature/__data__/city-temperature.json +2198 -0
- package/examples/feature/area/area-chart-category.json +45 -45
- package/examples/feature/area/area-chart-date-apple.json +10376 -0
- package/examples/feature/area/area-chart-date-city-temperature.json +4528 -0
- package/examples/feature/area/area-chart-date.json +111 -3
- package/examples/feature/forest-plot/broken.json +700 -0
- package/examples/feature/forest-plot/data.csv +24 -0
- package/examples/feature/forest-plot/forest-plot.json +717 -0
- package/examples/feature/pie/planet-pie-example-config.json +1 -1
- package/index.html +28 -8
- package/package.json +4 -3
- package/src/CdcChart.jsx +24 -14
- package/src/components/AreaChart.jsx +84 -59
- package/src/components/BarChart.Horizontal.jsx +251 -0
- package/src/components/BarChart.StackedHorizontal.jsx +118 -0
- package/src/components/BarChart.StackedVertical.jsx +95 -0
- package/src/components/BarChart.Vertical.jsx +204 -0
- package/src/components/BarChart.jsx +14 -674
- package/src/components/BarChartType.jsx +15 -0
- package/src/components/BrushHandle.jsx +17 -0
- package/src/components/DataTable.jsx +185 -23
- package/src/components/EditorPanel.jsx +361 -305
- package/src/components/ForestPlot.jsx +191 -0
- package/src/components/ForestPlotSettings.jsx +508 -0
- package/src/components/Legend.jsx +11 -3
- package/src/components/LineChart.jsx +2 -2
- package/src/components/LinearChart.jsx +115 -310
- package/src/data/initial-state.js +47 -1
- package/src/hooks/useBarChart.js +186 -0
- package/src/hooks/useEditorPermissions.js +218 -0
- package/src/hooks/useLegendClasses.js +14 -11
- package/src/hooks/useMinMax.js +15 -3
- package/src/hooks/useReduceData.js +2 -2
- package/src/hooks/useScales.js +46 -3
- package/src/hooks/useTooltip.jsx +407 -0
- package/src/scss/legend.scss +206 -0
- package/src/scss/main.scss +26 -12
|
@@ -21,6 +21,9 @@ import { useFilters } from '@cdc/core/components/Filters'
|
|
|
21
21
|
import Series from './Series'
|
|
22
22
|
import { useHighlightedBars } from '../hooks/useHighlightedBars'
|
|
23
23
|
|
|
24
|
+
import ForestPlotSettings from './ForestPlotSettings'
|
|
25
|
+
import { useEditorPermissions } from '../hooks/useEditorPermissions'
|
|
26
|
+
|
|
24
27
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
25
28
|
const TextField = memo(({ label, tooltip, section = null, subsection = null, fieldName, updateField, value: stateValue, type = 'input', i = null, min = null, ...attributes }) => {
|
|
26
29
|
const [value, setValue] = useState(stateValue)
|
|
@@ -138,6 +141,7 @@ const Regions = memo(({ config, updateConfig }) => {
|
|
|
138
141
|
updateConfig({ ...config, regions })
|
|
139
142
|
}
|
|
140
143
|
|
|
144
|
+
// only for Regions
|
|
141
145
|
let updateField = (section, subsection, fieldName, value, i) => regionUpdate(fieldName, value, i)
|
|
142
146
|
|
|
143
147
|
let removeColumn = i => {
|
|
@@ -214,6 +218,35 @@ const EditorPanel = () => {
|
|
|
214
218
|
|
|
215
219
|
const { twoColorPalettes, sequential, nonSequential } = useColorPalette(config, updateConfig)
|
|
216
220
|
|
|
221
|
+
const {
|
|
222
|
+
enabledChartTypes,
|
|
223
|
+
visSupportsTooltipLines,
|
|
224
|
+
visSupportsNonSequentialPallete,
|
|
225
|
+
visSupportsSequentialPallete,
|
|
226
|
+
visSupportsReverseColorPalette,
|
|
227
|
+
visHasLabelOnData,
|
|
228
|
+
visHasNumbersOnBars,
|
|
229
|
+
visHasAnchors,
|
|
230
|
+
visHasBarBorders,
|
|
231
|
+
visHasDataCutoff,
|
|
232
|
+
visCanAnimate,
|
|
233
|
+
visHasLegend,
|
|
234
|
+
visSupportsDateCategoryAxisLabel,
|
|
235
|
+
visSupportsDateCategoryAxisLine,
|
|
236
|
+
visSupportsDateCategoryAxisTicks,
|
|
237
|
+
visSupportsDateCategoryTickRotation,
|
|
238
|
+
visSupportsDateCategoryNumTicks,
|
|
239
|
+
visSupportsRegions,
|
|
240
|
+
visSupportsFilters,
|
|
241
|
+
visSupportsValueAxisGridLines,
|
|
242
|
+
visSupportsValueAxisLine,
|
|
243
|
+
visSupportsValueAxisTicks,
|
|
244
|
+
visSupportsValueAxisLabels,
|
|
245
|
+
visSupportsBarSpace,
|
|
246
|
+
visSupportsBarThickness,
|
|
247
|
+
visSupportsDataCutoff
|
|
248
|
+
} = useEditorPermissions()
|
|
249
|
+
|
|
217
250
|
// argument acts as props
|
|
218
251
|
const { handleFilterOrder, filterOrderOptions, filterStyleOptions } = useFilters({ config, setConfig: updateConfig, filteredData: data, setFilteredData })
|
|
219
252
|
|
|
@@ -237,6 +270,11 @@ const EditorPanel = () => {
|
|
|
237
270
|
...config,
|
|
238
271
|
series: newSeries
|
|
239
272
|
})
|
|
273
|
+
|
|
274
|
+
// disable brush if categorical - or - for now if not Area Chart
|
|
275
|
+
if (config.xAxis.type === 'categorical' || config.visualizationType !== 'Area Chart') {
|
|
276
|
+
config.showChartBrush = false
|
|
277
|
+
}
|
|
240
278
|
}, [config.visualizationType]) // eslint-disable-line
|
|
241
279
|
|
|
242
280
|
// Scatter Plots default date/category axis is 'continuous'
|
|
@@ -635,6 +673,16 @@ const EditorPanel = () => {
|
|
|
635
673
|
})
|
|
636
674
|
}, [config.orientation])
|
|
637
675
|
|
|
676
|
+
// Set paired bars to be horizontal, even though that option doesn't display
|
|
677
|
+
useEffect(() => {
|
|
678
|
+
if (config.visualizationType === 'Paired Bar') {
|
|
679
|
+
updateConfig({
|
|
680
|
+
...config,
|
|
681
|
+
orientation: 'horizontal'
|
|
682
|
+
})
|
|
683
|
+
}
|
|
684
|
+
}, []) // eslint-disable-line
|
|
685
|
+
|
|
638
686
|
useEffect(() => {
|
|
639
687
|
if (config.orientation === 'horizontal') {
|
|
640
688
|
updateConfig({
|
|
@@ -644,6 +692,13 @@ const EditorPanel = () => {
|
|
|
644
692
|
}
|
|
645
693
|
}, [config.isLollipopChart, config.lollipopShape]) // eslint-disable-line
|
|
646
694
|
|
|
695
|
+
/// temporary force orientation untill we support Vartical deviaton bar
|
|
696
|
+
useEffect(() => {
|
|
697
|
+
if (config.visualizationType === 'Deviation Bar') {
|
|
698
|
+
updateConfig({ ...config, orientation: 'horizontal' })
|
|
699
|
+
}
|
|
700
|
+
}, [config.visualizationType])
|
|
701
|
+
|
|
647
702
|
const ExclusionsList = useCallback(() => {
|
|
648
703
|
const exclusions = [...config.exclusions.keys]
|
|
649
704
|
return (
|
|
@@ -664,91 +719,6 @@ const EditorPanel = () => {
|
|
|
664
719
|
)
|
|
665
720
|
}, [config]) // eslint-disable-line
|
|
666
721
|
|
|
667
|
-
const visSupportsTooltipLines = () => {
|
|
668
|
-
const chartsWithTooltipGuides = ['Combo', 'Forecasting', 'Area Chart', 'Line', 'Bar']
|
|
669
|
-
if (chartsWithTooltipGuides.includes(config.visualizationType)) return true
|
|
670
|
-
return false
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
const visHasLegend = () => {
|
|
674
|
-
const { visualizationType } = config
|
|
675
|
-
|
|
676
|
-
switch (visualizationType) {
|
|
677
|
-
case 'Box Plot':
|
|
678
|
-
return false
|
|
679
|
-
default:
|
|
680
|
-
return true
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
const visCanAnimate = () => {
|
|
685
|
-
const { visualizationType } = config
|
|
686
|
-
switch (visualizationType) {
|
|
687
|
-
case 'Area Chart':
|
|
688
|
-
return false
|
|
689
|
-
case 'Scatter Plot':
|
|
690
|
-
return false
|
|
691
|
-
case 'Box Plot':
|
|
692
|
-
return false
|
|
693
|
-
default:
|
|
694
|
-
return true
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
const visHasDataCutoff = () => {
|
|
699
|
-
const { visualizationType } = config
|
|
700
|
-
switch (visualizationType) {
|
|
701
|
-
case 'Box Plot':
|
|
702
|
-
return false
|
|
703
|
-
case 'Pie':
|
|
704
|
-
return false
|
|
705
|
-
default:
|
|
706
|
-
return true
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
const visHasLabelOnData = () => {
|
|
711
|
-
const { visualizationType } = config
|
|
712
|
-
switch (visualizationType) {
|
|
713
|
-
case 'Area Chart':
|
|
714
|
-
return false
|
|
715
|
-
case 'Box Plot':
|
|
716
|
-
return false
|
|
717
|
-
case 'Pie':
|
|
718
|
-
return false
|
|
719
|
-
case 'Scatter Plot':
|
|
720
|
-
return false
|
|
721
|
-
default:
|
|
722
|
-
return true
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
const visHasAnchors = () => {
|
|
727
|
-
const { visualizationType } = config
|
|
728
|
-
switch (visualizationType) {
|
|
729
|
-
case 'Area Chart':
|
|
730
|
-
return true
|
|
731
|
-
case 'Combo':
|
|
732
|
-
return true
|
|
733
|
-
case 'Line':
|
|
734
|
-
return true
|
|
735
|
-
case 'Bar':
|
|
736
|
-
return true
|
|
737
|
-
case 'Scatter Plot':
|
|
738
|
-
return true
|
|
739
|
-
default:
|
|
740
|
-
return false
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
const visHasBarBorders = () => {
|
|
745
|
-
const { series, visualizationType } = config
|
|
746
|
-
if (visualizationType === 'Box Plot') return false
|
|
747
|
-
if (visualizationType === 'Scatter Plot') return false
|
|
748
|
-
if (visualizationType === 'Pie') return false
|
|
749
|
-
return series?.some(series => series.type === 'Bar' || series.type === 'Paired Bar' || series.type === 'Deviation Bar')
|
|
750
|
-
}
|
|
751
|
-
|
|
752
722
|
const handleSeriesChange = (idx1, idx2) => {
|
|
753
723
|
let seriesOrder = config.series
|
|
754
724
|
let [movedItem] = seriesOrder.splice(idx1, 1)
|
|
@@ -759,6 +729,9 @@ const EditorPanel = () => {
|
|
|
759
729
|
if (config.isLollipopChart && config?.series?.length > 1) {
|
|
760
730
|
config.runtime.editorErrorMessage = 'Lollipop charts must use only one data series'
|
|
761
731
|
}
|
|
732
|
+
if (config.visualizationType === 'Paired Bar' && config?.series?.length !== 2) {
|
|
733
|
+
config.runtime.editorErrorMessage = 'Paired Bar charts must use exactly two data series'
|
|
734
|
+
}
|
|
762
735
|
|
|
763
736
|
if (config.isLollipopChart && config?.series?.length === 0) {
|
|
764
737
|
config.runtime.editorErrorMessage = 'Add a data series'
|
|
@@ -818,21 +791,6 @@ const EditorPanel = () => {
|
|
|
818
791
|
validateMaxValue()
|
|
819
792
|
}, [minValue, maxValue, config]) // eslint-disable-line
|
|
820
793
|
|
|
821
|
-
// prettier-ignore
|
|
822
|
-
const enabledChartTypes = [
|
|
823
|
-
'Area Chart',
|
|
824
|
-
'Bar',
|
|
825
|
-
'Box Plot',
|
|
826
|
-
'Combo',
|
|
827
|
-
'Deviation Bar',
|
|
828
|
-
'Forecasting',
|
|
829
|
-
'Line',
|
|
830
|
-
'Paired Bar',
|
|
831
|
-
'Pie',
|
|
832
|
-
'Scatter Plot',
|
|
833
|
-
'Spark Line'
|
|
834
|
-
]
|
|
835
|
-
|
|
836
794
|
const isLoadedFromUrl = config?.dataKey?.includes('http://') || config?.dataKey?.includes('https://')
|
|
837
795
|
|
|
838
796
|
// if isDebug = true, then try to set the category and data col to reduce clicking
|
|
@@ -877,7 +835,7 @@ const EditorPanel = () => {
|
|
|
877
835
|
if (config.data && config.series) {
|
|
878
836
|
Object.keys(config.data[0]).map(colName => {
|
|
879
837
|
// OMIT ANY COLUMNS THAT ARE IN DATA SERIES!
|
|
880
|
-
const found = config?.series.some(
|
|
838
|
+
const found = config?.series.some(series => series.dataKey === colName)
|
|
881
839
|
if (colName !== config.xAxis.dataKey && !found) {
|
|
882
840
|
// if not the index then add it
|
|
883
841
|
return columnsOptions.push(
|
|
@@ -953,7 +911,10 @@ const EditorPanel = () => {
|
|
|
953
911
|
dataTable: false,
|
|
954
912
|
tooltips: false,
|
|
955
913
|
prefix: '',
|
|
956
|
-
suffix: ''
|
|
914
|
+
suffix: '',
|
|
915
|
+
forestPlot: false,
|
|
916
|
+
startingPoint: '0',
|
|
917
|
+
forestPlotAlignRight: false
|
|
957
918
|
}
|
|
958
919
|
}
|
|
959
920
|
})
|
|
@@ -1012,6 +973,21 @@ const EditorPanel = () => {
|
|
|
1012
973
|
handleUpdateHighlightedBorderWidth
|
|
1013
974
|
} = useHighlightedBars(config, updateConfig)
|
|
1014
975
|
|
|
976
|
+
const updateSeriesTooltip = (column, event) => {
|
|
977
|
+
console.log('tooltip value', event)
|
|
978
|
+
|
|
979
|
+
let updatedColumns = config.columns
|
|
980
|
+
|
|
981
|
+
updatedColumns[column].tooltips = event
|
|
982
|
+
|
|
983
|
+
console.log('updatedColumns', updatedColumns)
|
|
984
|
+
|
|
985
|
+
updateConfig({
|
|
986
|
+
...config,
|
|
987
|
+
columns: updatedColumns
|
|
988
|
+
})
|
|
989
|
+
}
|
|
990
|
+
|
|
1015
991
|
return (
|
|
1016
992
|
<ErrorBoundary component='EditorPanel'>
|
|
1017
993
|
{config.newViz && <Confirm />}
|
|
@@ -1040,7 +1016,7 @@ const EditorPanel = () => {
|
|
|
1040
1016
|
<Select value={config.roundingStyle || 'standard'} fieldName='roundingStyle' label='rounding style' updateField={updateField} options={['standard', 'shallow', 'finger']} />
|
|
1041
1017
|
)}
|
|
1042
1018
|
{config.visualizationType === 'Bar' && config.orientation === 'horizontal' && <Select value={config.yAxis.labelPlacement || 'Below Bar'} section='yAxis' fieldName='labelPlacement' label='Label Placement' updateField={updateField} options={['Below Bar', 'On Date/Category Axis']} />}
|
|
1043
|
-
{
|
|
1019
|
+
{visHasNumbersOnBars() ? (
|
|
1044
1020
|
<CheckBox value={config.yAxis.displayNumbersOnBar} section='yAxis' fieldName='displayNumbersOnBar' label={config.isLollipopChart ? 'Display Numbers after Bar' : 'Display Numbers on Bar'} updateField={updateField} />
|
|
1045
1021
|
) : (
|
|
1046
1022
|
visHasLabelOnData() && <CheckBox value={config.labels} fieldName='labels' label='Display label on data' updateField={updateField} />
|
|
@@ -1143,7 +1119,8 @@ const EditorPanel = () => {
|
|
|
1143
1119
|
{config.orientation === 'vertical' && <TextField type='number' value={config.heights.vertical} section='heights' fieldName='vertical' label='Chart Height' updateField={updateField} />}
|
|
1144
1120
|
</AccordionItemPanel>
|
|
1145
1121
|
</AccordionItem>
|
|
1146
|
-
{config.visualizationType
|
|
1122
|
+
{config.visualizationType === 'Forest Plot' && <ForestPlotSettings />}
|
|
1123
|
+
{config.visualizationType !== 'Pie' && config.visualizationType !== 'Forest Plot' && (
|
|
1147
1124
|
<AccordionItem>
|
|
1148
1125
|
<AccordionItemHeading>
|
|
1149
1126
|
<AccordionItemButton>Data Series {(!config.series || config.series.length === 0 || (config.visualizationType === 'Paired Bar' && config.series.length < 2)) && <WarningImage width='25' className='warning-icon' />}</AccordionItemButton>
|
|
@@ -1345,7 +1322,7 @@ const EditorPanel = () => {
|
|
|
1345
1322
|
<AccordionItem>
|
|
1346
1323
|
<AccordionItemHeading>
|
|
1347
1324
|
<AccordionItemButton>
|
|
1348
|
-
{config.visualizationType
|
|
1325
|
+
{config.visualizationType === 'Pie' ? 'Data Format' : config.orientation === 'vertical' ? 'Left Value Axis' : 'Value Axis'}
|
|
1349
1326
|
{config.visualizationType === 'Pie' && !config.yAxis.dataKey && <WarningImage width='25' className='warning-icon' />}
|
|
1350
1327
|
</AccordionItemButton>
|
|
1351
1328
|
</AccordionItemHeading>
|
|
@@ -1425,7 +1402,7 @@ const EditorPanel = () => {
|
|
|
1425
1402
|
{/* Hiding this for now, not interested in moving the axis lines away from chart comp. right now. */}
|
|
1426
1403
|
{/* <TextField value={config.yAxis.axisPadding} type='number' max={10} min={0} section='yAxis' fieldName='axisPadding' label={'Axis Padding'} className='number-narrow' updateField={updateField} /> */}
|
|
1427
1404
|
{config.orientation === 'horizontal' && <TextField value={config.xAxis.labelOffset} section='xAxis' fieldName='labelOffset' label='Label offset' type='number' className='number-narrow' updateField={updateField} />}
|
|
1428
|
-
{
|
|
1405
|
+
{visSupportsValueAxisGridLines() && <CheckBox value={config.yAxis.gridLines} section='yAxis' fieldName='gridLines' label='Show Gridlines' updateField={updateField} />}
|
|
1429
1406
|
<CheckBox value={config.yAxis.enablePadding} section='yAxis' fieldName='enablePadding' label='Add Padding to Value Axis Scale' updateField={updateField} />
|
|
1430
1407
|
{config.visualizationSubType === 'regular' && <CheckBox value={config.useLogScale} fieldName='useLogScale' label='use logarithmic scale' updateField={updateField} />}
|
|
1431
1408
|
</>
|
|
@@ -1491,9 +1468,9 @@ const EditorPanel = () => {
|
|
|
1491
1468
|
|
|
1492
1469
|
{config.orientation === 'horizontal' ? ( // horizontal - x is vertical y is horizontal
|
|
1493
1470
|
<>
|
|
1494
|
-
<CheckBox value={config.xAxis.hideAxis} section='xAxis' fieldName='hideAxis' label='Hide Axis' updateField={updateField} />
|
|
1495
|
-
<CheckBox value={config.xAxis.hideLabel} section='xAxis' fieldName='hideLabel' label='Hide Label' updateField={updateField} />
|
|
1496
|
-
<CheckBox value={config.xAxis.hideTicks} section='xAxis' fieldName='hideTicks' label='Hide Ticks' updateField={updateField} />
|
|
1471
|
+
{visSupportsValueAxisLine() && <CheckBox value={config.xAxis.hideAxis} section='xAxis' fieldName='hideAxis' label='Hide Axis' updateField={updateField} />}
|
|
1472
|
+
{visSupportsValueAxisLabels() && <CheckBox value={config.xAxis.hideLabel} section='xAxis' fieldName='hideLabel' label='Hide Label' updateField={updateField} />}
|
|
1473
|
+
{visSupportsValueAxisTicks() && <CheckBox value={config.xAxis.hideTicks} section='xAxis' fieldName='hideTicks' label='Hide Ticks' updateField={updateField} />}
|
|
1497
1474
|
<TextField value={config.xAxis.max} section='xAxis' fieldName='max' label='max value' type='number' placeholder='Auto' updateField={updateField} />
|
|
1498
1475
|
<span style={{ color: 'red', display: 'block' }}>{warningMsg.maxMsg}</span>
|
|
1499
1476
|
<TextField value={config.xAxis.min} section='xAxis' fieldName='min' type='number' label='min value' placeholder='Auto' updateField={updateField} />
|
|
@@ -1839,14 +1816,17 @@ const EditorPanel = () => {
|
|
|
1839
1816
|
<AccordionItem>
|
|
1840
1817
|
<AccordionItemHeading>
|
|
1841
1818
|
<AccordionItemButton>
|
|
1842
|
-
{config.visualizationType
|
|
1819
|
+
{config.visualizationType === 'Pie' ? 'Segments' : 'Date/Category Axis'}
|
|
1843
1820
|
{!config.xAxis.dataKey && <WarningImage width='25' className='warning-icon' />}
|
|
1844
1821
|
</AccordionItemButton>
|
|
1845
1822
|
</AccordionItemHeading>
|
|
1846
1823
|
<AccordionItemPanel>
|
|
1847
1824
|
{config.visualizationType !== 'Pie' && (
|
|
1848
1825
|
<>
|
|
1849
|
-
|
|
1826
|
+
{config.visualizationType !== 'Forest Plot' && (
|
|
1827
|
+
<Select value={config.xAxis.type} section='xAxis' fieldName='type' label='Data Type' updateField={updateField} options={config.visualizationType !== 'Scatter Plot' ? ['categorical', 'date'] : ['categorical', 'continuous', 'date']} />
|
|
1828
|
+
)}
|
|
1829
|
+
<CheckBox value={config.xAxis.sortDates} section='xAxis' fieldName='sortDates' label='Force Date Scale (Sort Dates)' updateField={updateField} />{' '}
|
|
1850
1830
|
<Select
|
|
1851
1831
|
value={config.xAxis.dataKey || setCategoryAxis() || ''}
|
|
1852
1832
|
section='xAxis'
|
|
@@ -2025,7 +2005,8 @@ const EditorPanel = () => {
|
|
|
2025
2005
|
)}
|
|
2026
2006
|
</>
|
|
2027
2007
|
)}
|
|
2028
|
-
|
|
2008
|
+
|
|
2009
|
+
{visSupportsDateCategoryNumTicks() && <TextField value={config.xAxis.numTicks} placeholder='Auto' type='number' min='1' section='xAxis' fieldName='numTicks' label='Number of ticks' className='number-narrow' updateField={updateField} />}
|
|
2029
2010
|
|
|
2030
2011
|
<TextField value={config.xAxis.size} type='number' min='0' section='xAxis' fieldName='size' label={config.orientation === 'horizontal' ? 'Size (Width)' : 'Size (Height)'} className='number-narrow' updateField={updateField} />
|
|
2031
2012
|
|
|
@@ -2039,7 +2020,9 @@ const EditorPanel = () => {
|
|
|
2039
2020
|
</>
|
|
2040
2021
|
)}
|
|
2041
2022
|
{config.orientation === 'vertical' && config.visualizationType !== 'Paired Bar' && <CheckBox value={config.isResponsiveTicks} fieldName='isResponsiveTicks' label='Use Responsive Ticks' updateField={updateField} />}
|
|
2042
|
-
{(config.orientation === 'horizontal' || !config.isResponsiveTicks) &&
|
|
2023
|
+
{(config.orientation === 'horizontal' || !config.isResponsiveTicks) && visSupportsDateCategoryTickRotation() && (
|
|
2024
|
+
<TextField value={config.xAxis.tickRotation} type='number' min='0' section='xAxis' fieldName='tickRotation' label='Tick rotation (Degrees)' className='number-narrow' updateField={updateField} />
|
|
2025
|
+
)}
|
|
2043
2026
|
{config.orientation === 'vertical' && config.isResponsiveTicks && config.visualizationType !== 'Paired Bar' && (
|
|
2044
2027
|
<TextField
|
|
2045
2028
|
value={config.xAxis.maxTickRotation}
|
|
@@ -2065,8 +2048,8 @@ const EditorPanel = () => {
|
|
|
2065
2048
|
|
|
2066
2049
|
{config.orientation === 'horizontal' ? (
|
|
2067
2050
|
<>
|
|
2068
|
-
<CheckBox value={config.yAxis.hideAxis} section='yAxis' fieldName='hideAxis' label='Hide Axis' updateField={updateField} />
|
|
2069
|
-
<CheckBox value={config.yAxis.hideLabel} section='yAxis' fieldName='hideLabel' label='Hide Label' updateField={updateField} />
|
|
2051
|
+
{visSupportsDateCategoryAxisLine() && <CheckBox value={config.yAxis.hideAxis} section='yAxis' fieldName='hideAxis' label='Hide Axis' updateField={updateField} />}
|
|
2052
|
+
{visSupportsDateCategoryAxisLabel() && <CheckBox value={config.yAxis.hideLabel} section='yAxis' fieldName='hideLabel' label='Hide Label' updateField={updateField} />}
|
|
2070
2053
|
</>
|
|
2071
2054
|
) : (
|
|
2072
2055
|
<>
|
|
@@ -2419,7 +2402,7 @@ const EditorPanel = () => {
|
|
|
2419
2402
|
)}
|
|
2420
2403
|
</AccordionItemPanel>
|
|
2421
2404
|
</AccordionItem>
|
|
2422
|
-
{
|
|
2405
|
+
{visSupportsRegions() && (
|
|
2423
2406
|
<AccordionItem>
|
|
2424
2407
|
<AccordionItemHeading>
|
|
2425
2408
|
<AccordionItemButton>Regions</AccordionItemButton>
|
|
@@ -2519,6 +2502,62 @@ const EditorPanel = () => {
|
|
|
2519
2502
|
</label>
|
|
2520
2503
|
</li>
|
|
2521
2504
|
*/}
|
|
2505
|
+
|
|
2506
|
+
{config.visualizationType === 'Forest Plot' && (
|
|
2507
|
+
<>
|
|
2508
|
+
<li>
|
|
2509
|
+
<label className='checkbox'>
|
|
2510
|
+
<input
|
|
2511
|
+
type='checkbox'
|
|
2512
|
+
checked={config.columns[val].forestPlot || false}
|
|
2513
|
+
onChange={event => {
|
|
2514
|
+
editColumn(val, 'forestPlot', event.target.checked)
|
|
2515
|
+
}}
|
|
2516
|
+
/>
|
|
2517
|
+
<span className='edit-label'>Show in Forest Plot</span>
|
|
2518
|
+
</label>
|
|
2519
|
+
</li>
|
|
2520
|
+
<li>
|
|
2521
|
+
<label className='checkbox'>
|
|
2522
|
+
<input
|
|
2523
|
+
type='checkbox'
|
|
2524
|
+
checked={config.columns[val].tooltips || false}
|
|
2525
|
+
onChange={event => {
|
|
2526
|
+
updateSeriesTooltip(val, event.target.checked)
|
|
2527
|
+
}}
|
|
2528
|
+
/>
|
|
2529
|
+
<span className='edit-label'>Show in tooltip</span>
|
|
2530
|
+
</label>
|
|
2531
|
+
</li>
|
|
2532
|
+
<li>
|
|
2533
|
+
<label className='checkbox'>
|
|
2534
|
+
<input
|
|
2535
|
+
type='checkbox'
|
|
2536
|
+
checked={config.columns[val].forestPlotAlignRight || false}
|
|
2537
|
+
onChange={event => {
|
|
2538
|
+
editColumn(val, 'forestPlotAlignRight', event.target.checked)
|
|
2539
|
+
}}
|
|
2540
|
+
/>
|
|
2541
|
+
<span className='edit-label'>Align Right</span>
|
|
2542
|
+
</label>
|
|
2543
|
+
</li>
|
|
2544
|
+
|
|
2545
|
+
{!config.columns[val].forestPlotAlignRight && (
|
|
2546
|
+
<li>
|
|
2547
|
+
<label className='text'>
|
|
2548
|
+
<span className='edit-label'>Forest Plot Starting Point</span>
|
|
2549
|
+
<input
|
|
2550
|
+
type='number'
|
|
2551
|
+
value={config.columns[val].forestPlotStartingPoint || 0}
|
|
2552
|
+
onChange={event => {
|
|
2553
|
+
editColumn(val, 'forestPlotStartingPoint', event.target.value)
|
|
2554
|
+
}}
|
|
2555
|
+
/>
|
|
2556
|
+
</label>
|
|
2557
|
+
</li>
|
|
2558
|
+
)}
|
|
2559
|
+
</>
|
|
2560
|
+
)}
|
|
2522
2561
|
</ul>
|
|
2523
2562
|
</fieldset>
|
|
2524
2563
|
))}
|
|
@@ -2640,26 +2679,34 @@ const EditorPanel = () => {
|
|
|
2640
2679
|
|
|
2641
2680
|
{config.visualizationType !== 'Box Plot' && <CheckBox value={config.legend.showLegendValuesTooltip ? true : false} section='legend' fieldName='showLegendValuesTooltip' label='Show Legend Values in Tooltip' updateField={updateField} />}
|
|
2642
2681
|
|
|
2682
|
+
{config.visualizationType === 'Line' && <CheckBox value={config.legend.lineMode} section='legend' fieldName='lineMode' label='Show Lined Style Legend' updateField={updateField} />}
|
|
2683
|
+
|
|
2643
2684
|
{config.visualizationType === 'Bar' && config.visualizationSubType === 'regular' && config.runtime.seriesKeys.length === 1 && (
|
|
2644
2685
|
<Select value={config.legend.colorCode} section='legend' fieldName='colorCode' label='Color code by category' initial='Select' updateField={updateField} options={getDataValueOptions(data)} />
|
|
2645
2686
|
)}
|
|
2646
2687
|
<Select value={config.legend.behavior} section='legend' fieldName='behavior' label='Legend Behavior (When clicked)' updateField={updateField} options={['highlight', 'isolate']} />
|
|
2647
2688
|
<TextField value={config.legend.label} section='legend' fieldName='label' label='Title' updateField={updateField} />
|
|
2648
2689
|
<Select value={config.legend.position} section='legend' fieldName='position' label='Position' updateField={updateField} options={['right', 'left', 'bottom']} />
|
|
2649
|
-
{config.legend.position === 'bottom' &&
|
|
2690
|
+
{config.legend.position === 'bottom' && (
|
|
2691
|
+
<>
|
|
2692
|
+
<CheckBox value={config.legend.singleRow} section='legend' fieldName='singleRow' label='Single Row Legend' updateField={updateField} />
|
|
2693
|
+
<CheckBox value={config.legend.verticalSorted} section='legend' fieldName='verticalSorted' label='Vertical sorted Legend' updateField={updateField} />
|
|
2694
|
+
</>
|
|
2695
|
+
)}
|
|
2650
2696
|
<TextField type='textarea' value={config.legend.description} updateField={updateField} section='legend' fieldName='description' label='Legend Description' />
|
|
2651
2697
|
</AccordionItemPanel>
|
|
2652
2698
|
</AccordionItem>
|
|
2653
2699
|
)}
|
|
2654
|
-
|
|
2655
|
-
<
|
|
2656
|
-
<
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2700
|
+
{visSupportsFilters() && (
|
|
2701
|
+
<AccordionItem>
|
|
2702
|
+
<AccordionItemHeading>
|
|
2703
|
+
<AccordionItemButton>Filters</AccordionItemButton>
|
|
2704
|
+
</AccordionItemHeading>
|
|
2705
|
+
<AccordionItemPanel>
|
|
2706
|
+
{config.filters && (
|
|
2707
|
+
<>
|
|
2708
|
+
{/* prettier-ignore */}
|
|
2709
|
+
<Select
|
|
2663
2710
|
value={config.filterBehavior}
|
|
2664
2711
|
fieldName='filterBehavior'
|
|
2665
2712
|
label='Filter Behavior'
|
|
@@ -2676,128 +2723,129 @@ const EditorPanel = () => {
|
|
|
2676
2723
|
</Tooltip>
|
|
2677
2724
|
}
|
|
2678
2725
|
/>
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2726
|
+
<br />
|
|
2727
|
+
</>
|
|
2728
|
+
)}
|
|
2729
|
+
{config.filters && (
|
|
2730
|
+
<ul className='filters-list'>
|
|
2731
|
+
{/* Whether filters should apply onChange or Apply Button */}
|
|
2685
2732
|
|
|
2686
|
-
|
|
2687
|
-
|
|
2733
|
+
{config.filters.map((filter, index) => {
|
|
2734
|
+
if (filter.type === 'url') return <></>
|
|
2688
2735
|
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
}}
|
|
2697
|
-
>
|
|
2698
|
-
Remove
|
|
2699
|
-
</button>
|
|
2700
|
-
<label>
|
|
2701
|
-
<span className='edit-label column-heading'>Filter</span>
|
|
2702
|
-
<select
|
|
2703
|
-
value={filter.columnName}
|
|
2704
|
-
onChange={e => {
|
|
2705
|
-
updateFilterProp('columnName', index, e.target.value)
|
|
2736
|
+
return (
|
|
2737
|
+
<fieldset className='edit-block' key={index}>
|
|
2738
|
+
<button
|
|
2739
|
+
type='button'
|
|
2740
|
+
className='remove-column'
|
|
2741
|
+
onClick={() => {
|
|
2742
|
+
removeFilter(index)
|
|
2706
2743
|
}}
|
|
2707
2744
|
>
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2745
|
+
Remove
|
|
2746
|
+
</button>
|
|
2747
|
+
<label>
|
|
2748
|
+
<span className='edit-label column-heading'>Filter</span>
|
|
2749
|
+
<select
|
|
2750
|
+
value={filter.columnName}
|
|
2751
|
+
onChange={e => {
|
|
2752
|
+
updateFilterProp('columnName', index, e.target.value)
|
|
2753
|
+
}}
|
|
2754
|
+
>
|
|
2755
|
+
<option value=''>- Select Option -</option>
|
|
2756
|
+
{getFilters(true).map((dataKey, index) => (
|
|
2757
|
+
<option value={dataKey} key={index}>
|
|
2758
|
+
{dataKey}
|
|
2759
|
+
</option>
|
|
2760
|
+
))}
|
|
2761
|
+
</select>
|
|
2762
|
+
</label>
|
|
2716
2763
|
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2764
|
+
<label>
|
|
2765
|
+
<span className='edit-showDropdown column-heading'>Show Filter Input</span>
|
|
2766
|
+
<input
|
|
2767
|
+
type='checkbox'
|
|
2768
|
+
checked={filter.showDropdown === undefined ? true : filter.showDropdown}
|
|
2769
|
+
onChange={e => {
|
|
2770
|
+
updateFilterProp('showDropdown', index, e.target.checked)
|
|
2771
|
+
}}
|
|
2772
|
+
/>
|
|
2773
|
+
</label>
|
|
2727
2774
|
|
|
2728
|
-
|
|
2729
|
-
|
|
2775
|
+
<label>
|
|
2776
|
+
<span className='edit-label column-heading'>Filter Style</span>
|
|
2730
2777
|
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2778
|
+
<select
|
|
2779
|
+
value={filter.filterStyle}
|
|
2780
|
+
onChange={e => {
|
|
2781
|
+
updateFilterProp('filterStyle', index, e.target.value)
|
|
2782
|
+
}}
|
|
2783
|
+
>
|
|
2784
|
+
{filterStyleOptions.map(item => {
|
|
2785
|
+
return <option value={item}>{item}</option>
|
|
2786
|
+
})}
|
|
2787
|
+
</select>
|
|
2788
|
+
</label>
|
|
2789
|
+
<label>
|
|
2790
|
+
<span className='edit-label column-heading'>Label</span>
|
|
2791
|
+
<input
|
|
2792
|
+
type='text'
|
|
2793
|
+
value={filter.label}
|
|
2794
|
+
onChange={e => {
|
|
2795
|
+
updateFilterProp('label', index, e.target.value)
|
|
2796
|
+
}}
|
|
2797
|
+
/>
|
|
2798
|
+
</label>
|
|
2752
2799
|
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2800
|
+
<label>
|
|
2801
|
+
<span className='edit-filterOrder column-heading'>Filter Order</span>
|
|
2802
|
+
<select value={filter.order ? filter.order : 'asc'} onChange={e => updateFilterProp('order', index, e.target.value)}>
|
|
2803
|
+
{filterOrderOptions.map((option, index) => {
|
|
2804
|
+
return (
|
|
2805
|
+
<option value={option.value} key={`filter-${index}`}>
|
|
2806
|
+
{option.label}
|
|
2807
|
+
</option>
|
|
2808
|
+
)
|
|
2809
|
+
})}
|
|
2810
|
+
</select>
|
|
2764
2811
|
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2812
|
+
{filter.order === 'cust' && (
|
|
2813
|
+
<DragDropContext onDragEnd={({ source, destination }) => handleFilterOrder(source.index, destination.index, index, config.filters[index])}>
|
|
2814
|
+
<Droppable droppableId='filter_order'>
|
|
2815
|
+
{provided => (
|
|
2816
|
+
<ul {...provided.droppableProps} className='sort-list' ref={provided.innerRef} style={{ marginTop: '1em' }}>
|
|
2817
|
+
{config.filters[index]?.values.map((value, index) => {
|
|
2818
|
+
return (
|
|
2819
|
+
<Draggable key={value} draggableId={`draggableFilter-${value}`} index={index}>
|
|
2820
|
+
{(provided, snapshot) => (
|
|
2821
|
+
<li>
|
|
2822
|
+
<div className={snapshot.isDragging ? 'currently-dragging' : ''} style={getItemStyle(snapshot.isDragging, provided.draggableProps.style, sortableItemStyles)} ref={provided.innerRef} {...provided.draggableProps} {...provided.dragHandleProps}>
|
|
2823
|
+
{value}
|
|
2824
|
+
</div>
|
|
2825
|
+
</li>
|
|
2826
|
+
)}
|
|
2827
|
+
</Draggable>
|
|
2828
|
+
)
|
|
2829
|
+
})}
|
|
2830
|
+
{provided.placeholder}
|
|
2831
|
+
</ul>
|
|
2832
|
+
)}
|
|
2833
|
+
</Droppable>
|
|
2834
|
+
</DragDropContext>
|
|
2835
|
+
)}
|
|
2836
|
+
</label>
|
|
2837
|
+
</fieldset>
|
|
2838
|
+
)
|
|
2839
|
+
})}
|
|
2840
|
+
</ul>
|
|
2841
|
+
)}
|
|
2842
|
+
{!config.filters && <p style={{ textAlign: 'center' }}>There are currently no filters.</p>}
|
|
2843
|
+
<button type='button' onClick={addNewFilter} className='btn full-width'>
|
|
2844
|
+
Add Filter
|
|
2845
|
+
</button>
|
|
2846
|
+
</AccordionItemPanel>
|
|
2847
|
+
</AccordionItem>
|
|
2848
|
+
)}
|
|
2801
2849
|
<AccordionItem>
|
|
2802
2850
|
<AccordionItemHeading>
|
|
2803
2851
|
<AccordionItemButton>Visual</AccordionItemButton>
|
|
@@ -2863,77 +2911,85 @@ const EditorPanel = () => {
|
|
|
2863
2911
|
))}
|
|
2864
2912
|
</ul>
|
|
2865
2913
|
</label>
|
|
2866
|
-
<label>
|
|
2867
|
-
<span className='edit-label'>Chart Color Palette</span>
|
|
2868
|
-
</label>
|
|
2869
2914
|
{/* eslint-enable */}
|
|
2870
|
-
{
|
|
2915
|
+
{(visSupportsNonSequentialPallete() || visSupportsNonSequentialPallete()) && (
|
|
2871
2916
|
<>
|
|
2872
|
-
<
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2917
|
+
<label>
|
|
2918
|
+
<span className='edit-label'>Chart Color Palette</span>
|
|
2919
|
+
</label>
|
|
2920
|
+
{visSupportsReverseColorPalette() && <InputToggle fieldName='isPaletteReversed' size='small' label='Use selected palette in reverse order' updateField={updateField} value={config.isPaletteReversed} />}
|
|
2921
|
+
{visSupportsSequentialPallete() && (
|
|
2922
|
+
<>
|
|
2923
|
+
<span>Sequential</span>
|
|
2924
|
+
<ul className='color-palette'>
|
|
2925
|
+
{sequential.map(palette => {
|
|
2926
|
+
const colorOne = {
|
|
2927
|
+
backgroundColor: colorPalettes[palette][2]
|
|
2928
|
+
}
|
|
2879
2929
|
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2930
|
+
const colorTwo = {
|
|
2931
|
+
backgroundColor: colorPalettes[palette][3]
|
|
2932
|
+
}
|
|
2883
2933
|
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2934
|
+
const colorThree = {
|
|
2935
|
+
backgroundColor: colorPalettes[palette][5]
|
|
2936
|
+
}
|
|
2887
2937
|
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2938
|
+
return (
|
|
2939
|
+
<button
|
|
2940
|
+
title={palette}
|
|
2941
|
+
key={palette}
|
|
2942
|
+
onClick={e => {
|
|
2943
|
+
e.preventDefault()
|
|
2944
|
+
updateConfig({ ...config, palette })
|
|
2945
|
+
}}
|
|
2946
|
+
className={config.palette === palette ? 'selected' : ''}
|
|
2947
|
+
>
|
|
2948
|
+
<span style={colorOne}></span>
|
|
2949
|
+
<span style={colorTwo}></span>
|
|
2950
|
+
<span style={colorThree}></span>
|
|
2951
|
+
</button>
|
|
2952
|
+
)
|
|
2953
|
+
})}
|
|
2954
|
+
</ul>
|
|
2955
|
+
</>
|
|
2956
|
+
)}
|
|
2957
|
+
{visSupportsNonSequentialPallete() && (
|
|
2958
|
+
<>
|
|
2959
|
+
<span>Non-Sequential</span>
|
|
2960
|
+
<ul className='color-palette'>
|
|
2961
|
+
{nonSequential.map(palette => {
|
|
2962
|
+
const colorOne = {
|
|
2963
|
+
backgroundColor: colorPalettes[palette][2]
|
|
2964
|
+
}
|
|
2911
2965
|
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2966
|
+
const colorTwo = {
|
|
2967
|
+
backgroundColor: colorPalettes[palette][4]
|
|
2968
|
+
}
|
|
2915
2969
|
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2970
|
+
const colorThree = {
|
|
2971
|
+
backgroundColor: colorPalettes[palette][6]
|
|
2972
|
+
}
|
|
2919
2973
|
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2974
|
+
return (
|
|
2975
|
+
<button
|
|
2976
|
+
title={palette}
|
|
2977
|
+
key={palette}
|
|
2978
|
+
onClick={e => {
|
|
2979
|
+
e.preventDefault()
|
|
2980
|
+
updateConfig({ ...config, palette })
|
|
2981
|
+
}}
|
|
2982
|
+
className={config.palette === palette ? 'selected' : ''}
|
|
2983
|
+
>
|
|
2984
|
+
<span style={colorOne}></span>
|
|
2985
|
+
<span style={colorTwo}></span>
|
|
2986
|
+
<span style={colorThree}></span>
|
|
2987
|
+
</button>
|
|
2988
|
+
)
|
|
2989
|
+
})}
|
|
2990
|
+
</ul>
|
|
2991
|
+
</>
|
|
2992
|
+
)}
|
|
2937
2993
|
</>
|
|
2938
2994
|
)}
|
|
2939
2995
|
{(config.visualizationType === 'Paired Bar' || config.visualizationType === 'Deviation Bar') && (
|
|
@@ -2990,9 +3046,9 @@ const EditorPanel = () => {
|
|
|
2990
3046
|
/>
|
|
2991
3047
|
</>
|
|
2992
3048
|
)}
|
|
2993
|
-
{config.orientation === 'horizontal' && !config.isLollipopChart && config.yAxis.labelPlacement !== 'On Bar' && <TextField type='number' value={config.barHeight || '25'} fieldName='barHeight' label=' Bar Thickness' updateField={updateField} min='15' />}
|
|
3049
|
+
{visSupportsBarThickness() && config.orientation === 'horizontal' && !config.isLollipopChart && config.yAxis.labelPlacement !== 'On Bar' && <TextField type='number' value={config.barHeight || '25'} fieldName='barHeight' label=' Bar Thickness' updateField={updateField} min='15' />}
|
|
2994
3050
|
{((config.visualizationType === 'Bar' && config.orientation !== 'horizontal') || config.visualizationType === 'Combo') && <TextField value={config.barThickness} type='number' fieldName='barThickness' label='Bar Thickness' updateField={updateField} />}
|
|
2995
|
-
{(
|
|
3051
|
+
{visSupportsBarSpace() && <TextField type='number' value={config.barSpace || '15'} fieldName='barSpace' label='Bar Space' updateField={updateField} min='0' />}
|
|
2996
3052
|
{(config.visualizationType === 'Bar' || config.visualizationType === 'Line' || config.visualizationType === 'Combo') && <CheckBox value={config.topAxis.hasLine} section='topAxis' fieldName='hasLine' label='Add Top Axis Line' updateField={updateField} />}
|
|
2997
3053
|
|
|
2998
3054
|
{config.visualizationType === 'Spark Line' && (
|
|
@@ -3127,7 +3183,7 @@ const EditorPanel = () => {
|
|
|
3127
3183
|
{isDashboard && <CheckBox value={config.table.showDataTableLink} section='table' fieldName='showDataTableLink' label='Show Data Table Name & Link' updateField={updateField} />}
|
|
3128
3184
|
{isLoadedFromUrl && <CheckBox value={config.table.showDownloadUrl} section='table' fieldName='showDownloadUrl' label='Show URL to Automatically Updated Data' updateField={updateField} />}
|
|
3129
3185
|
<CheckBox value={config.table.download} section='table' fieldName='download' label='Show Download CSV Link' updateField={updateField} />
|
|
3130
|
-
|
|
3186
|
+
<CheckBox value={config.table.showDownloadImgButton} section='table' fieldName='showDownloadImgButton' label='Display Image Button' updateField={updateField} />
|
|
3131
3187
|
{/* <CheckBox value={config.table.showDownloadPdfButton} section='table' fieldName='showDownloadPdfButton' label='Display PDF Button' updateField={updateField} /> */}
|
|
3132
3188
|
</AccordionItemPanel>
|
|
3133
3189
|
</AccordionItem>
|