@cdc/chart 4.26.5 → 4.26.6

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.
Files changed (91) hide show
  1. package/CONFIG.md +12 -8
  2. package/dist/{cdcchart-DQ00cQCm.es.js → cdcchart-BWVIUcAF.es.js} +5 -55
  3. package/dist/cdcchart.js +34093 -32767
  4. package/examples/feature/heatmap/average-age-categorical.json +1 -1
  5. package/examples/feature/heatmap/calendar-heatmap.json +1 -1
  6. package/examples/feature/heatmap/sparse-aggregation.json +1 -1
  7. package/examples/private/bad-y-axis.json +543 -0
  8. package/examples/private/bar-chart-negative-value.json +455 -0
  9. package/package.json +3 -3
  10. package/src/CdcChart.tsx +5 -4
  11. package/src/CdcChartComponent.tsx +32 -9
  12. package/src/_stories/Chart.SeriesColorAssignments.stories.tsx +183 -0
  13. package/src/_stories/Chart.YAxisAutoMaxStrategy.stories.tsx +52 -0
  14. package/src/_stories/Chart.YAxisFilterDomain.stories.tsx +90 -0
  15. package/src/_stories/ChartAnnotation.smoke.stories.tsx +10 -0
  16. package/src/_stories/_mock/annotation_event-line_mock.json +1064 -0
  17. package/src/_stories/_mock/heatmap-average-age-categorical.json +1 -1
  18. package/src/_stories/_mock/heatmap.json +1 -1
  19. package/src/components/Annotations/components/AnnotationDraggable.styles.css +22 -1
  20. package/src/components/Annotations/components/AnnotationDraggable.tsx +219 -119
  21. package/src/components/Annotations/tests/AnnotationDraggable.test.tsx +198 -0
  22. package/src/components/Axis/LeftAxis.tsx +3 -0
  23. package/src/components/Axis/LeftAxisGridlines.tsx +8 -1
  24. package/src/components/Axis/RightAxis.tsx +3 -0
  25. package/src/components/Axis/tests/AxisTickValues.test.tsx +86 -0
  26. package/src/components/EditorPanel/EditorPanel.tsx +367 -136
  27. package/src/components/EditorPanel/components/Panels/Panel.Annotate.tsx +101 -52
  28. package/src/components/EditorPanel/components/Panels/Panel.SmallMultiples.test.tsx +98 -0
  29. package/src/components/EditorPanel/components/Panels/Panel.SmallMultiples.tsx +10 -0
  30. package/src/components/EditorPanel/components/Panels/Panel.Visual.test.tsx +484 -0
  31. package/src/components/EditorPanel/components/Panels/Panel.Visual.tsx +3 -0
  32. package/src/components/EditorPanel/components/Panels/SeriesColorAssignments.tsx +262 -0
  33. package/src/components/EditorPanel/components/Panels/panelVisual.styles.css +32 -0
  34. package/src/components/EditorPanel/components/panels.scss +10 -0
  35. package/src/components/EditorPanel/editor-panel.scss +47 -0
  36. package/src/components/EditorPanel/helpers/getVisualizationTypeConfigUpdate.ts +6 -2
  37. package/src/components/EditorPanel/helpers/tests/getVisualizationTypeConfigUpdate.test.ts +20 -2
  38. package/src/components/EditorPanel/useEditorPermissions.test.tsx +256 -11
  39. package/src/components/EditorPanel/useEditorPermissions.ts +41 -5
  40. package/src/components/HeatMap/components/HeatMap.tsx +22 -17
  41. package/src/components/HeatMap/components/HeatMapGradientLegend.tsx +29 -15
  42. package/src/components/HeatMap/heatmap.css +15 -1
  43. package/src/components/HeatMap/tests/HeatMap.test.tsx +39 -7
  44. package/src/components/Legend/Legend.Component.tsx +2 -2
  45. package/src/components/Legend/helpers/createFormatLabels.test.ts +88 -0
  46. package/src/components/Legend/helpers/createFormatLabels.tsx +6 -1
  47. package/src/components/LineChart/helpers.test.ts +230 -1
  48. package/src/components/LineChart/helpers.ts +26 -13
  49. package/src/components/LineChart/index.tsx +21 -4
  50. package/src/components/LinearChart/tests/LinearChart.test.tsx +30 -0
  51. package/src/components/LinearChart.tsx +50 -15
  52. package/src/components/ScatterPlot/ScatterPlot.jsx +3 -3
  53. package/src/components/SmallMultiples/SmallMultipleTile.tsx +3 -0
  54. package/src/components/SmallMultiples/SmallMultiples.tsx +38 -9
  55. package/src/components/SmallMultiples/tests/SmallMultiples.test.tsx +170 -0
  56. package/src/data/initial-state.js +1 -0
  57. package/src/helpers/calculateLeftYAxisWidth.ts +9 -3
  58. package/src/helpers/colorAssignmentHelpers.ts +102 -0
  59. package/src/helpers/dataHelpers.ts +11 -1
  60. package/src/helpers/getAxisMaxOverride.ts +16 -0
  61. package/src/helpers/getCleanTopTickMax.ts +64 -0
  62. package/src/helpers/getColorScale.ts +18 -9
  63. package/src/helpers/getHasBoundarySuppression.ts +26 -0
  64. package/src/helpers/getMinMax.ts +24 -22
  65. package/src/helpers/getYAxisDomainData.ts +38 -0
  66. package/src/helpers/getYAxisFinalizationEligibility.ts +40 -0
  67. package/src/helpers/hasSpacedInlineLabel.ts +10 -0
  68. package/src/helpers/seriesColumnSettings.ts +5 -4
  69. package/src/helpers/smallMultiplesHelpers.ts +5 -0
  70. package/src/helpers/tests/calculateLeftYAxisWidth.test.ts +38 -0
  71. package/src/helpers/tests/dataHelpers.test.ts +135 -0
  72. package/src/helpers/tests/getAxisMaxOverride.test.ts +36 -0
  73. package/src/helpers/tests/getCleanTopTickMax.test.ts +165 -0
  74. package/src/helpers/tests/getColorScale.test.ts +197 -0
  75. package/src/helpers/tests/getMinMax.test.ts +211 -0
  76. package/src/helpers/tests/getYAxisDomainData.test.ts +119 -0
  77. package/src/helpers/tests/getYAxisFinalizationEligibility.test.ts +185 -0
  78. package/src/helpers/tests/{getYAxisAutoPaddingMode.test.ts → hasSpacedInlineLabel.test.ts} +17 -32
  79. package/src/helpers/tests/seriesColumnSettings.test.ts +16 -2
  80. package/src/helpers/tests/smallMultiplesHelpers.test.ts +99 -0
  81. package/src/hooks/tests/useRightAxis.test.tsx +127 -0
  82. package/src/hooks/tests/useScales.test.tsx +307 -29
  83. package/src/hooks/useRightAxis.ts +30 -13
  84. package/src/hooks/useScales.ts +45 -28
  85. package/src/hooks/useTooltip.tsx +3 -1
  86. package/src/test/CdcChart.dataTable.test.tsx +122 -0
  87. package/src/types/ChartConfig.ts +6 -1
  88. package/src/types/ChartContext.ts +3 -0
  89. package/src/helpers/getYAxisAutoPadding.ts +0 -55
  90. package/src/helpers/getYAxisAutoPaddingMode.ts +0 -17
  91. package/src/helpers/tests/getYAxisAutoPadding.test.ts +0 -37
