@react-magma/charts 15.0.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.
@@ -3048,14 +3048,15 @@ var CarbonChart = React.forwardRef(function (props, ref) {
3048
3048
  theme.chartColorsInverse,
3049
3049
  isInverse,
3050
3050
  ]);
3051
- var newOptions = __assign(__assign(__assign({}, options), { theme: isInverse ? ChartTheme.G100 : ChartTheme.WHITE, color: {
3051
+ var hasChartToolbar = Boolean(chartToolbar);
3052
+ var newOptions = React.useMemo(function () { return (__assign(__assign(__assign({}, options), { theme: isInverse ? ChartTheme.G100 : ChartTheme.WHITE, color: {
3052
3053
  scale: colorScale,
3053
3054
  }, tooltip: __assign(__assign({}, ((options === null || options === void 0 ? void 0 : options.tooltip) || {})), { truncation: {
3054
3055
  type: 'none',
3055
- } }) }), (chartToolbar
3056
+ } }) }), (hasChartToolbar
3056
3057
  ? __assign({ toolbar: { enabled: false }, title: chartTitle }, (options.fileDownload
3057
3058
  ? {}
3058
- : { fileDownload: { fileName: chartTitle } })) : {}));
3059
+ : { fileDownload: { fileName: chartTitle } })) : {}))); }, [options, isInverse, colorScale, hasChartToolbar, chartTitle]);
3059
3060
  var ChartType = ALL_CHARTS[type];
3060
3061
  React.useEffect(function () {
3061
3062
  if (!ariaLabel)