@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.
package/dist/charts.js CHANGED
@@ -3059,14 +3059,15 @@ var CarbonChart = React__namespace.forwardRef(function (props, ref) {
3059
3059
  theme.chartColorsInverse,
3060
3060
  isInverse,
3061
3061
  ]);
3062
- var newOptions = __assign(__assign(__assign({}, options), { theme: isInverse ? ChartTheme.G100 : ChartTheme.WHITE, color: {
3062
+ var hasChartToolbar = Boolean(chartToolbar);
3063
+ var newOptions = React__namespace.useMemo(function () { return (__assign(__assign(__assign({}, options), { theme: isInverse ? ChartTheme.G100 : ChartTheme.WHITE, color: {
3063
3064
  scale: colorScale,
3064
3065
  }, tooltip: __assign(__assign({}, ((options === null || options === void 0 ? void 0 : options.tooltip) || {})), { truncation: {
3065
3066
  type: 'none',
3066
- } }) }), (chartToolbar
3067
+ } }) }), (hasChartToolbar
3067
3068
  ? __assign({ toolbar: { enabled: false }, title: chartTitle }, (options.fileDownload
3068
3069
  ? {}
3069
- : { fileDownload: { fileName: chartTitle } })) : {}));
3070
+ : { fileDownload: { fileName: chartTitle } })) : {}))); }, [options, isInverse, colorScale, hasChartToolbar, chartTitle]);
3070
3071
  var ChartType = ALL_CHARTS[type];
3071
3072
  React__namespace.useEffect(function () {
3072
3073
  if (!ariaLabel)