@@ -0,0 +1,484 @@
1
+ import React from 'react'
2
+ import { Accordion } from 'react-accessible-accordion'
3
+ import { fireEvent, render, screen, waitFor, within } from '@testing-library/react'
4
+ import { describe, expect, it, vi } from 'vitest'
5
+ import ConfigContext from '../../../../ConfigContext'
6
+ import EditorPanelContext from '../../EditorPanelContext'
7
+ import PanelVisual from './Panel.Visual'
8
+ import { createMockChartContext, createMockConfig } from '../../../LinearChart/tests/mockConfigContext'
9
+ import { ChartConfig } from '../../../../types/ChartConfig'
10
+
11
+ vi.mock('@cdc/core/hooks/useColorPalette', () => ({
12
+ useColorPalette: () => ({
13
+ twoColorPalettes: [],
14
+ sequential: [],
15
+ nonSequential: [],
16
+ accessibleColors: []
17
+ })
18
+ }))
19
+
20
+ vi.mock('@cdc/core/components/PaletteSelector', () => ({
21
+ PaletteSelector: () => <div data-testid='palette-selector' />,
22
+ DeveloperPaletteRollback: () => null
23
+ }))
24
+
25
+ vi.mock('@cdc/core/components/HeaderThemeSelector', () => ({
26
+ HeaderThemeSelector: () => null
27
+ }))
28
+
29
+ vi.mock('@cdc/core/components/ui/Icon', () => ({
30
+ default: () => <span data-testid='icon' />
31
+ }))
32
+
33
+ const buildConfig = (overrides: Partial<ChartConfig> = {}) =>
34
+ createMockConfig({
35
+ visualizationType: 'Line',
36
+ visualizationSubType: 'regular',
37
+ general: {
38
+ palette: {
39
+ customColors: ['#111111', '#222222']
40
+ }
41
+ } as any,
42
+ series: [
43
+ { dataKey: 'series_a', name: 'Alpha', type: 'Line' },
44
+ { dataKey: 'series_b', name: 'Beta', type: 'Line' }
45
+ ] as any,
46
+ runtime: {
47
+ ...createMockConfig().runtime,
48
+ seriesKeys: ['series_a', 'series_b'],
49
+ seriesLabels: {
50
+ series_a: 'Alpha',
51
+ series_b: 'Beta'
52
+ },
53
+ seriesLabelsAll: ['Alpha', 'Beta']
54
+ } as any,
55
+ visual: {
56
+ lineDatapointSymbol: 'none',
57
+ verticalHoverLine: false,
58
+ horizontalHoverLine: false
59
+ } as any,
60
+ ...overrides
61
+ })
62
+
63
+ const renderPanel = (
64
+ config: ChartConfig,
65
+ colorPalettes = {
66
+ qualitative_standard: ['#111111', '#222222']
67
+ }
68
+ ) => {
69
+ const updateConfig = vi.fn()
70
+ const renderTree = (panelConfig: ChartConfig) => {
71
+ const context = createMockChartContext(panelConfig, {
72
+ updateConfig,
73
+ colorPalettes,
74
+ twoColorPalette: {
75
+ v2: {}
76
+ }
77
+ } as any)
78
+
79
+ return (
80
+ <ConfigContext.Provider value={context}>
81
+ <EditorPanelContext.Provider
82
+ value={{
83
+ updateField: vi.fn(),
84
+ setLollipopShape: vi.fn(),
85
+ handlePaletteSelection: vi.fn(),
86
+ handleTwoColorPaletteSelection: vi.fn()
87
+ }}
88
+ >
89
+ <Accordion allowZeroExpanded>
90
+ <PanelVisual name='Visual' />
91
+ </Accordion>
92
+ </EditorPanelContext.Provider>
93
+ </ConfigContext.Provider>
94
+ )
95
+ }
96
+
97
+ const view = render(renderTree(config))
98
+
99
+ fireEvent.click(screen.getByRole('button', { name: 'Visual' }))
100
+ return {
101
+ updateConfig,
102
+ rerenderPanel: (newConfig: ChartConfig) => view.rerender(renderTree(newConfig))
103
+ }
104
+ }
105
+
106
+ describe('PanelVisual series color assignments', () => {
107
+ it('seeds assignment rows from current colors when by-value mode is enabled', () => {
108
+ const { updateConfig } = renderPanel(buildConfig())
109
+
110
+ fireEvent.change(screen.getByLabelText('Color Assignment Mode'), { target: { value: 'by-value' } })
111
+
112
+ expect(updateConfig).toHaveBeenCalledWith(
113
+ expect.objectContaining({
114
+ general: expect.objectContaining({
115
+ palette: expect.objectContaining({
116
+ colorAssignmentMode: 'by-value',
117
+ colorAssignments: [
118
+ { key: 'series_a', color: '#111111' },
119
+ { key: 'series_b', color: '#222222' }
120
+ ]
121
+ })
122
+ })
123
+ })
124
+ )
125
+ })
126
+
127
+ it('syncs missing current series assignments while by-value mode is active', async () => {
128
+ const { updateConfig } = renderPanel(
129
+ buildConfig({
130
+ general: {
131
+ palette: {
132
+ customColors: ['#111111', '#222222'],
133
+ colorAssignmentMode: 'by-value',
134
+ colorAssignments: [{ key: 'series_a', color: '#111111' }]
135
+ }
136
+ } as any
137
+ })
138
+ )
139
+
140
+ await waitFor(() => {
141
+ expect(updateConfig).toHaveBeenCalledWith(
142
+ expect.objectContaining({
143
+ general: expect.objectContaining({
144
+ palette: expect.objectContaining({
145
+ colorAssignmentMode: 'by-value',
146
+ colorAssignments: [
147
+ { key: 'series_a', color: '#111111' },
148
+ { key: 'series_b', color: '#222222' }
149
+ ]
150
+ })
151
+ })
152
+ })
153
+ )
154
+ })
155
+ })
156
+
157
+ it('syncs assignments when a new series is added while by-value mode is active', async () => {
158
+ const initialConfig = buildConfig({
159
+ general: {
160
+ palette: {
161
+ customColors: ['#111111', '#222222'],
162
+ colorAssignmentMode: 'by-value',
163
+ colorAssignments: [{ key: 'series_a', color: '#111111' }]
164
+ }
165
+ } as any,
166
+ series: [{ dataKey: 'series_a', name: 'Alpha', type: 'Line' }] as any,
167
+ runtime: {
168
+ ...createMockConfig().runtime,
169
+ seriesKeys: ['series_a'],
170
+ seriesLabels: {
171
+ series_a: 'Alpha'
172
+ },
173
+ seriesLabelsAll: ['Alpha']
174
+ } as any
175
+ })
176
+ const { updateConfig, rerenderPanel } = renderPanel(initialConfig)
177
+
178
+ updateConfig.mockClear()
179
+ rerenderPanel(
180
+ buildConfig({
181
+ general: {
182
+ palette: {
183
+ customColors: ['#111111', '#222222'],
184
+ colorAssignmentMode: 'by-value',
185
+ colorAssignments: [{ key: 'series_a', color: '#111111' }]
186
+ }
187
+ } as any
188
+ })
189
+ )
190
+
191
+ await waitFor(() => {
192
+ expect(updateConfig).toHaveBeenCalledWith(
193
+ expect.objectContaining({
194
+ general: expect.objectContaining({
195
+ palette: expect.objectContaining({
196
+ colorAssignments: [
197
+ { key: 'series_a', color: '#111111' },
198
+ { key: 'series_b', color: '#222222' }
199
+ ]
200
+ })
201
+ })
202
+ })
203
+ )
204
+ })
205
+ })
206
+
207
+ it('updates the color for the matching assignment key and drops stale assignment keys', () => {
208
+ const { updateConfig } = renderPanel(
209
+ buildConfig({
210
+ general: {
211
+ palette: {
212
+ customColors: ['#111111', '#222222'],
213
+ colorAssignmentMode: 'by-value',
214
+ colorAssignments: [
215
+ { key: 'series_a', color: '#111111' },
216
+ { key: 'series_b', color: '#222222' },
217
+ { key: 'stale_series', color: '#333333' }
218
+ ]
219
+ }
220
+ } as any
221
+ })
222
+ )
223
+
224
+ const alphaRow = screen.getByText('Alpha').closest('.series-color-assignments__row') as HTMLElement
225
+ fireEvent.click(within(alphaRow).getByRole('button', { name: 'Color for Alpha' }))
226
+ fireEvent.click(screen.getAllByTitle('#222222').find(element => element.getAttribute('role') === 'option')!)
227
+
228
+ expect(updateConfig).toHaveBeenCalledWith(
229
+ expect.objectContaining({
230
+ general: expect.objectContaining({
231
+ palette: expect.objectContaining({
232
+ colorAssignmentMode: 'by-value',
233
+ colorAssignments: expect.arrayContaining([
234
+ { key: 'series_a', color: '#222222' },
235
+ { key: 'series_b', color: '#222222' }
236
+ ])
237
+ })
238
+ })
239
+ })
240
+ )
241
+ expect(updateConfig.mock.calls[0][0].general.palette.colorAssignments).toHaveLength(2)
242
+ })
243
+
244
+ it('lets assignments choose from the full active palette, not only distributed series colors', () => {
245
+ const fullPalette = [
246
+ '#0057B7',
247
+ '#722161',
248
+ '#00B1CE',
249
+ '#D94E5F',
250
+ '#5A8E3F',
251
+ '#FFB24D',
252
+ '#FB7E38',
253
+ '#032659',
254
+ '#975722'
255
+ ]
256
+ const { updateConfig } = renderPanel(
257
+ buildConfig({
258
+ general: {
259
+ palette: {
260
+ name: 'qualitative_standard',
261
+ version: '2.0',
262
+ colorAssignmentMode: 'by-value',
263
+ colorAssignments: [
264
+ { key: 'series_a', color: '#0057B7' },
265
+ { key: 'series_b', color: '#00B1CE' },
266
+ { key: 'series_c', color: '#5A8E3F' }
267
+ ]
268
+ }
269
+ } as any,
270
+ series: [
271
+ { dataKey: 'series_a', name: 'Alpha', type: 'Line' },
272
+ { dataKey: 'series_b', name: 'Beta', type: 'Line' },
273
+ { dataKey: 'series_c', name: 'Gamma', type: 'Line' }
274
+ ] as any,
275
+ runtime: {
276
+ ...createMockConfig().runtime,
277
+ seriesKeys: ['series_a', 'series_b', 'series_c'],
278
+ seriesLabels: {
279
+ series_a: 'Alpha',
280
+ series_b: 'Beta',
281
+ series_c: 'Gamma'
282
+ },
283
+ seriesLabelsAll: ['Alpha', 'Beta', 'Gamma']
284
+ } as any
285
+ }),
286
+ {
287
+ qualitative_standard: fullPalette
288
+ }
289
+ )
290
+
291
+ const alphaRow = screen.getByText('Alpha').closest('.series-color-assignments__row') as HTMLElement
292
+ fireEvent.click(within(alphaRow).getByRole('button', { name: 'Color for Alpha' }))
293
+ fireEvent.click(screen.getAllByTitle('#722161').find(element => element.getAttribute('role') === 'option')!)
294
+
295
+ expect(updateConfig).toHaveBeenCalledWith(
296
+ expect.objectContaining({
297
+ general: expect.objectContaining({
298
+ palette: expect.objectContaining({
299
+ colorAssignments: expect.arrayContaining([{ key: 'series_a', color: '#722161' }])
300
+ })
301
+ })
302
+ })
303
+ )
304
+ })
305
+
306
+ it('resets assignments when the selected palette changes without custom colors', () => {
307
+ const initialConfig = buildConfig({
308
+ general: {
309
+ palette: {
310
+ name: 'qualitative_standard',
311
+ version: '2.0',
312
+ colorAssignmentMode: 'by-value',
313
+ colorAssignments: [
314
+ { key: 'series_a', color: '#0057B7' },
315
+ { key: 'series_b', color: '#00B1CE' },
316
+ { key: 'stale_series', color: '#333333' }
317
+ ]
318
+ }
319
+ } as any
320
+ })
321
+ const { updateConfig, rerenderPanel } = renderPanel(initialConfig, {
322
+ qualitative_standard: [
323
+ '#0057B7',
324
+ '#722161',
325
+ '#00B1CE',
326
+ '#D94E5F',
327
+ '#5A8E3F',
328
+ '#FFB24D',
329
+ '#FB7E38',
330
+ '#032659',
331
+ '#975722'
332
+ ],
333
+ sequential_blue: [
334
+ '#DBE8F7',
335
+ '#BED5ED',
336
+ '#99BCE1',
337
+ '#73A1D5',
338
+ '#4E88C7',
339
+ '#1E6BC0',
340
+ '#0057B7',
341
+ '#01418D',
342
+ '#032659'
343
+ ]
344
+ })
345
+
346
+ updateConfig.mockClear()
347
+ rerenderPanel(
348
+ buildConfig({
349
+ general: {
350
+ palette: {
351
+ name: 'sequential_blue',
352
+ version: '2.0',
353
+ colorAssignmentMode: 'by-value',
354
+ colorAssignments: [
355
+ { key: 'series_a', color: '#0057B7' },
356
+ { key: 'series_b', color: '#00B1CE' },
357
+ { key: 'stale_series', color: '#333333' }
358
+ ]
359
+ }
360
+ } as any
361
+ })
362
+ )
363
+
364
+ expect(updateConfig).toHaveBeenCalledWith(
365
+ expect.objectContaining({
366
+ general: expect.objectContaining({
367
+ palette: expect.objectContaining({
368
+ colorAssignments: [
369
+ { key: 'series_a', color: '#DBE8F7' },
370
+ { key: 'series_b', color: '#032659' }
371
+ ]
372
+ })
373
+ })
374
+ })
375
+ )
376
+ })
377
+
378
+ it('does not reset assignments when custom colors change', () => {
379
+ const initialConfig = buildConfig({
380
+ general: {
381
+ palette: {
382
+ customColors: ['#111111', '#222222'],
383
+ colorAssignmentMode: 'by-value',
384
+ colorAssignments: [
385
+ { key: 'series_a', color: '#111111' },
386
+ { key: 'series_b', color: '#222222' }
387
+ ]
388
+ }
389
+ } as any
390
+ })
391
+ const { updateConfig, rerenderPanel } = renderPanel(initialConfig)
392
+
393
+ updateConfig.mockClear()
394
+ rerenderPanel(
395
+ buildConfig({
396
+ general: {
397
+ palette: {
398
+ customColors: ['#aaaaaa', '#bbbbbb'],
399
+ colorAssignmentMode: 'by-value',
400
+ colorAssignments: [
401
+ { key: 'series_a', color: '#111111' },
402
+ { key: 'series_b', color: '#222222' }
403
+ ]
404
+ }
405
+ } as any
406
+ })
407
+ )
408
+
409
+ expect(updateConfig).not.toHaveBeenCalled()
410
+ })
411
+
412
+ it('resets assignments when custom colors are removed while by-value mode is active', () => {
413
+ const initialConfig = buildConfig({
414
+ general: {
415
+ palette: {
416
+ name: 'qualitative_standard',
417
+ version: '2.0',
418
+ customColors: ['#111111', '#222222'],
419
+ colorAssignmentMode: 'by-value',
420
+ colorAssignments: [
421
+ { key: 'series_a', color: '#111111' },
422
+ { key: 'series_b', color: '#222222' }
423
+ ]
424
+ }
425
+ } as any
426
+ })
427
+ const { updateConfig, rerenderPanel } = renderPanel(initialConfig, {
428
+ qualitative_standard: [
429
+ '#0057B7',
430
+ '#722161',
431
+ '#00B1CE',
432
+ '#D94E5F',
433
+ '#5A8E3F',
434
+ '#FFB24D',
435
+ '#FB7E38',
436
+ '#032659',
437
+ '#975722'
438
+ ]
439
+ })
440
+
441
+ updateConfig.mockClear()
442
+ rerenderPanel(
443
+ buildConfig({
444
+ general: {
445
+ palette: {
446
+ name: 'qualitative_standard',
447
+ version: '2.0',
448
+ colorAssignmentMode: 'by-value',
449
+ colorAssignments: [
450
+ { key: 'series_a', color: '#111111' },
451
+ { key: 'series_b', color: '#222222' }
452
+ ]
453
+ }
454
+ } as any
455
+ })
456
+ )
457
+
458
+ expect(updateConfig).toHaveBeenCalledWith(
459
+ expect.objectContaining({
460
+ general: expect.objectContaining({
461
+ palette: expect.objectContaining({
462
+ colorAssignments: [
463
+ { key: 'series_a', color: '#0057B7' },
464
+ { key: 'series_b', color: '#5A8E3F' }
465
+ ]
466
+ })
467
+ })
468
+ })
469
+ )
470
+ })
471
+
472
+ it('hides assignments for single-series bars colored by category', () => {
473
+ renderPanel(
474
+ buildConfig({
475
+ visualizationType: 'Bar',
476
+ visualizationSubType: 'regular',
477
+ legend: { colorCode: 'category' } as any,
478
+ series: [{ dataKey: 'series_a', name: 'Alpha', type: 'Bar' }] as any
479
+ })
480
+ )
481
+
482
+ expect(screen.queryByLabelText('Color Assignment Mode')).not.toBeInTheDocument()
483
+ })
484
+ })
@@ -32,6 +32,7 @@ import { HeaderThemeSelector } from '@cdc/core/components/HeaderThemeSelector'
32
32
  import { CustomColorsEditor } from '@cdc/core/components/CustomColorsEditor'
33
33
  import StyleTreatmentSection from '@cdc/core/components/EditorPanel/sections/StyleTreatmentSection'
34
34
  import { getColorScale } from '../../../../helpers/getColorScale'
35
+ import SeriesColorAssignments from './SeriesColorAssignments'
35
36
  import { ENABLE_CHART_MAP_TP5_TREATMENT_SELECTION, ENABLE_CHART_VISUAL_SETTINGS } from '@cdc/core/helpers/constants'
36
37
  import '@cdc/core/components/EditorPanel/editor.scss'
37
38
  import './panelVisual.styles.css'
@@ -457,6 +458,8 @@ const PanelVisual: FC<PanelProps> = props => {
457
458
  )}
458
459
  </>
459
460
  )}
461
+
462
+ <SeriesColorAssignments config={config} updateConfig={updateConfig} colorPalettes={colorPalettes} />
460
463
  </>
461
464
  )}
462
465
  {config.visualizationType === 'Sankey' && (