@sproutsocial/seeds-react-data-viz 0.2.1 → 0.3.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/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { TimeTicksInfoObject, AxisLabelsFormatterContextObject, Chart, TooltipFormatterContextObject, Options, SeriesSplineOptions, SeriesAreasplineOptions, AxisTickPositionsArray } from 'highcharts';
3
+ import { TimeTicksInfoObject, AxisLabelsFormatterContextObject, Chart, Annotation, TooltipFormatterContextObject, Options, SeriesSplineOptions, SeriesAreasplineOptions, AxisTickPositionsArray } from 'highcharts';
4
4
  import * as _sproutsocial_seeds_react_box from '@sproutsocial/seeds-react-box';
5
5
  import { TypeBoxProps } from '@sproutsocial/seeds-react-box';
6
6
  import { Table } from '@sproutsocial/seeds-react-table';
@@ -38,9 +38,19 @@ type TypeChartYAxisLabelFormatter = ({ y, yValues, }: Readonly<{
38
38
  y: number;
39
39
  yValues: ReadonlyArray<number>;
40
40
  }>) => string;
41
+ type TypeChartXAnnotationsDetails = () => ReactNode;
42
+ type TypeChartXAnnotations = Readonly<{
43
+ [x: number]: Readonly<{
44
+ marker: () => ReactNode;
45
+ details: TypeChartXAnnotationsDetails;
46
+ }>;
47
+ }> | undefined;
41
48
  type TypeChartStyleColor = string;
42
49
  type TypeChartStylePattern = "solid" | "dashed";
43
50
  type TypeChartStyleHasOnClick = boolean;
51
+ interface TypeExtendedChart extends Chart {
52
+ annotations?: Annotation[];
53
+ }
44
54
 
45
55
  type TypeAreaChartProps = Readonly<{
46
56
  data: ReadonlyArray<Readonly<{
@@ -65,6 +75,7 @@ type TypeAreaChartProps = Readonly<{
65
75
  }>) => void;
66
76
  tooltipClickLabel?: ReactNode;
67
77
  timeFormat?: TypeChartTimeFormat;
78
+ xAnnotations?: TypeChartXAnnotations;
68
79
  }>;
69
80
  declare const AreaChart: react.NamedExoticComponent<Readonly<{
70
81
  data: ReadonlyArray<Readonly<{
@@ -89,6 +100,7 @@ declare const AreaChart: react.NamedExoticComponent<Readonly<{
89
100
  }>) => void;
90
101
  tooltipClickLabel?: ReactNode;
91
102
  timeFormat?: TypeChartTimeFormat;
103
+ xAnnotations?: TypeChartXAnnotations;
92
104
  }>>;
93
105
 
94
106
  type TypeLegendLabel = Readonly<{
@@ -277,6 +289,7 @@ type TypeLineChartProps = Readonly<{
277
289
  }>) => void;
278
290
  tooltipClickLabel?: ReactNode;
279
291
  timeFormat?: TypeChartTimeFormat;
292
+ xAnnotations?: TypeChartXAnnotations;
280
293
  }>;
281
294
  declare const LineChart: react.NamedExoticComponent<Readonly<{
282
295
  data: ReadonlyArray<Readonly<{
@@ -300,6 +313,7 @@ declare const LineChart: react.NamedExoticComponent<Readonly<{
300
313
  }>) => void;
301
314
  tooltipClickLabel?: ReactNode;
302
315
  timeFormat?: TypeChartTimeFormat;
316
+ xAnnotations?: TypeChartXAnnotations;
303
317
  }>>;
304
318
 
305
319
  declare const baseChartOptions: Options;
@@ -363,4 +377,4 @@ declare const donutChartStyles: styled_components.FlattenInterpolation<styled_co
363
377
  $colors: ReadonlyArray<TypeChartStyleColor>;
364
378
  }>, any>>;
365
379
 
