td-plots 1.4.1 → 1.5.1

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,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import './plotStyles.scss';
3
+ export type HistogramStatsAnnotation = 'mean' | 'stdev';
3
4
  export type HistogramPlotProps = {
4
5
  data: number[] | Date[];
5
6
  unselectedData?: number[] | Date[];
6
- showMeanLines?: boolean;
7
7
  title?: string;
8
8
  xAxisTitle?: string;
9
9
  barColor?: string;
@@ -16,6 +16,7 @@ export type HistogramPlotProps = {
16
16
  selectByBin?: boolean;
17
17
  dateTickFormat?: string;
18
18
  binSizeOverride?: number;
19
+ statsAnnotations?: HistogramStatsAnnotation[];
19
20
  };
20
21
  export declare const HistogramPlot: (props: HistogramPlotProps) => import("react/jsx-runtime").JSX.Element;
21
22
  export default HistogramPlot;
@@ -1,6 +1,7 @@
1
1
  export declare const isNumberArray: (arr: unknown[]) => arr is number[];
2
2
  export declare const isDateArray: (arr: unknown[]) => arr is Date[];
3
3
  export declare function calculateMean(arr: number[] | Date[]): number | undefined;
4
+ export declare function calculateStandardDeviation(arr: number[] | Date[]): number | undefined;
4
5
  export declare const formatDateMDY: (timestamp: number) => string;
5
6
  export declare const roundToNextDay: (timestamp: number) => string;
6
7
  export declare const roundToPrevDay: (timestamp: number) => string;