@redsift/charts 11.6.0 → 11.7.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/index.d.ts CHANGED
@@ -861,6 +861,13 @@ interface BarChartSectionProps extends Omit<ComponentProps<'g'>, 'onClick' | 'ro
861
861
  scaleX?: ScaleLinear$1<number, number, never> | ScaleTime$2<number, number, never> | ScalePoint$2<string>;
862
862
  scaleY?: ScaleLinear$1<number, number, never>;
863
863
  direction?: BarDirection;
864
+ /** Regions for highlighting a specific area by changing the background color. Only works with datestrings for X axis. */
865
+ regions?: {
866
+ from: string;
867
+ to: string;
868
+ color: string;
869
+ opacity?: number;
870
+ }[];
864
871
  }
865
872
  interface StyledBarChartSectionProps {
866
873
  $theme: Theme;
@@ -870,11 +877,17 @@ interface BarChartBarsProps extends Omit<ComponentProps<'g'>, 'onClick' | 'role'
870
877
  category?: string;
871
878
  }
872
879
  type StyledBarChartBarsProps = Omit<BarChartBarsProps, 'category'> & {};
880
+ interface BarChartOverlayProps extends Omit<ComponentProps<'g'>, 'onClick' | 'role'> {
881
+ from?: number;
882
+ to?: number;
883
+ }
884
+ type StyledBarChartOverlayProps = Omit<BarChartOverlayProps, 'category'> & {};
873
885
 
874
886
  declare const BaseBarChart: Comp<BarChartProps, HTMLDivElement>;
