@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.
- package/dist/charts.js +4 -3
- package/dist/charts.js.map +1 -1
- package/dist/charts.modern.module.js +4 -3
- package/dist/charts.modern.module.js.map +1 -1
- package/dist/charts.umd.js +456 -491
- package/dist/charts.umd.js.map +1 -1
- package/package.json +5 -5
- package/src/components/CarbonChart/CarbonChart.test.js +71 -0
- package/src/components/CarbonChart/CarbonChart.tsx +25 -21
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
|
|
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
|
-
} }) }), (
|
|
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)
|