@react-magma/charts 13.3.1 → 13.3.2-v4-next.0

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.
@@ -3038,14 +3038,15 @@ var CarbonChart = React.forwardRef(function (props, ref) {
3038
3038
  theme.chartColorsInverse,
3039
3039
  isInverse,
3040
3040
  ]);
3041
- var newOptions = __assign(__assign(__assign({}, options), { theme: isInverse ? ChartTheme.G100 : ChartTheme.WHITE, color: {
3041
+ var hasChartToolbar = Boolean(chartToolbar);
3042
+ var newOptions = React.useMemo(function () { return (__assign(__assign(__assign({}, options), { theme: isInverse ? ChartTheme.G100 : ChartTheme.WHITE, color: {
3042
3043
  scale: colorScale,
3043
3044
  }, tooltip: __assign(__assign({}, ((options === null || options === void 0 ? void 0 : options.tooltip) || {})), { truncation: {
3044
3045
  type: 'none',
3045
- } }) }), (chartToolbar
3046
+ } }) }), (hasChartToolbar
3046
3047
  ? __assign({ toolbar: { enabled: false }, title: chartTitle }, (options.fileDownload
3047
3048
  ? {}
3048
- : { fileDownload: { fileName: chartTitle } })) : {}));
3049
+ : { fileDownload: { fileName: chartTitle } })) : {}))); }, [options, isInverse, colorScale, hasChartToolbar, chartTitle]);
3049
3050
  var ChartType = ALL_CHARTS[type];
3050
3051
  React.useEffect(function () {
3051
3052
  if (!ariaLabel)