@mesh.ai/rabbit 0.0.26 → 0.0.28

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.
@@ -0,0 +1,19 @@
1
+ import { PropsWithChildren } from 'react';
2
+ interface ChartCardTooltipType {
3
+ xValue?: string;
4
+ yValue?: number;
5
+ tooltipTitle: string;
6
+ xAxisLabel: string;
7
+ yAxisLabel: string;
8
+ legendValue: string;
9
+ legendDarkColor: string;
10
+ legendLightColor: string;
11
+ }
12
+ declare function ChartCardHistogramTooltip({ xValue, yValue, tooltipTitle, xAxisLabel, yAxisLabel, legendValue, legendDarkColor, legendLightColor, }: PropsWithChildren<ChartCardTooltipType>): import("react/jsx-runtime").JSX.Element;
13
+ declare namespace ChartCardHistogramTooltip {
14
+ var defaultProps: {
15
+ xValue: undefined;
16
+ yValue: undefined;
17
+ };
18
+ }
19
+ export default ChartCardHistogramTooltip;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { DownloadRef } from '../../common/hooks/useDownload';
3
+ import { HistogramChartProps } from './types';
4
+ declare const HistogramChart: import("react").ForwardRefExoticComponent<Omit<HistogramChartProps, "height" | "width"> & import("react").RefAttributes<DownloadRef>>;
5
+ export default HistogramChart;
@@ -0,0 +1,29 @@
1
+ export interface HistogramChartProps {
2
+ /** Title name for the tooltip of the chart */
3
+ tooltipTitle: string;
4
+ /** Name of the label to be displayed on Y-Axis of the line chart */
5
+ xAxisLabel: string;
6
+ /** Name of the label to be displayed on Y-Axis of the line chart */
7
+ yAxisLabel: string;
8
+ /** Width of the chart in pixels */
9
+ width: number;
10
+ /** Height of the chart in pixels */
11
+ height: number;
12
+ /** The domain of the histogram. [fromNumber, toNumber] */
13
+ domain?: [number, number];
14
+ /** The number of bins the data would be grouped to. Note: this is an indicating number only. Might differ in actual value. */
15
+ binCount?: number;
16
+ /** Frequency series for the histogram */
17
+ data: number[];
18
+ /** Whether the domain be made into nearest integers. This makes the xAxis adhere to integers. */
19
+ integerBins?: boolean;
20
+ /** Symbol to appended before or after the ticks in xAxis */
21
+ xAxisUnitSymbol?: AxisSymbolType;
22
+ /** Symbol to appended before or after the ticks in yAxis */
23
+ yAxisUnitSymbol?: AxisSymbolType;
24
+ }
25
+ interface AxisSymbolType {
26
+ symbol: string;
27
+ position: 'pre' | 'post';
28
+ }
29
+ export {};
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { LineChartProps, DownloadRef } from './types';
2
+ import { LineChartProps } from './types';
3
+ import { DownloadRef } from '../../common/hooks/useDownload';
3
4
  declare const LineChart: import("react").ForwardRefExoticComponent<Omit<LineChartProps, "height" | "width"> & import("react").RefAttributes<DownloadRef>>;
4
5
  export default LineChart;
@@ -26,7 +26,7 @@ export interface LineChartProps {
26
26
  mode?: 'mini' | 'full';
27
27
  /** Height of the chart in pixels */
28
28
  height: number;
29
- /** width of the chart in pixels */
29
+ /** Width of the chart in pixels */
30
30
  width: number;
31
31
  /** Symbol to appended before or after the ticks in xAxis */
32
32
  xAxisUnitSymbol?: AxisSymbolType;
@@ -51,14 +51,13 @@ export interface LineChartProps {
51
51
  tooltipTitle: string;
52
52
  /** Number of characters post which the data in tooltip will be stacked instead of side-by-side */
53
53
  tooltipStackCharLimit?: number;
54
- /** Domain of x-Axis - The start and end of values for xAxis */
55
- xAxisDomain?: [number, number];
54
+ /** Domain of x-Axis - string values of the band */
55
+ xAxisDomain?: string[];
56
56
  /** Domain of y-Axis - The start and end of values for yAxis */
57
57
  yAxisDomain?: [number, number];
58
58
  /** Should a Line connect if there are missing values */
59
59
  connectNulls?: boolean;
60
- }
61
- export interface DownloadRef {
62
- download(): void;
60
+ /** Maxiumum number of nodes to be shown in `mini` mode */
61
+ maxNodesInMiniMode: number;
63
62
  }
64
63
  export {};
@@ -1,2 +1,3 @@
1
1
  export { default as LineChart } from './charts/LineChart';
2
2
  export { default as SankeyChart } from './charts/SankeyChart';
3
+ export { default as HistogramChart } from './charts/HistogramChart';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mesh.ai/rabbit",
3
3
  "private": false,
4
- "version": "0.0.26",
4
+ "version": "0.0.28",
5
5
  "packageManager": "pnpm@8.6.0",
6
6
  "main": "./dist/@mesh.ai/rabbit.umd.js",
7
7
  "module": "./dist/@mesh.ai/rabbit.es.js ",