@axdspub/axiom-charts 0.0.40 → 0.0.42
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/library/browser.js +12 -1
- package/library/browser.js.map +1 -1
- package/library/cjs.js +12 -1
- package/library/cjs.js.map +1 -1
- package/library/index.js +12 -1
- package/library/index.js.map +1 -1
- package/package.json +1 -1
package/library/browser.js
CHANGED
|
@@ -1797,6 +1797,7 @@ var AxiomCharts = (function (exports, axiomUiDataServices, d3Array, _, require$$
|
|
|
1797
1797
|
var jsxRuntimeExports = jsxRuntime.exports;
|
|
1798
1798
|
|
|
1799
1799
|
const AxiomChartComponent = (props) => {
|
|
1800
|
+
var _a;
|
|
1800
1801
|
const chartRef = require$$0.useRef(null);
|
|
1801
1802
|
const [loaded, setLoaded] = require$$0.useState(false);
|
|
1802
1803
|
const [loading, setLoading] = require$$0.useState(false);
|
|
@@ -1844,7 +1845,17 @@ var AxiomCharts = (function (exports, axiomUiDataServices, d3Array, _, require$$
|
|
|
1844
1845
|
}
|
|
1845
1846
|
}, [chart]);
|
|
1846
1847
|
const w = props.settings.width === 'auto' ? '100%' : `${props.settings.width}px`;
|
|
1847
|
-
|
|
1848
|
+
let style = {};
|
|
1849
|
+
if (props.settings.layout === 'radial') {
|
|
1850
|
+
const rect = (_a = chartRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
1851
|
+
if (rect !== undefined) {
|
|
1852
|
+
style = { width: w, height: `${Math.min(rect.width, props.settings.height)}px` };
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1855
|
+
else {
|
|
1856
|
+
style = { width: w, height: `${props.settings.height}px` };
|
|
1857
|
+
}
|
|
1858
|
+
return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [error !== undefined ? jsxRuntimeExports.jsx("p", { children: error }) : '', jsxRuntimeExports.jsx("div", { className: "chart relative overflow-hidden", style: style, ref: chartRef })] }));
|
|
1848
1859
|
};
|
|
1849
1860
|
|
|
1850
1861
|
const Popup = ({ plotScrubs, chartSettings, axis, followCursor, children }) => {
|