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