zeonailabs-reactlib 1.0.1 → 1.0.3

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.
@@ -1,4 +1,6 @@
1
1
  import React from 'react';
2
+ import { ChartMargin } from '../chartMargin';
3
+ import { AxisValueFormatter } from '../chartFormat';
2
4
  export interface AreaChartSeries {
3
5
  data: number[];
4
6
  label?: string;
@@ -14,6 +16,8 @@ export interface AreaChartProps {
14
16
  height?: number;
15
17
  loading?: boolean;
16
18
  showMarks?: boolean;
19
+ margin?: ChartMargin;
20
+ valueFormatter?: AxisValueFormatter;
17
21
  }
18
22
  declare const AreaChart: React.FC<AreaChartProps>;
19
23
  export default AreaChart;
@@ -1,4 +1,6 @@
1
1
  import React from 'react';
2
+ import { ChartMargin } from '../chartMargin';
3
+ import { AxisValueFormatter } from '../chartFormat';
2
4
  export interface BarChartSeries {
3
5
  data: number[];
4
6
  label?: string;
@@ -14,6 +16,8 @@ export interface BarChartProps {
14
16
  width?: number;
15
17
  height?: number;
16
18
  loading?: boolean;
19
+ margin?: ChartMargin;
20
+ valueFormatter?: AxisValueFormatter;
17
21
  }
18
22
  declare const BarChart: React.FC<BarChartProps>;
19
23
  export default BarChart;
@@ -1,4 +1,6 @@
1
1
  import React from 'react';
2
+ import { ChartMargin } from '../chartMargin';
3
+ import { AxisValueFormatter } from '../chartFormat';
2
4
  export interface LineChartSeries {
3
5
  data: number[];
4
6
  label?: string;
@@ -12,6 +14,8 @@ export interface LineChartProps {
12
14
  width?: number;
13
15
  height?: number;
14
16
  loading?: boolean;
17
+ margin?: ChartMargin;
18
+ valueFormatter?: AxisValueFormatter;
15
19
  }
16
20
  declare const LineChart: React.FC<LineChartProps>;
17
21
  export default LineChart;
@@ -1,4 +1,6 @@
1
1
  import React from 'react';
2
+ import { ChartMargin } from '../chartMargin';
3
+ import { AxisValueFormatter } from '../chartFormat';
2
4
  export interface ScatterChartPoint {
3
5
  x: number;
4
6
  y: number;
@@ -16,6 +18,8 @@ export interface ScatterChartProps {
16
18
  width?: number;
17
19
  height?: number;
18
20
  loading?: boolean;
21
+ margin?: ChartMargin;
22
+ valueFormatter?: AxisValueFormatter;
19
23
  }
20
24
  declare const ScatterChart: React.FC<ScatterChartProps>;
21
25
  export default ScatterChart;
@@ -0,0 +1,2 @@
1
+ export declare const compactNumber: (value: unknown) => string;
2
+ export type AxisValueFormatter = (value: unknown) => string;
@@ -0,0 +1,8 @@
1
+ export interface ChartMargin {
2
+ top?: number;
3
+ right?: number;
4
+ bottom?: number;
5
+ left?: number;
6
+ }
7
+ export declare const DEFAULT_CHART_MARGIN: Required<ChartMargin>;
8
+ export declare const resolveMargin: (margin?: ChartMargin) => Required<ChartMargin>;
@@ -0,0 +1,5 @@
1
+ export declare const AXIS_LABEL_SX: {
2
+ readonly '& .MuiChartsAxis-left .MuiChartsAxis-label': {
3
+ readonly translate: "-30px 0";
4
+ };
5
+ };
package/dist/index.d.ts CHANGED
@@ -19,3 +19,7 @@ export { default as GeoPoints } from './components/GeoPoints';
19
19
  export type { GeoPointsProps, GeoPoint } from './components/GeoPoints';
20
20
  export { default as AreaChart } from './components/AreaChart';
21
21
  export type { AreaChartProps, AreaChartSeries } from './components/AreaChart';
22
+ export { DEFAULT_CHART_MARGIN, resolveMargin } from './components/chartMargin';
23
+ export type { ChartMargin } from './components/chartMargin';
24
+ export { compactNumber } from './components/chartFormat';
25
+ export type { AxisValueFormatter } from './components/chartFormat';