875
887
  declare const BarChart: Comp<BarChartProps, HTMLDivElement> & {
876
888
  Section: Comp<BarChartSectionProps, SVGGElement>;
877
889
  Bars: Comp<BarChartBarsProps, SVGGElement>;
890
+ Overlay: Comp<BarChartOverlayProps, SVGGElement>;
878
891
  Axis: Comp<AxisProps, SVGGElement>;
879
892
  GroupedTooltip: React$1.FC<{
880
893
  dateFormatter: (date: Date) => string;
@@ -896,6 +909,7 @@ declare const BarChart: Comp<BarChartProps, HTMLDivElement> & {
896
909
  declare const StyledBarChart: styled_components.StyledComponent<_redsift_design_system.Comp<ChartContainerProps, HTMLDivElement>, any, BarChartProps, never>;
897
910
  declare const StyledBarChartSection: styled_components.StyledComponent<"g", any, StyledBarChartSectionProps, never>;
898
911
  declare const StyledBarChartBars: styled_components.StyledComponent<"g", any, Omit<BarChartBarsProps, "category">, never>;
912
+ declare const StyledBarChartOverlay: styled_components.StyledComponent<"g", any, Omit<BarChartBarsProps, "category">, never>;
899
913
  declare const StyledBarChartEmptyText: styled_components.StyledComponent<"div", any, {
900
914
  $maxWidth: number;
901
915
  $textSize: number;
@@ -1274,4 +1288,4 @@ declare const StyledScatterPlotEmptyText: styled_components.StyledComponent<"div
1274
1288
  $theme: Theme;
1275
1289
  }, never>;
1276
1290
 
1277
- export { AnchorProps, AnyScale, Arc, ArcDatum, ArcProps, Arcs, ArcsProps, Axis, AxisPosition, AxisProps, AxisVariant, Bar, BarChart, BarChartBarsProps, BarChartDimensions, BarChartLegendVariant, BarChartProps, BarChartSectionProps, BarChartState, BarDatum, BarDirection, BarOrientation, BarProps, BaseBarChart, CategoricalOrLinearDim, CategoryData, CategoryDatum, CategoryDim, ChartAxesProps, ChartContainer, ChartContainerDescription, ChartContainerProps, ChartContainerTitle, ChartDimensions, ChartSize, ChartTheme, ColorTheme, ComputedBarProps, Coordinates, CoordinatesCategoryData, CoordinatesCategoryDatum, CoordinatesCategoryDim, CustomColorTheme, DataPoint, DataPointProps, Datum, Dot, DotDatum, DotProps, DotVariant, EmptyDatum, JSONArray, JSONObject, JSONValue, LabelVariant, Legend, LegendItemDatum, LegendProps, LegendVariant, Line, LineChart, LineChartDimensions, LineChartLegendVariant, LineChartProps, LinePointDatum, LineProps, LinearData, LinearDatum, LinearDim, MarginProps, NumericValue, PieChart, PieChartDimensions, PieChartLegendVariant, PieChartProps, PieChartVariant, RenderedLinearBarChartProps, Scale, ScaleBand, ScaleLinear, ScaleLog, ScalePoint, ScaleSymlog, ScaleTime, ScaleTypeToScale, ScaleValue, ScaleWithBandwidth, ScatterPlot, ScatterPlotDimensions, ScatterPlotLegendVariant, ScatterPlotProps, ScatterPlotVariant, SortingMethod, Statistic, Statistics, StringValue, StyledArc, StyledArcProps, StyledArcs, StyledArcsProps, StyledAxis, StyledAxisProps, StyledBar, StyledBarChart, StyledBarChartBars, StyledBarChartBarsProps, StyledBarChartEmptyText, StyledBarChartProps, StyledBarChartSection, StyledBarChartSectionProps, StyledBarProps, StyledChartContainer, StyledChartContainerCaption, StyledChartContainerProps, StyledChartContainerTitle, StyledDataPoint, StyledDataPointProps, StyledDot, StyledDotProps, StyledLegend, StyledLegendProps, StyledLine, StyledLineChart, StyledLineChartEmptyText, StyledLineChartProps, StyledLineProps, StyledPieChart, StyledPieChartCenterText, StyledPieChartEmptyText, StyledPieChartProps, StyledScatterPlot, StyledScatterPlotEmptyText, StyledScatterPlotProps, SuccessDangerColorTheme, TicksSpec, TooltipVariant, TwoCategoryData, TwoCategoryDatum, TwoCategoryDim, UseBrushProps, UseColorProps, UseFormatCategoricalDataProps, UseZoomProps, XScaleType, empty, getAxisType, getColorScale, getSortingMethod, isValidDate, mergeLegends, monochrome, scheme, successDangerScheme, useBrush, useColor, useFormatCategoricalData, useZoom };
1291
+ export { AnchorProps, AnyScale, Arc, ArcDatum, ArcProps, Arcs, ArcsProps, Axis, AxisPosition, AxisProps, AxisVariant, Bar, BarChart, BarChartBarsProps, BarChartDimensions, BarChartLegendVariant, BarChartOverlayProps, BarChartProps, BarChartSectionProps, BarChartState, BarDatum, BarDirection, BarOrientation, BarProps, BaseBarChart, CategoricalOrLinearDim, CategoryData, CategoryDatum, CategoryDim, ChartAxesProps, ChartContainer, ChartContainerDescription, ChartContainerProps, ChartContainerTitle, ChartDimensions, ChartSize, ChartTheme, ColorTheme, ComputedBarProps, Coordinates, CoordinatesCategoryData, CoordinatesCategoryDatum, CoordinatesCategoryDim, CustomColorTheme, DataPoint, DataPointProps, Datum, Dot, DotDatum, DotProps, DotVariant, EmptyDatum, JSONArray, JSONObject, JSONValue, LabelVariant, Legend, LegendItemDatum, LegendProps, LegendVariant, Line, LineChart, LineChartDimensions, LineChartLegendVariant, LineChartProps, LinePointDatum, LineProps, LinearData, LinearDatum, LinearDim, MarginProps, NumericValue, PieChart, PieChartDimensions, PieChartLegendVariant, PieChartProps, PieChartVariant, RenderedLinearBarChartProps, Scale, ScaleBand, ScaleLinear, ScaleLog, ScalePoint, ScaleSymlog, ScaleTime, ScaleTypeToScale, ScaleValue, ScaleWithBandwidth, ScatterPlot, ScatterPlotDimensions, ScatterPlotLegendVariant, ScatterPlotProps, ScatterPlotVariant, SortingMethod, Statistic, Statistics, StringValue, StyledArc, StyledArcProps, StyledArcs, StyledArcsProps, StyledAxis, StyledAxisProps, StyledBar, StyledBarChart, StyledBarChartBars, StyledBarChartBarsProps, StyledBarChartEmptyText, StyledBarChartOverlay, StyledBarChartOverlayProps, StyledBarChartProps, StyledBarChartSection, StyledBarChartSectionProps, StyledBarProps, StyledChartContainer, StyledChartContainerCaption, StyledChartContainerProps, StyledChartContainerTitle, StyledDataPoint, StyledDataPointProps, StyledDot, StyledDotProps, StyledLegend, StyledLegendProps, StyledLine, StyledLineChart, StyledLineChartEmptyText, StyledLineChartProps, StyledLineProps, StyledPieChart, StyledPieChartCenterText, StyledPieChartEmptyText, StyledPieChartProps, StyledScatterPlot, StyledScatterPlotEmptyText, StyledScatterPlotProps, SuccessDangerColorTheme, TicksSpec, TooltipVariant, TwoCategoryData, TwoCategoryDatum, TwoCategoryDim, UseBrushProps, UseColorProps, UseFormatCategoricalDataProps, UseZoomProps, XScaleType, empty, getAxisType, getColorScale, getSortingMethod, isValidDate, mergeLegends, monochrome, scheme, successDangerScheme, useBrush, useColor, useFormatCategoricalData, useZoom };
package/index.js CHANGED
@@ -7,7 +7,7 @@ export { A as Arc, S as StyledArc } from './_internal/Arc2.js';
7
7
  export { A as Arcs, S as StyledArcs } from './_internal/Arcs2.js';
8
8
  export { A as Axis, b as AxisPosition, a as AxisVariant, S as StyledAxis, g as getAxisType } from './_internal/Axis2.js';
9
9
  export { B as Bar, b as BarDirection, a as BarOrientation, S as StyledBar } from './_internal/Bar2.js';
10
- export { a as BarChart, b as BarChartLegendVariant, B as BaseBarChart, S as StyledBarChart, d as StyledBarChartBars, e as StyledBarChartEmptyText, c as StyledBarChartSection } from './_internal/BarChart2.js';
10
+ export { a as BarChart, b as BarChartLegendVariant, B as BaseBarChart, S as StyledBarChart, d as StyledBarChartBars, f as StyledBarChartEmptyText, e as StyledBarChartOverlay, c as StyledBarChartSection } from './_internal/BarChart2.js';
11
11
  export { C as ChartContainer, b as ChartContainerDescription, a as ChartContainerTitle, S as StyledChartContainer, d as StyledChartContainerCaption, c as StyledChartContainerTitle } from './_internal/ChartContainer2.js';
12
12
  export { D as DataPoint, S as StyledDataPoint } from './_internal/DataPoint2.js';
13
13
  export { D as Dot, a as DotVariant, S as StyledDot } from './_internal/Dot2.js';
package/package.json CHANGED
@@ -30,7 +30,7 @@
30
30
  "test": "yarn test:unit && yarn test:storybook"
31
31
  },
32
32
  "types": "types.d.ts",
33
- "version": "11.6.0",
33
+ "version": "11.7.0",
34
34
  "dependencies": {
35
35
  "@emotion/react": "^11.10.4",
36
36
  "@emotion/styled": "^11.10.4",
@@ -88,11 +88,11 @@
88
88
  "ts-jest": "^28.0.3"
89
89
  },
90
90
  "peerDependencies": {
91
- "@redsift/design-system": "^11.6.0-0",
92
- "@redsift/popovers": "^11.6.0-0",
91
+ "@redsift/design-system": "^11.7.0-0",
92
+ "@redsift/popovers": "^11.7.0-0",
93
93
  "react": ">=17",
94
94
  "react-dom": ">=17",
95
95
  "styled-components": "^5.3.5"
96
96
  },
97
- "gitHead": "97881c569fe6cb959f4cf6db32155c0e97265c67"
97
+ "gitHead": "df42b62ddbb8844ad4eeeb151549e746f829fde4"
98
98
  }