366
- export { AreaChart, ChartLegend, ChartLegendLabel, ChartTable, ChartTooltip, ChartTooltipFooter, ChartTooltipHeader, ChartTooltipPortal, ChartTooltipTable, ChartTooltipTitle, ColorBox, DONUT_CHART_HALO_SIZE, DONUT_CHART_HEIGHT, DONUT_CHART_WIDTH, DatavizColorBox, DonutChart, DonutChartLegendTable, type ExtendedAxisLabelsFormatterContextObject, type ExtendedTimeTicksInfoObject, GlobalChartStyleOverrides, LineChart, NetworkColorBox, TIME_SERIES_CHART_HEIGHT, type TypeAreaChartProps, type TypeChartDataPoint, type TypeChartDataStyles, type TypeChartLegendLabelProps, type TypeChartLegendProps, type TypeChartNumberFormat, type TypeChartStyleColor, type TypeChartStyleHasOnClick, type TypeChartStylePattern, type TypeChartTableProps, type TypeChartTimeFormat, type TypeChartTooltipDateFormatter, type TypeChartTooltipProps, type TypeChartTooltipTableProps, type TypeChartYAxisLabelFormatter, type TypeColorBoxProps, type TypeDatavizColorBox, type TypeDatavizColorBoxProps, type TypeDonutChartLegendTableProps, type TypeDonutChartProps, type TypeDonutChartTooltipProps, type TypeLegendLabel, type TypeLineChartProps, areaChartOptions, areaChartStyles, baseChartOptions, baseChartStyles, donutChartOptions, donutChartStyles, generateChartTooltipPortalId, getDatavizColor, getDatavizColorWithAlpha, getDatavizOpacity, lineChartOptions, lineChartStyles, timeSeriesChartStyles, transformDataToSeries, transformTimeSeriesTooltipData, xAxisLabelFormatter, yAxisLabelFormatter };
380
+ export { AreaChart, ChartLegend, ChartLegendLabel, ChartTable, ChartTooltip, ChartTooltipFooter, ChartTooltipHeader, ChartTooltipPortal, ChartTooltipTable, ChartTooltipTitle, ColorBox, DONUT_CHART_HALO_SIZE, DONUT_CHART_HEIGHT, DONUT_CHART_WIDTH, DatavizColorBox, DonutChart, DonutChartLegendTable, type ExtendedAxisLabelsFormatterContextObject, type ExtendedTimeTicksInfoObject, GlobalChartStyleOverrides, LineChart, NetworkColorBox, TIME_SERIES_CHART_HEIGHT, type TypeAreaChartProps, type TypeChartDataPoint, type TypeChartDataStyles, type TypeChartLegendLabelProps, type TypeChartLegendProps, type TypeChartNumberFormat, type TypeChartStyleColor, type TypeChartStyleHasOnClick, type TypeChartStylePattern, type TypeChartTableProps, type TypeChartTimeFormat, type TypeChartTooltipDateFormatter, type TypeChartTooltipProps, type TypeChartTooltipTableProps, type TypeChartXAnnotations, type TypeChartXAnnotationsDetails, type TypeChartYAxisLabelFormatter, type TypeColorBoxProps, type TypeDatavizColorBox, type TypeDatavizColorBoxProps, type TypeDonutChartLegendTableProps, type TypeDonutChartProps, type TypeDonutChartTooltipProps, type TypeExtendedChart, type TypeLegendLabel, type TypeLineChartProps, areaChartOptions, areaChartStyles, baseChartOptions, baseChartStyles, donutChartOptions, donutChartStyles, generateChartTooltipPortalId, getDatavizColor, getDatavizColorWithAlpha, getDatavizOpacity, lineChartOptions, lineChartStyles, timeSeriesChartStyles, transformDataToSeries, transformTimeSeriesTooltipData, xAxisLabelFormatter, yAxisLabelFormatter };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { TimeTicksInfoObject, AxisLabelsFormatterContextObject, Chart, TooltipFormatterContextObject, Options, SeriesSplineOptions, SeriesAreasplineOptions, AxisTickPositionsArray } from 'highcharts';
3
+ import { TimeTicksInfoObject, AxisLabelsFormatterContextObject, Chart, Annotation, TooltipFormatterContextObject, Options, SeriesSplineOptions, SeriesAreasplineOptions, AxisTickPositionsArray } from 'highcharts';
4
4
  import * as _sproutsocial_seeds_react_box from '@sproutsocial/seeds-react-box';
5
5
  import { TypeBoxProps } from '@sproutsocial/seeds-react-box';
6
6
  import { Table } from '@sproutsocial/seeds-react-table';
@@ -38,9 +38,19 @@ type TypeChartYAxisLabelFormatter = ({ y, yValues, }: Readonly<{
38
38
  y: number;
39
39
  yValues: ReadonlyArray<number>;
40
40
  }>) => string;
41
+ type TypeChartXAnnotationsDetails = () => ReactNode;
42
+ type TypeChartXAnnotations = Readonly<{
43
+ [x: number]: Readonly<{
44
+ marker: () => ReactNode;
45
+ details: TypeChartXAnnotationsDetails;
46
+ }>;
47
+ }> | undefined;
41
48
  type TypeChartStyleColor = string;
42
49
  type TypeChartStylePattern = "solid" | "dashed";
43
50
  type TypeChartStyleHasOnClick = boolean;
51
+ interface TypeExtendedChart extends Chart {
52
+ annotations?: Annotation[];
53
+ }
44
54
 
45
55
  type TypeAreaChartProps = Readonly<{
46
56
  data: ReadonlyArray<Readonly<{
@@ -65,6 +75,7 @@ type TypeAreaChartProps = Readonly<{
65
75
  }>) => void;
66
76
  tooltipClickLabel?: ReactNode;
67
77
  timeFormat?: TypeChartTimeFormat;
78
+ xAnnotations?: TypeChartXAnnotations;
68
79
  }>;
69
80
  declare const AreaChart: react.NamedExoticComponent<Readonly<{
70
81
  data: ReadonlyArray<Readonly<{
@@ -89,6 +100,7 @@ declare const AreaChart: react.NamedExoticComponent<Readonly<{
89
100
  }>) => void;
90
101
  tooltipClickLabel?: ReactNode;
91
102
  timeFormat?: TypeChartTimeFormat;
103
+ xAnnotations?: TypeChartXAnnotations;
92
104
  }>>;
