td-plots 1.5.6 → 1.6.0
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/dist/components/Histogram.d.ts +7 -0
- package/dist/components/PlusMinusControl.d.ts +17 -0
- package/dist/components/Utils.d.ts +4 -0
- package/dist/index.esm.js +398 -6084
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +556 -6260
- package/dist/index.js.map +1 -1
- package/package.json +6 -4
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "./plotStyles.scss";
|
|
3
|
+
export type ShowBinSizeControls = "always" | "onHover" | "never";
|
|
3
4
|
export type HistogramStatsAnnotation = "mean" | "stdev";
|
|
4
5
|
export type HistogramPlotProps = {
|
|
5
6
|
data: number[] | Date[];
|
|
@@ -19,6 +20,12 @@ export type HistogramPlotProps = {
|
|
|
19
20
|
statsAnnotations?: HistogramStatsAnnotation[];
|
|
20
21
|
emptySelectedRange?: boolean;
|
|
21
22
|
d3FormatValueString?: string;
|
|
23
|
+
showBinSizeControls?: ShowBinSizeControls;
|
|
24
|
+
onBinSizeCalculated?: (binSize: number | string) => void;
|
|
25
|
+
onBinSizeChange?: (currentBinSize: number) => void;
|
|
26
|
+
showBinSizeControlValue?: boolean;
|
|
27
|
+
isMobile?: boolean;
|
|
28
|
+
settingsTitleStylingOverrides?: React.CSSProperties;
|
|
22
29
|
};
|
|
23
30
|
export declare const HistogramPlot: (props: HistogramPlotProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
31
|
export default HistogramPlot;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type PlusMinusControlProps = {
|
|
3
|
+
value: number;
|
|
4
|
+
onChange: (newValue: number) => void;
|
|
5
|
+
steps: number[];
|
|
6
|
+
defaultValue: number;
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
showValue?: boolean;
|
|
10
|
+
title?: string;
|
|
11
|
+
themeRole?: "primary" | "secondary";
|
|
12
|
+
colorOverride?: string;
|
|
13
|
+
valueLabelFormat?: (value: number) => string;
|
|
14
|
+
titleStylingOverrides?: React.CSSProperties;
|
|
15
|
+
};
|
|
16
|
+
declare const PlusMinusControl: React.FC<PlusMinusControlProps>;
|
|
17
|
+
export default PlusMinusControl;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export declare const ONEAVGMONTH = 2629800000;
|
|
2
|
+
export declare const ONEDAY = 86400000;
|
|
3
|
+
export declare const ONEHOUR = 3600000;
|
|
4
|
+
export declare const ONEMINUTE = 60000;
|
|
1
5
|
export declare const isNumberArray: (arr: unknown[]) => arr is number[];
|
|
2
6
|
export declare const isDateArray: (arr: unknown[]) => arr is Date[];
|
|
3
7
|
export declare function calculateMean(arr: number[] | Date[]): number | undefined;
|