@axdspub/axiom-charts 0.0.28 → 0.0.29
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/axiom-charts.d.ts +8 -2
- package/library/browser.js +5 -0
- package/library/browser.js.map +1 -1
- package/library/cjs.js +5 -0
- package/library/cjs.js.map +1 -1
- package/library/index.js +5 -1
- package/library/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IRequestItemProps, IDataResult, INumericDataAccessor, IRequestItemData, IRequestItemImplementation } from '@axdspub/axiom-ui-data-services';
|
|
2
|
-
import { ReactElement } from 'react';
|
|
2
|
+
import { ReactElement, CSSProperties } from 'react';
|
|
3
3
|
|
|
4
4
|
interface IUnit {
|
|
5
5
|
code: string;
|
|
@@ -241,4 +241,10 @@ declare abstract class RadialChartRoot extends ChartRoot {
|
|
|
241
241
|
|
|
242
242
|
declare const AxiomChartComponent: (props: IChart) => ReactElement;
|
|
243
243
|
|
|
244
|
-
|
|
244
|
+
interface ILegendProps {
|
|
245
|
+
plotLegends: IPlotLegends;
|
|
246
|
+
style?: CSSProperties;
|
|
247
|
+
}
|
|
248
|
+
declare const Legend: ({ plotLegends, style }: ILegendProps) => ReactElement;
|
|
249
|
+
|
|
250
|
+
export { AxiomChartComponent as Chart, ChartRoot, EChartAxes, EPlotTypes, IChart, IChartAxes, IChartAxis, IChartDimension, IChartDimensionAccessor, IChartDimensionDomain, IChartDimensionParameter, IChartDimensions, IChartImplementation, IChartImplementationProps, IChartLibrary, IChartScale, IChartSettings, ILegendItem, INumericRange, INumericScale, IPlot, IPlotAxisSetting, IPlotAxisSettings, IPlotData, IPlotDataAccessors, IPlotDataLoadEvent, IPlotImplementation, IPlotImplementationGroup, IPlotImplementationGroups, IPlotImplementationProps, IPlotLegends, IPlotScrubEvent, IPlotScrubSettings, IPlotScrubs, IPlotStyle, IPlotTypes, Legend, RadialChartRoot };
|
package/library/browser.js
CHANGED
|
@@ -1842,8 +1842,13 @@ var AxiomCharts = (function (exports, axiomUiDataServices, d3Array, lodash, requ
|
|
|
1842
1842
|
return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [error !== undefined ? jsxRuntimeExports.jsx("p", { children: error }) : '', jsxRuntimeExports.jsx("div", { className: "chart relative", style: { width: w, height: `${props.settings.height}px` }, ref: chartRef })] }));
|
|
1843
1843
|
};
|
|
1844
1844
|
|
|
1845
|
+
const Legend = ({ plotLegends, style }) => {
|
|
1846
|
+
return (jsxRuntimeExports.jsx("div", { className: 'flex gap-4 flex-wrap hover:cursor-pointer', style: style, children: Object.entries(plotLegends).map(([plotId, legendItems]) => (jsxRuntimeExports.jsx("div", { className: 'flex gap-4 flex-wrap', children: legendItems.map(item => (jsxRuntimeExports.jsxs("div", { className: 'flex gap-2 items-center', children: [jsxRuntimeExports.jsx("div", { className: 'w-4 h-4 rounded-full', style: item.style }), jsxRuntimeExports.jsx("div", { children: item.label })] }, item.id))) }, plotId))) }));
|
|
1847
|
+
};
|
|
1848
|
+
|
|
1845
1849
|
exports.Chart = AxiomChartComponent;
|
|
1846
1850
|
exports.ChartRoot = ChartRoot;
|
|
1851
|
+
exports.Legend = Legend;
|
|
1847
1852
|
exports.RadialChartRoot = RadialChartRoot;
|
|
1848
1853
|
|
|
1849
1854
|
return exports;
|