File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -287,8 +287,23 @@ function prepareConfig() {
287287 mergedConfig .events .datapointClick = null ;
288288 }
289289
290+ // Merging highlight area(s) incomplete user configs
291+ if (props .config && hasDeepProperty (props .config , ' chart.highlightArea' )) {
292+ if (Array .isArray (props .config .chart .highlightArea )) {
293+ mergedConfig .chart .highlightArea = props .config .chart .highlightArea
294+ .map (hl => mergeHighlightArea ({
295+ defaultConfig: DEFAULT_CONFIG .chart .highlightArea ,
296+ userConfig: hl
297+ }));
298+ } else {
299+ mergedConfig .chart .highlightArea = mergeHighlightArea ({
300+ defaultConfig: DEFAULT_CONFIG .chart .highlightArea ,
301+ userConfig: props .config .chart .highlightArea
302+ });
303+ }
304+ }
290305 // ----------------------------------------------------------------------------
291-
306+
292307 if (mergedConfig .theme ) {
293308 return {
294309 ... useNestedProp ({
@@ -302,6 +317,13 @@ function prepareConfig() {
302317 }
303318}
304319
320+ function mergeHighlightArea ({ defaultConfig, userConfig }) {
321+ return useNestedProp ({
322+ defaultConfig,
323+ userConfig
324+ });
325+ }
326+
305327const isDataset = computed ({
306328 get () {
307329 return !! props .dataset && props .dataset .length ;
You can’t perform that action at this time.
0 commit comments