@react-magma/charts 15.0.1-v6-next.0 → 15.0.1-v6-next.1

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/charts.js CHANGED
@@ -3069,14 +3069,15 @@ var CarbonChart = React__namespace.forwardRef(function (props, ref) {
3069
3069
  theme.chartColorsInverse,
3070
3070
  isInverse,
3071
3071
  ]);
3072
- var newOptions = __assign(__assign(__assign({}, options), { theme: isInverse ? ChartTheme.G100 : ChartTheme.WHITE, color: {
3072
+ var hasChartToolbar = Boolean(chartToolbar);
3073
+ var newOptions = React__namespace.useMemo(function () { return (__assign(__assign(__assign({}, options), { theme: isInverse ? ChartTheme.G100 : ChartTheme.WHITE, color: {
3073
3074
  scale: colorScale,
3074
3075
  }, tooltip: __assign(__assign({}, ((options === null || options === void 0 ? void 0 : options.tooltip) || {})), { truncation: {
3075
3076
  type: 'none',
3076
- } }) }), (chartToolbar
3077
+ } }) }), (hasChartToolbar
3077
3078
  ? __assign({ toolbar: { enabled: false }, title: chartTitle }, (options.fileDownload
3078
3079
  ? {}
3079
- : { fileDownload: { fileName: chartTitle } })) : {}));
3080
+ : { fileDownload: { fileName: chartTitle } })) : {}))); }, [options, isInverse, colorScale, hasChartToolbar, chartTitle]);
3080
3081
  var ChartType = ALL_CHARTS[type];
3081
3082
  React__namespace.useEffect(function () {
3082
3083
  if (!ariaLabel)