@@ -120,9 +120,9 @@ export function InternalCoreChart({
120120 const highchartsOptions : Highcharts . Options = {
121121 ...options ,
122122 // Hide credits by default.
123- credits : { enabled : false , ... options . credits } ,
123+ credits : options . credits ?? { enabled : false } ,
124124 // Hide chart title by default.
125- title : { text : "" , ... options . title } ,
125+ title : options . title ?? { text : "" } ,
126126 // Use Cloudscape color palette by default.
127127 // This cannot be reset to Highcharts' default from the outside, but it is possible to provide custom palette.
128128 colors : options . colors ?? Styles . colors ,
@@ -143,7 +143,6 @@ export function InternalCoreChart({
143143 // if the Highcharts debugger module is loaded.
144144 displayErrors : options . chart ?. displayErrors ?? isDevelopment ,
145145 style : { ...Styles . chartPlotCss , ...options . chart ?. style } ,
146- backgroundColor : options . chart ?. backgroundColor ?? Styles . chartPlotBackgroundColor ,
147146 // We override certain chart events to inject additional behaviors, but it is still possible to define
148147 // custom callbacks. The Cloudscape behaviors can be disabled or altered via components API. For instance,
149148 // if no-data props are not provided - the related on-render computations will be skipped.
@@ -165,7 +164,7 @@ export function InternalCoreChart({
165164 } ,
166165 series : options . series ,
167166 // Highcharts legend is disabled by default in favour of the custom Cloudscape legend.
168- legend : { enabled : false , ... options . legend } ,
167+ legend : options . legend ?? { enabled : false } ,
169168 lang : {
170169 ...options . lang ,
171170 // The default chart title is disabled by default to prevent the default "Chart" in the screen-reader detail.
@@ -175,7 +174,7 @@ export function InternalCoreChart({
175174 description : ariaDescription ,
176175 ...options . accessibility ,
177176 // Highcharts keyboard navigation is disabled by default in favour of the custom Cloudscape navigation.
178- keyboardNavigation : { enabled : ! keyboardNavigation , ... options . accessibility ?. keyboardNavigation } ,
177+ keyboardNavigation : options . accessibility ?. keyboardNavigation ?? { enabled : ! keyboardNavigation } ,
179178 point : {
180179 // Point description formatter is overridden to respect custom axes value formatters.
181180 descriptionFormatter : getFormattedPointDescription ,
0 commit comments