@axdspub/axiom-charts 0.0.39 → 0.0.41
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/Libraries/axiom/index.js +2 -2
- package/library/Libraries/axiom/index.js.map +1 -1
- 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/index.js
CHANGED
|
@@ -1799,6 +1799,7 @@ if (process.env.NODE_ENV === 'production') {
|
|
|
1799
1799
|
var jsxRuntimeExports = jsxRuntime.exports;
|
|
1800
1800
|
|
|
1801
1801
|
const AxiomChartComponent = (props) => {
|
|
1802
|
+
var _a;
|
|
1802
1803
|
const chartRef = useRef(null);
|
|
1803
1804
|
const [loaded, setLoaded] = useState(false);
|
|
1804
1805
|
const [loading, setLoading] = useState(false);
|
|
@@ -1846,7 +1847,17 @@ const AxiomChartComponent = (props) => {
|
|
|
1846
1847
|
}
|
|
1847
1848
|
}, [chart]);
|
|
1848
1849
|
const w = props.settings.width === 'auto' ? '100%' : `${props.settings.width}px`;
|
|
1849
|
-
|
|
1850
|
+
let style = {};
|
|
1851
|
+
if (props.settings.layout === 'radial') {
|
|
1852
|
+
const rect = (_a = chartRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
1853
|
+
if (rect !== undefined) {
|
|
1854
|
+
style = { width: w, height: `${Math.min(rect.width, props.settings.height)}px` };
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1857
|
+
else {
|
|
1858
|
+
style = { width: w, height: `${props.settings.height}px` };
|
|
1859
|
+
}
|
|
1860
|
+
return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [error !== undefined ? jsxRuntimeExports.jsx("p", { children: error }) : '', jsxRuntimeExports.jsx("div", { className: "chart relative", style: style, ref: chartRef })] }));
|
|
1850
1861
|
};
|
|
1851
1862
|
|
|
1852
1863
|
const Popup = ({ plotScrubs, chartSettings, axis, followCursor, children }) => {
|