93
105
 
94
106
  type TypeLegendLabel = Readonly<{
@@ -277,6 +289,7 @@ type TypeLineChartProps = Readonly<{
277
289
  }>) => void;
278
290
  tooltipClickLabel?: ReactNode;
279
291
  timeFormat?: TypeChartTimeFormat;
292
+ xAnnotations?: TypeChartXAnnotations;
280
293
  }>;
281
294
  declare const LineChart: react.NamedExoticComponent<Readonly<{
282
295
  data: ReadonlyArray<Readonly<{
@@ -300,6 +313,7 @@ declare const LineChart: react.NamedExoticComponent<Readonly<{
300
313
  }>) => void;
301
314
  tooltipClickLabel?: ReactNode;
302
315
  timeFormat?: TypeChartTimeFormat;
316
+ xAnnotations?: TypeChartXAnnotations;
303
317
  }>>;
304
318
 
305
319
  declare const baseChartOptions: Options;
@@ -363,4 +377,4 @@ declare const donutChartStyles: styled_components.FlattenInterpolation<styled_co
363
377
  $colors: ReadonlyArray<TypeChartStyleColor>;
364
378
  }>, any>>;
365
379
 
366
- export { AreaChart, ChartLegend, ChartLegendLabel, ChartTable, ChartTooltip, ChartTooltipFooter, ChartTooltipHeader, ChartTooltipPortal, ChartTooltipTable, ChartTooltipTitle, ColorBox, DONUT_CHART_HALO_SIZE, DONUT_CHART_HEIGHT, DONUT_CHART_WIDTH, DatavizColorBox, DonutChart, DonutChartLegendTable, type ExtendedAxisLabelsFormatterContextObject, type ExtendedTimeTicksInfoObject, GlobalChartStyleOverrides, LineChart, NetworkColorBox, TIME_SERIES_CHART_HEIGHT, type TypeAreaChartProps, type TypeChartDataPoint, type TypeChartDataStyles, type TypeChartLegendLabelProps, type TypeChartLegendProps, type TypeChartNumberFormat, type TypeChartStyleColor, type TypeChartStyleHasOnClick, type TypeChartStylePattern, type TypeChartTableProps, type TypeChartTimeFormat, type TypeChartTooltipDateFormatter, type TypeChartTooltipProps, type TypeChartTooltipTableProps, type TypeChartYAxisLabelFormatter, type TypeColorBoxProps, type TypeDatavizColorBox, type TypeDatavizColorBoxProps, type TypeDonutChartLegendTableProps, type TypeDonutChartProps, type TypeDonutChartTooltipProps, type TypeLegendLabel, type TypeLineChartProps, areaChartOptions, areaChartStyles, baseChartOptions, baseChartStyles, donutChartOptions, donutChartStyles, generateChartTooltipPortalId, getDatavizColor, getDatavizColorWithAlpha, getDatavizOpacity, lineChartOptions, lineChartStyles, timeSeriesChartStyles, transformDataToSeries, transformTimeSeriesTooltipData, xAxisLabelFormatter, yAxisLabelFormatter };
380
+ export { AreaChart, ChartLegend, ChartLegendLabel, ChartTable, ChartTooltip, ChartTooltipFooter, ChartTooltipHeader, ChartTooltipPortal, ChartTooltipTable, ChartTooltipTitle, ColorBox, DONUT_CHART_HALO_SIZE, DONUT_CHART_HEIGHT, DONUT_CHART_WIDTH, DatavizColorBox, DonutChart, DonutChartLegendTable, type ExtendedAxisLabelsFormatterContextObject, type ExtendedTimeTicksInfoObject, GlobalChartStyleOverrides, LineChart, NetworkColorBox, TIME_SERIES_CHART_HEIGHT, type TypeAreaChartProps, type TypeChartDataPoint, type TypeChartDataStyles, type TypeChartLegendLabelProps, type TypeChartLegendProps, type TypeChartNumberFormat, type TypeChartStyleColor, type TypeChartStyleHasOnClick, type TypeChartStylePattern, type TypeChartTableProps, type TypeChartTimeFormat, type TypeChartTooltipDateFormatter, type TypeChartTooltipProps, type TypeChartTooltipTableProps, type TypeChartXAnnotations, type TypeChartXAnnotationsDetails, type TypeChartYAxisLabelFormatter, type TypeColorBoxProps, type TypeDatavizColorBox, type TypeDatavizColorBoxProps, type TypeDonutChartLegendTableProps, type TypeDonutChartProps, type TypeDonutChartTooltipProps, type TypeExtendedChart, type TypeLegendLabel, type TypeLineChartProps, areaChartOptions, areaChartStyles, baseChartOptions, baseChartStyles, donutChartOptions, donutChartStyles, generateChartTooltipPortalId, getDatavizColor, getDatavizColorWithAlpha, getDatavizOpacity, lineChartOptions, lineChartStyles, timeSeriesChartStyles, transformDataToSeries, transformTimeSeriesTooltipData, xAxisLabelFormatter, yAxisLabelFormatter };