@evergis/charts 3.1.7 → 3.1.9

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.
Files changed (134) hide show
  1. package/dist/charts/BarChart/index.d.ts +1 -1
  2. package/dist/charts/BarChart/styled.d.ts +1 -1
  3. package/dist/charts/BarChart/types.d.ts +1 -1
  4. package/dist/charts/BubbleChart/index.d.ts +1 -1
  5. package/dist/charts/BubbleChart/styled.d.ts +1 -1
  6. package/dist/charts/BubbleChart/types.d.ts +1 -1
  7. package/dist/charts/CalendarChart/index.d.ts +1 -1
  8. package/dist/charts/CalendarChart/types.d.ts +1 -1
  9. package/dist/charts/HorizontalBarChart/Bar/index.d.ts +1 -1
  10. package/dist/charts/HorizontalBarChart/Tooltip/index.d.ts +1 -1
  11. package/dist/charts/HorizontalBarChart/XScale/index.d.ts +1 -1
  12. package/dist/charts/HorizontalBarChart/hooks/useStackWrapper.d.ts +1 -1
  13. package/dist/charts/HorizontalBarChart/hooks/useTooltip/types.d.ts +1 -1
  14. package/dist/charts/HorizontalBarChart/index.d.ts +1 -1
  15. package/dist/charts/HorizontalBarChart/types.d.ts +1 -1
  16. package/dist/charts/LineChart/index.d.ts +1 -1
  17. package/dist/charts/LineChart/styled.d.ts +1 -1
  18. package/dist/charts/LineChart/types.d.ts +1 -1
  19. package/dist/charts/PieChart/index.d.ts +1 -1
  20. package/dist/charts/PieChart/types.d.ts +1 -1
  21. package/dist/charts/RadarChart/drawRadialLabels/types.d.ts +1 -1
  22. package/dist/charts/RadarChart/index.d.ts +1 -1
  23. package/dist/charts/RadarChart/types.d.ts +1 -1
  24. package/dist/charts.esm.js +246 -7067
  25. package/dist/charts.esm.js.map +1 -1
  26. package/dist/common/components/SwipeScroll/index.d.ts +1 -1
  27. package/dist/common/components/SwipeScroll/types.d.ts +1 -1
  28. package/dist/hooks/useNode.d.ts +1 -1
  29. package/dist/index.js +293 -7095
  30. package/dist/index.js.map +1 -1
  31. package/package.json +22 -16
  32. package/dist/src/charts/BarChart/draw.d.ts +0 -2
  33. package/dist/src/charts/BarChart/drawGrid/index.d.ts +0 -2
  34. package/dist/src/charts/BarChart/drawGrid/types.d.ts +0 -8
  35. package/dist/src/charts/BarChart/drawLines/index.d.ts +0 -13
  36. package/dist/src/charts/BarChart/drawLines/types.d.ts +0 -9
  37. package/dist/src/charts/BarChart/drawTooltip/getLabel.d.ts +0 -2
  38. package/dist/src/charts/BarChart/drawTooltip/getLabelY.d.ts +0 -2
  39. package/dist/src/charts/BarChart/drawTooltip/index.d.ts +0 -2
  40. package/dist/src/charts/BarChart/drawTooltip/types.d.ts +0 -12
  41. package/dist/src/charts/BarChart/getBars/index.d.ts +0 -3
  42. package/dist/src/charts/BarChart/getBars/types.d.ts +0 -6
  43. package/dist/src/charts/BarChart/getDomain.d.ts +0 -5
  44. package/dist/src/charts/BarChart/hooks/useSelection.d.ts +0 -2
  45. package/dist/src/charts/BarChart/index.d.ts +0 -3
  46. package/dist/src/charts/BarChart/marshaling.d.ts +0 -2
  47. package/dist/src/charts/BarChart/resizeBarWidth/index.d.ts +0 -2
  48. package/dist/src/charts/BarChart/resizeBarWidth/types.d.ts +0 -5
  49. package/dist/src/charts/BarChart/styled.d.ts +0 -37
  50. package/dist/src/charts/BarChart/types.d.ts +0 -148
  51. package/dist/src/charts/BubbleChart/bubbleChartDefaultProps.d.ts +0 -14
  52. package/dist/src/charts/BubbleChart/draw.d.ts +0 -2
  53. package/dist/src/charts/BubbleChart/drawGrid/index.d.ts +0 -2
  54. package/dist/src/charts/BubbleChart/drawGrid/types.d.ts +0 -8
  55. package/dist/src/charts/BubbleChart/drawTooltip/index.d.ts +0 -2
  56. package/dist/src/charts/BubbleChart/drawTooltip/styled.d.ts +0 -1
  57. package/dist/src/charts/BubbleChart/drawTooltip/types.d.ts +0 -4
  58. package/dist/src/charts/BubbleChart/index.d.ts +0 -3
  59. package/dist/src/charts/BubbleChart/styled.d.ts +0 -17
  60. package/dist/src/charts/BubbleChart/types.d.ts +0 -55
  61. package/dist/src/charts/BubbleChart/unmount.d.ts +0 -1
  62. package/dist/src/charts/CalendarChart/draw.d.ts +0 -2
  63. package/dist/src/charts/CalendarChart/index.d.ts +0 -3
  64. package/dist/src/charts/CalendarChart/styled.d.ts +0 -18
  65. package/dist/src/charts/CalendarChart/types.d.ts +0 -22
  66. package/dist/src/charts/HorizontalBarChart/Bar/index.d.ts +0 -3
  67. package/dist/src/charts/HorizontalBarChart/Bar/styled.d.ts +0 -1
  68. package/dist/src/charts/HorizontalBarChart/Bar/types.d.ts +0 -11
  69. package/dist/src/charts/HorizontalBarChart/Tooltip/index.d.ts +0 -3
  70. package/dist/src/charts/HorizontalBarChart/Tooltip/types.d.ts +0 -5
  71. package/dist/src/charts/HorizontalBarChart/XScale/hooks/useScale.d.ts +0 -2
  72. package/dist/src/charts/HorizontalBarChart/XScale/index.d.ts +0 -3
  73. package/dist/src/charts/HorizontalBarChart/XScale/styled.d.ts +0 -3
  74. package/dist/src/charts/HorizontalBarChart/hooks/useMarshaling.d.ts +0 -5
  75. package/dist/src/charts/HorizontalBarChart/hooks/useStackWrapper.d.ts +0 -12
  76. package/dist/src/charts/HorizontalBarChart/hooks/useTooltip/index.d.ts +0 -3
  77. package/dist/src/charts/HorizontalBarChart/hooks/useTooltip/types.d.ts +0 -6
  78. package/dist/src/charts/HorizontalBarChart/index.d.ts +0 -3
  79. package/dist/src/charts/HorizontalBarChart/styled.d.ts +0 -30
  80. package/dist/src/charts/HorizontalBarChart/types.d.ts +0 -41
  81. package/dist/src/charts/LineChart/draw.d.ts +0 -2
  82. package/dist/src/charts/LineChart/drawGrid/index.d.ts +0 -2
  83. package/dist/src/charts/LineChart/drawGrid/types.d.ts +0 -9
  84. package/dist/src/charts/LineChart/drawLabel/index.d.ts +0 -3
  85. package/dist/src/charts/LineChart/drawLabel/styled.d.ts +0 -2
  86. package/dist/src/charts/LineChart/drawLabel/types.d.ts +0 -7
  87. package/dist/src/charts/LineChart/drawTooltip/index.d.ts +0 -2
  88. package/dist/src/charts/LineChart/drawTooltip/types.d.ts +0 -9
  89. package/dist/src/charts/LineChart/index.d.ts +0 -3
  90. package/dist/src/charts/LineChart/styled.d.ts +0 -27
  91. package/dist/src/charts/LineChart/types.d.ts +0 -78
  92. package/dist/src/charts/PieChart/draw.d.ts +0 -2
  93. package/dist/src/charts/PieChart/drawRadialLabels/helpers.d.ts +0 -3
  94. package/dist/src/charts/PieChart/drawRadialLabels/index.d.ts +0 -2
  95. package/dist/src/charts/PieChart/drawRadialLabels/types.d.ts +0 -11
  96. package/dist/src/charts/PieChart/drawTooltips/index.d.ts +0 -2
  97. package/dist/src/charts/PieChart/drawTooltips/types.d.ts +0 -8
  98. package/dist/src/charts/PieChart/index.d.ts +0 -3
  99. package/dist/src/charts/PieChart/styled.d.ts +0 -18
  100. package/dist/src/charts/PieChart/types.d.ts +0 -54
  101. package/dist/src/charts/RadarChart/draw.d.ts +0 -2
  102. package/dist/src/charts/RadarChart/drawRadialLabels/index.d.ts +0 -2
  103. package/dist/src/charts/RadarChart/drawRadialLabels/styled.d.ts +0 -2
  104. package/dist/src/charts/RadarChart/drawRadialLabels/types.d.ts +0 -25
  105. package/dist/src/charts/RadarChart/helpers.d.ts +0 -2
  106. package/dist/src/charts/RadarChart/index.d.ts +0 -3
  107. package/dist/src/charts/RadarChart/styled.d.ts +0 -13
  108. package/dist/src/charts/RadarChart/types.d.ts +0 -42
  109. package/dist/src/common/components/SwipeScroll/animate.d.ts +0 -6
  110. package/dist/src/common/components/SwipeScroll/hooks/useSwipe.d.ts +0 -2
  111. package/dist/src/common/components/SwipeScroll/index.d.ts +0 -3
  112. package/dist/src/common/components/SwipeScroll/styled.d.ts +0 -1
  113. package/dist/src/common/components/SwipeScroll/types.d.ts +0 -8
  114. package/dist/src/common/components/Wrapper.d.ts +0 -1
  115. package/dist/src/common/components/labels/index.d.ts +0 -7
  116. package/dist/src/common/components/labels/types.d.ts +0 -6
  117. package/dist/src/common/components/tooltips/index.d.ts +0 -14
  118. package/dist/src/common/types/interpolator.d.ts +0 -1
  119. package/dist/src/common/types/margin.d.ts +0 -6
  120. package/dist/src/helpers/appendSvg.d.ts +0 -2
  121. package/dist/src/helpers/common.d.ts +0 -2
  122. package/dist/src/helpers/computeDimensions.d.ts +0 -2
  123. package/dist/src/helpers/getLegend/index.d.ts +0 -19
  124. package/dist/src/helpers/getLegend/types.d.ts +0 -15
  125. package/dist/src/helpers/getTextWidth.d.ts +0 -1
  126. package/dist/src/helpers/index.d.ts +0 -1
  127. package/dist/src/helpers/math.d.ts +0 -2
  128. package/dist/src/helpers/stackedData.d.ts +0 -2
  129. package/dist/src/helpers/textAlignCenter.d.ts +0 -2
  130. package/dist/src/helpers/throttle.d.ts +0 -1
  131. package/dist/src/hooks/index.d.ts +0 -2
  132. package/dist/src/hooks/useNode.d.ts +0 -2
  133. package/dist/src/hooks/useResize.d.ts +0 -1
  134. package/dist/src/index.d.ts +0 -26
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.1.7",
2
+ "version": "3.1.9",
3
3
  "name": "@evergis/charts",
4
4
  "author": "Everpoint",
5
5
  "license": "MIT",
@@ -20,31 +20,37 @@
20
20
  "storybook": "start-storybook -p 6006",
21
21
  "build-storybook": "build-storybook"
22
22
  },
23
- "resolutions": {
24
- "@types/react": "^18.3.18"
25
- },
26
23
  "peerDependencies": {
27
- "lodash": ">=4",
28
- "react": ">=18",
29
- "react-dom": ">=18",
30
- "react-is": ">=19"
24
+ "react": "^18.3.1",
25
+ "react-dom": "^18.3.1"
31
26
  },
32
27
  "devDependencies": {
33
- "@storybook/addon-actions": "^6.5.0-alpha.39",
34
- "@storybook/addon-docs": "^6.5.0-alpha.39",
35
- "@storybook/addon-info": "^6.0.0-alpha.2",
36
- "@storybook/addon-links": "^6.5.0-alpha.39",
37
- "@storybook/addons": "^6.5.0-alpha.39",
38
- "@storybook/react": "^6.5.0-alpha.39",
28
+ "@storybook/addon-actions": "^7.6.14",
29
+ "@storybook/addon-controls": "^7.6.14",
30
+ "@storybook/addon-docs": "^7.6.14",
31
+ "@storybook/addon-essentials": "^7.6.14",
32
+ "@storybook/addon-interactions": "^7.6.14",
33
+ "@storybook/addon-knobs": "^7.0.2",
34
+ "@storybook/addon-links": "^7.6.14",
35
+ "@storybook/addon-onboarding": "^1.0.11",
36
+ "@storybook/addon-storysource": "^7.6.14",
37
+ "@storybook/addons": "^7.6.14",
38
+ "@storybook/blocks": "^7.6.14",
39
+ "@storybook/react": "^7.6.14",
40
+ "@storybook/react-webpack5": "^7.6.14",
41
+ "@storybook/test": "^7.6.14",
42
+ "@storybook/theming": "^7.6.14",
39
43
  "@types/d3": "^7.1.0",
40
44
  "@types/react": "^18.3.18",
41
45
  "@types/react-dom": "^18.3.5",
42
46
  "@types/styled-components": "5.1.25",
43
- "babel-loader": "^8.2.3"
47
+ "storybook": "^7.6.14"
44
48
  },
45
49
  "dependencies": {
46
50
  "d3": "^7.3.0",
51
+ "lodash": "^4.17.21",
52
+ "react-is": "^19.1.1",
47
53
  "styled-components": "5.3.5"
48
54
  },
49
- "gitHead": "a14663dc8c909b26e8f0074528b252289eec8948"
55
+ "gitHead": "5bc61cbe14b9241cf1951f1e2c32b2a3c515a1a8"
50
56
  }
@@ -1,2 +0,0 @@
1
- import { BarChartProps } from './types';
2
- export declare const draw: (node: HTMLElement | null, props: BarChartProps) => void;
@@ -1,2 +0,0 @@
1
- import { DrawGridProps } from './types';
2
- export declare const drawGrid: ({ svg, yScale, xScale, yTicksCount, drawGridX, drawGridY, }: DrawGridProps) => void;
@@ -1,8 +0,0 @@
1
- import { BarChartProps } from '../types';
2
- import * as d3 from 'd3';
3
- export type DrawGridProps = {
4
- svg: d3.Selection<SVGSVGElement, unknown, null, undefined>;
5
- yScale: d3.ScaleLinear<number, number>;
6
- xScale: d3.ScaleBand<string>;
7
- yTicksCount: number;
8
- } & Pick<BarChartProps, 'drawGridX' | 'drawGridY'>;
@@ -1,13 +0,0 @@
1
- import { DrawLinesProps } from './types';
2
- import * as d3 from 'd3';
3
- export declare const barChartLinesClassNames: {
4
- barChartLinesGlobal: string;
5
- barChartLine: string;
6
- barChartAreasGlobal: string;
7
- barChartArea: string;
8
- };
9
- export declare const drawLines: ({ svg, lineData, min, yScale, xScale, curve, stackedLine, }: DrawLinesProps) => {
10
- areasSelection: any;
11
- linesSelection: any;
12
- area: d3.Area<[number, number]>;
13
- };
@@ -1,9 +0,0 @@
1
- import { BarChartProps, BarChartLineData } from '../types';
2
- import * as d3 from 'd3';
3
- export type DrawLinesProps = {
4
- min: number;
5
- svg: d3.Selection<SVGSVGElement, unknown, null, undefined>;
6
- yScale: d3.ScaleLinear<number, number>;
7
- xScale: d3.ScaleBand<string>;
8
- lineData: BarChartLineData[];
9
- } & Pick<BarChartProps, 'stackedLine' | 'curve'>;
@@ -1,2 +0,0 @@
1
- import { BarChartLabelPosition } from '../types';
2
- export declare const getLabel: (labelPosition: BarChartLabelPosition) => import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,2 +0,0 @@
1
- import { BarChartLabelPosition, BarChartMarshalledGroup } from '../types';
2
- export declare const getLabelY: (labelPosition: BarChartLabelPosition, y2: number, item: BarChartMarshalledGroup) => number;
@@ -1,2 +0,0 @@
1
- import { DrawTooltipProps } from './types';
2
- export declare const drawTooltip: ({ svg, node, data, marshalledData, xScale, yScale, renderTooltip, labelPosition, marginTop, renderLabel, barWidth, barPadding, dynamicTooltipEnable, hideTooltipGroupName, tooltipY, tooltipBind, lineData, formatTooltipValue, formatTooltipName, tooltipYDomain, setTooltipPosition, onLabelItem, isBarTooltip, bars, tooltipRoot, tooltipClassName, onBarClick, onBarHover, }: DrawTooltipProps) => void;
@@ -1,12 +0,0 @@
1
- import { BarChartMarshalledGroup, BarChartProps } from '../types';
2
- import * as d3 from 'd3';
3
- export type DrawTooltipProps = {
4
- svg: d3.Selection<SVGSVGElement, unknown, null, undefined>;
5
- node: HTMLElement;
6
- yScale: d3.ScaleLinear<number, number>;
7
- xScale: d3.ScaleBand<string>;
8
- marshalledData: BarChartMarshalledGroup[][];
9
- marginTop: number;
10
- barWidth: number;
11
- bars: d3.Selection<SVGGElement, BarChartMarshalledGroup[], SVGGElement, unknown>;
12
- } & Pick<BarChartProps, 'renderTooltip' | 'labelPosition' | 'renderLabel' | 'dynamicTooltipEnable' | 'hideTooltipGroupName' | 'tooltipY' | 'tooltipBind' | 'lineData' | 'formatTooltipValue' | 'formatTooltipName' | 'tooltipYDomain' | 'data' | 'barPadding' | 'setTooltipPosition' | 'onLabelItem' | 'isBarTooltip' | 'tooltipRoot' | 'tooltipClassName' | 'onBarClick' | 'onBarHover'>;
@@ -1,3 +0,0 @@
1
- import { BarChartMarshalledGroup } from '../types';
2
- import { GetBarsProps } from './types';
3
- export declare const getBars: ({ groups, barWidth }: GetBarsProps) => import('d3-selection').Selection<SVGRectElement | import('d3-selection').BaseType, BarChartMarshalledGroup, SVGGElement, BarChartMarshalledGroup[]>;
@@ -1,6 +0,0 @@
1
- import { BarChartMarshalledGroup } from '../types';
2
- import * as d3 from 'd3';
3
- export type GetBarsProps = {
4
- groups: d3.Selection<SVGGElement, BarChartMarshalledGroup[], SVGGElement, unknown>;
5
- barWidth: number;
6
- };
@@ -1,5 +0,0 @@
1
- import { BarChartProps } from './types';
2
- export declare const getDomain: ({ data, minDomainValue, maxDomainValue, }: Pick<BarChartProps, "data" | "minDomainValue" | "maxDomainValue">) => {
3
- min: number;
4
- max: number;
5
- };
@@ -1,2 +0,0 @@
1
- import { BarChartProps } from '../types';
2
- export declare const useSelection: (node: HTMLElement | null, props: BarChartProps) => void;
@@ -1,3 +0,0 @@
1
- import { FC } from '../../../node_modules/@types/react';
2
- import { BarChartProps } from './types';
3
- export declare const BarChart: FC<BarChartProps>;
@@ -1,2 +0,0 @@
1
- import { BarChartMarshalledGroup, BarChartMarshaling } from './types';
2
- export declare const marshaling: ({ data, yScale, xScale, barWidth, barPadding, colors, marginTop, }: BarChartMarshaling) => BarChartMarshalledGroup[][];
@@ -1,2 +0,0 @@
1
- import { ResizeBarWidthProps } from './types';
2
- export declare const resizeBarWidth: ({ data, range, barWidth, barPadding, sectionPadding, }: ResizeBarWidthProps) => number;
@@ -1,5 +0,0 @@
1
- import { BarChartProps } from '../types';
2
- export type ResizeBarWidthProps = {
3
- range: number[];
4
- barWidth: number;
5
- } & Pick<BarChartProps, 'data' | 'barPadding' | 'sectionPadding'>;
@@ -1,37 +0,0 @@
1
- import { JSXElementConstructor } from '../../../node_modules/@types/react';
2
- export declare const barChartClassNames: {
3
- barChartLinesGlobal: string;
4
- barChartLine: string;
5
- barChartAreasGlobal: string;
6
- barChartArea: string;
7
- barChartLabelContainer: string;
8
- barChartLabelFlex: string;
9
- barChartLabel: string;
10
- barChartMouseRect: string;
11
- barChartMouseContainer: string;
12
- barChartTooltipFlex: string;
13
- barChartMouseTooltip: string;
14
- barChartTooltip: string;
15
- barChartTooltipItem: string;
16
- barChartTooltipColFlex: string;
17
- barChartTooltipGroupName: string;
18
- barChartColorBox: string;
19
- barChartColorLine: string;
20
- barChartTooltipName: string;
21
- barChartTooltipValue: string;
22
- barChartBarGlobal: string;
23
- barChartYScaleGlobal: string;
24
- barChartYAxis: string;
25
- barChartXAxis: string;
26
- barChartYAxisZeroTick: string;
27
- barChartGridGlobal: string;
28
- barChartGridLineX: string;
29
- barChartGridLineXZero: string;
30
- barChartGridLineYZero: string;
31
- barChartGridLineY: string;
32
- barChartSelection: string;
33
- };
34
- export declare const SvgWrapper: import('styled-components').StyledComponent<"div", any, {
35
- selectable?: boolean;
36
- }, never>;
37
- export declare const TooltipStyles: JSXElementConstructor<any>;
@@ -1,148 +0,0 @@
1
- import { CSSProperties, PropsWithChildren, ReactNode } from '../../../node_modules/@types/react';
2
- import { Margin } from '../../common/types/margin';
3
- import * as d3 from "d3";
4
- export type BarChartData = {
5
- groupName: string | number;
6
- [key: string]: any;
7
- } | Record<string, {
8
- [key: string]: number;
9
- }>;
10
- export type LegendItemsGroupedStackedBarChart = {
11
- [key: string]: string;
12
- };
13
- export type BarChartColors = {
14
- [key: string]: string;
15
- };
16
- export type BarChartLabelPosition = "top" | "center" | "bottom";
17
- export type BarChartLabelSetTooltipPosition = (position: {
18
- tooltip: d3.Selection<HTMLDivElement, unknown, null, undefined>;
19
- left: number;
20
- top: number;
21
- svgWidth: number;
22
- }) => void;
23
- export interface BarChartMarker {
24
- label: string;
25
- value: number;
26
- color?: string;
27
- lineColor?: string;
28
- className?: string;
29
- horizontal?: boolean;
30
- line?: boolean;
31
- align?: "center" | "left" | "right";
32
- }
33
- export interface BarChartProps extends PropsWithChildren {
34
- className?: string;
35
- style?: CSSProperties;
36
- data: BarChartData[];
37
- markers?: BarChartMarker[];
38
- lineData?: BarChartLineData[];
39
- colors: BarChartColors;
40
- margin?: Margin;
41
- barWidth?: number;
42
- barPadding?: number;
43
- setTooltipPosition?: BarChartLabelSetTooltipPosition | boolean;
44
- sectionPadding?: number | undefined;
45
- width?: number;
46
- height?: number;
47
- yAxisPadding?: number;
48
- xAxisPadding?: number;
49
- drawGridY?: boolean;
50
- drawGridX?: boolean;
51
- customYScale?: (yScale: (value: number) => number) => void;
52
- customXScale?: (xScale: d3.ScaleBand<string>) => void;
53
- customYAxisLeft?: (yAxisLeft: d3.Axis<d3.NumberValue>) => void;
54
- customXAxisBottom?: (xAxisBottom: d3.Axis<string>, props: {
55
- node: HTMLElement;
56
- labels: string[];
57
- }) => void;
58
- customYAxis?: (yAxis: d3.Selection<SVGGElement, unknown, null, undefined>) => void;
59
- customXAxis?: (xAxis: d3.Selection<SVGGElement, unknown, null, undefined>) => void;
60
- customBars?: (args: {
61
- bars: d3.Selection<Element | d3.EnterElement | Document | Window | SVGRectElement | null, BarChartMarshalledGroup, SVGGElement, BarChartMarshalledGroup[]> | d3.Transition<Element | d3.EnterElement | Document | Window | SVGPathElement | null, BarChartMarshalledGroup, SVGGElement, BarChartMarshalledGroup[]>;
62
- yScale: (value: number) => number;
63
- lines: null | {
64
- linesSelection: d3.Selection<Element | d3.EnterElement | Document | Window | SVGPathElement | null, BarChartLineData, SVGGElement, unknown> | null;
65
- areasSelection: d3.Selection<Element | d3.EnterElement | Document | Window | SVGPathElement | null, BarChartLineData, SVGGElement, unknown> | null;
66
- area: d3.Area<[number, number]> | null;
67
- };
68
- lineData?: BarChartLineData[];
69
- marshalledData: BarChartMarshalledGroup[][];
70
- }) => void;
71
- minValue?: number;
72
- maxValue?: number;
73
- minDomainValue?: number | undefined;
74
- maxDomainValue?: number | undefined;
75
- minValuesLine?: number;
76
- dynamicTooltipEnable?: boolean;
77
- hideTooltipGroupName?: boolean;
78
- renderTooltip?: (group: BarChartMergedData, position?: {
79
- tooltip: d3.Selection<HTMLDivElement, unknown, null, undefined>;
80
- left: number;
81
- top: number;
82
- svgWidth: number;
83
- }, barWidth?: number) => ReactNode;
84
- labelPosition?: BarChartLabelPosition;
85
- renderLabel?: (item: BarChartMarshalledGroup & {
86
- barWidth: number;
87
- }) => ReactNode;
88
- tooltipY?: number | undefined;
89
- tooltipBind?: boolean;
90
- stackedLine?: boolean;
91
- curve?: d3.CurveFactory;
92
- formatTooltipName?: (name: number | string) => number | string | ReactNode;
93
- formatTooltipValue?: (value: number, name?: string) => number | string | ReactNode;
94
- tooltipYDomain?: ((data: {
95
- data: BarChartMarshalledGroup[][];
96
- lineData?: BarChartLineData[];
97
- yScale: (value: number) => number;
98
- }) => number[]) | null;
99
- marshalledMap?: (data: BarChartMarshalledGroup[][]) => BarChartMarshalledGroup[][];
100
- drawBars?: (prop: {
101
- groups: d3.Selection<SVGGElement, BarChartMarshalledGroup[], SVGGElement, unknown>;
102
- yScale: (value: number) => number;
103
- marshalledData: BarChartMarshalledGroup[][];
104
- barWidth: number;
105
- }) => d3.Selection<Element | d3.EnterElement | Document | Window | SVGRectElement | null, BarChartMarshalledGroup, SVGGElement, BarChartMarshalledGroup[]> | d3.Transition<Element | d3.EnterElement | Document | Window | SVGPathElement | null, BarChartMarshalledGroup, SVGGElement, BarChartMarshalledGroup[]>;
106
- customize?: (args: {
107
- svg: d3.Selection<SVGSVGElement, unknown, null, undefined>;
108
- marshalledData: BarChartMarshalledGroup[][];
109
- yScale: (value: number) => number;
110
- xScale: d3.ScaleBand<string>;
111
- lineData?: BarChartLineData[];
112
- }) => void;
113
- onLabelItem?: (data: BarChartMarshalledGroup[]) => BarChartMarshalledGroup[];
114
- isBarTooltip?: boolean;
115
- xScaleItemWidth?: number;
116
- tooltipRoot?: Element;
117
- tooltipClassName?: string;
118
- selectable?: boolean;
119
- onSelect?: (value: [number, number]) => void;
120
- onBarClick?: (group: BarChartMarshalledGroup) => void;
121
- onBarHover?: (group?: BarChartMarshalledGroup) => void;
122
- }
123
- export type BarChartMergedData = (BarChartMarshalledGroup & BarChartLineData & {
124
- groupName: string;
125
- })[];
126
- export type BarChartMarshaling = {
127
- yScale: (value: number) => number;
128
- xScale: d3.ScaleBand<string>;
129
- marginTop?: number;
130
- } & Pick<BarChartProps, "barPadding" | "barWidth" | "data" | "colors">;
131
- export type BarChartMarshalledGroup = {
132
- x: number;
133
- y: number;
134
- height: number;
135
- color: string;
136
- value: number;
137
- groupName?: string;
138
- name: string;
139
- stackIndex: number;
140
- groupIndex: number;
141
- };
142
- export type BarChartLineData = {
143
- lineType: "line" | "area";
144
- name: string;
145
- values: (number | null)[];
146
- stroke?: string;
147
- fill?: string;
148
- };
@@ -1,14 +0,0 @@
1
- export declare const bubbleChartDefaultProps: {
2
- height: number;
3
- minSize: number;
4
- maxSize: number;
5
- margin: {
6
- top: number;
7
- right: number;
8
- bottom: number;
9
- left: number;
10
- };
11
- yAxisPadding: number;
12
- xAxisPadding: number;
13
- yScaleLabelPadding: number;
14
- };
@@ -1,2 +0,0 @@
1
- import { BubbleChartProps } from './types';
2
- export declare const draw: (node: HTMLElement | null, props: BubbleChartProps) => void;
@@ -1,2 +0,0 @@
1
- import { DrawGridProps } from './types';
2
- export declare const drawGrid: ({ svg, yScale, xScale, yTicksCount, drawGridX, drawGridY, }: DrawGridProps) => void;
@@ -1,8 +0,0 @@
1
- import { BubbleChartProps } from '../types';
2
- import * as d3 from 'd3';
3
- export type DrawGridProps = {
4
- svg: d3.Selection<SVGSVGElement, unknown, null, undefined>;
5
- yScale: d3.ScaleLinear<number, number>;
6
- xScale: d3.ScaleLinear<number, number>;
7
- yTicksCount: number;
8
- } & Pick<BubbleChartProps, 'drawGridX' | 'drawGridY'>;
@@ -1,2 +0,0 @@
1
- import { DrawTooltipProps } from './types';
2
- export declare const drawTooltip: ({ bubbles, tooltipRoot, tooltipClassName, renderTooltip, }: DrawTooltipProps) => void;
@@ -1 +0,0 @@
1
- export declare const Tooltip: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,4 +0,0 @@
1
- import { BubbleChartCustomizeProps, BubbleChartProps } from '../types';
2
- export type DrawTooltipProps = {
3
- bubbles: BubbleChartCustomizeProps['bubbles'];
4
- } & Pick<BubbleChartProps, 'tooltipRoot' | 'tooltipClassName' | 'renderTooltip'>;
@@ -1,3 +0,0 @@
1
- import { FC } from '../../../node_modules/@types/react';
2
- import { BubbleChartProps } from './types';
3
- export declare const BubbleChart: FC<BubbleChartProps>;
@@ -1,17 +0,0 @@
1
- import { JSXElementConstructor } from '../../../node_modules/@types/react';
2
- export declare const bubbleChartClassNames: {
3
- bubbleChartYAxis: string;
4
- bubbleChartYAxisZeroTick: string;
5
- bubbleChartXAxis: string;
6
- bubbleChartGridGlobal: string;
7
- bubbleChartGridLineX: string;
8
- bubbleChartGridLineY: string;
9
- bubbleChartCircle: string;
10
- bubbleChartYScaleLabel: string;
11
- bubbleChartTooltip: string;
12
- bubbleChartTooltipContainer: string;
13
- bubbleChartTooltipFlex: string;
14
- bubbleChartTip: string;
15
- };
16
- export declare const SvgWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
17
- export declare const TooltipStyles: JSXElementConstructor<any>;
@@ -1,55 +0,0 @@
1
- import { CSSProperties, PropsWithChildren } from '../../../node_modules/@types/react';
2
- import { Margin } from '../../common/types/margin';
3
- import * as d3 from "d3";
4
- export type BubbleChartData = {
5
- xValue: number;
6
- yValue: number;
7
- sizeValue: number;
8
- color?: string;
9
- stroke?: string;
10
- style?: string;
11
- name?: string;
12
- };
13
- export type RenderTooltipProps = {
14
- data: BubbleChartData;
15
- circle: SVGCircleElement;
16
- tooltip: d3.Selection<HTMLDivElement, unknown, d3.BaseType, any>;
17
- };
18
- export type BubbleChartCustomizeProps = {
19
- svg: d3.Selection<SVGSVGElement, unknown, null, undefined>;
20
- yScale: d3.ScaleLinear<number, number>;
21
- xScale: d3.ScaleLinear<number, number>;
22
- sizeScale: d3.ScaleLinear<number, number>;
23
- bubbles: d3.Selection<SVGCircleElement, BubbleChartData, SVGGElement, unknown>;
24
- };
25
- export interface BubbleChartProps extends PropsWithChildren {
26
- className?: string;
27
- style?: CSSProperties;
28
- width?: number;
29
- height?: number;
30
- margin?: Margin;
31
- data: BubbleChartData[];
32
- xAxisPadding?: number;
33
- yAxisPadding?: number;
34
- customYScale?: (yScale: (value: number) => number) => void;
35
- customYAxisLeft?: (yAxisLeft: d3.Axis<d3.NumberValue>) => void;
36
- customYAxis?: (yAxis: d3.Selection<SVGGElement, unknown, null, undefined>) => void;
37
- customXScale?: (xScale: d3.ScaleLinear<number, number, number>) => void;
38
- customXAxis?: (xAxis: d3.Selection<SVGGElement, unknown, null, undefined>) => void;
39
- minSize?: number;
40
- maxSize?: number;
41
- minYValue?: number;
42
- maxYValue?: number;
43
- drawGridY?: boolean;
44
- drawGridX?: boolean;
45
- scaleLog?: boolean;
46
- xScaleItemWidth?: number;
47
- bubbleStyle?: string;
48
- customize?: (props: BubbleChartCustomizeProps) => void;
49
- yScaleLabel?: string;
50
- yScaleLabelPadding?: number;
51
- enableTooltip?: boolean;
52
- tooltipRoot?: Element;
53
- tooltipClassName?: string;
54
- renderTooltip?: (props: RenderTooltipProps) => void;
55
- }
@@ -1 +0,0 @@
1
- export declare const unmount: (tooltipRoot?: Element) => void;
@@ -1,2 +0,0 @@
1
- import { CalendarChartProps } from './types';
2
- export declare const draw: (node: HTMLElement | null, props: CalendarChartProps) => void;
@@ -1,3 +0,0 @@
1
- import { FC } from '../../../node_modules/@types/react';
2
- import { CalendarChartProps } from './types';
3
- export declare const CalendarChart: FC<CalendarChartProps>;
@@ -1,18 +0,0 @@
1
- export declare const calendarChartClassNames: {
2
- legendContainer: string;
3
- legendTitle: string;
4
- legendTick: string;
5
- legendTickLine: string;
6
- legendTickText: string;
7
- calendarChart: string;
8
- calendarYear: string;
9
- calendarAxis: string;
10
- calendarBody: string;
11
- calendarHeader: string;
12
- calendarYearTitle: string;
13
- calendarWeekDay: string;
14
- calendarMonth: string;
15
- calendarDays: string;
16
- calendarDay: string;
17
- };
18
- export declare const SvgWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,22 +0,0 @@
1
- import { CSSProperties, PropsWithChildren } from '../../../node_modules/@types/react';
2
- import { Interpolator } from '../../common/types/interpolator';
3
- import { GetLegendProps } from '../../helpers/getLegend/types';
4
- export type OnEachDay = (data: CalendarChartData, element: HTMLDivElement, color: string) => void;
5
- export interface CalendarChartProps extends PropsWithChildren {
6
- className?: string;
7
- style?: CSSProperties;
8
- data: CalendarChartData[];
9
- startSunday?: boolean;
10
- weekdays?: string | string[];
11
- cellOffset?: number;
12
- cellSize?: number;
13
- interpolator?: Interpolator;
14
- monthSpacing?: number;
15
- onEachDay?: OnEachDay;
16
- colorRange?: [string, string];
17
- legendProps?: GetLegendProps;
18
- }
19
- export type CalendarChartData = {
20
- date: Date;
21
- value: number;
22
- };
@@ -1,3 +0,0 @@
1
- import { FC } from '../../../../node_modules/@types/react';
2
- import { BarProps } from './types';
3
- export declare const Bar: FC<BarProps>;
@@ -1 +0,0 @@
1
- export declare const BarStyled: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,11 +0,0 @@
1
- import { HorizontalBarChartProps, HorizontalBarChartMarshalingData } from '../types';
2
- import { UseTooltip } from '../hooks/useTooltip/types';
3
- export type BarProps = Pick<HorizontalBarChartProps, 'withTooltip' | 'formatNativeTitle' | 'tooltipBind'> & {
4
- bar: HorizontalBarChartMarshalingData;
5
- mouseMove: UseTooltip[0];
6
- mouseLeave: UseTooltip[1];
7
- isFirstChild: boolean;
8
- isLastChild: boolean;
9
- isOnlyChild: boolean;
10
- pointerEventsNone?: boolean;
11
- };
@@ -1,3 +0,0 @@
1
- import { FC } from '../../../../node_modules/@types/react';
2
- import { TooltipProps } from './types';
3
- export declare const Tooltip: FC<TooltipProps>;
@@ -1,5 +0,0 @@
1
- import { HorizontalBarChartMarshalingData, HorizontalBarChartProps } from '../types';
2
- export type TooltipProps = {
3
- bars: HorizontalBarChartMarshalingData[];
4
- className?: string;
5
- } & Pick<HorizontalBarChartProps, 'renderTooltip' | 'style'>;
@@ -1,2 +0,0 @@
1
- import { HorizontalBarChartProps, HorizontalBarChartScaleItem } from '../../types';
2
- export declare const useScale: ({ maxValue, scaleTicks, scaleDomain, }: Pick<HorizontalBarChartProps, "maxValue" | "scaleTicks" | "scaleDomain">) => HorizontalBarChartScaleItem[];
@@ -1,3 +0,0 @@
1
- import { FC } from '../../../../node_modules/@types/react';
2
- import { HorizontalBarChartProps } from '../types';
3
- export declare const XScale: FC<Pick<HorizontalBarChartProps, "maxValue" | "scaleTicks" | "renderTicks" | "scaleDomain">>;
@@ -1,3 +0,0 @@
1
- export declare const TickTd: import('styled-components').StyledComponent<"td", any, {}, never>;
2
- export declare const Ticks: import('styled-components').StyledComponent<"div", any, {}, never>;
3
- export declare const Tick: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,5 +0,0 @@
1
- import { HorizontalBarChartProps, HorizontalBarChartMarshalingData } from '../types';
2
- export declare const useMarshaling: ({ data, fullExtent, maxValue, labels, }: Pick<HorizontalBarChartProps, "data" | "fullExtent" | "maxValue" | "labels">) => {
3
- fullMax: number;
4
- data: HorizontalBarChartMarshalingData[][];
5
- };
@@ -1,12 +0,0 @@
1
- import { CSSProperties, ReactNode } from '../../../../node_modules/@types/react';
2
- import { UseTooltip } from './useTooltip/types';
3
- import { HorizontalBarChartMarshalingData, HorizontalBarChartProps } from '../types';
4
- export declare const useStackWrapper: (stackedTooltip?: boolean) => (({ item, mouseMove, mouseLeave, tooltipBind, ...props }: {
5
- style?: CSSProperties;
6
- item: HorizontalBarChartMarshalingData[];
7
- tooltipBind: HorizontalBarChartProps["tooltipBind"];
8
- mouseMove: UseTooltip[0];
9
- mouseLeave: UseTooltip[1];
10
- }) => import("react/jsx-runtime").JSX.Element) | (({ children }: {
11
- children?: ReactNode;
12
- }) => import("react/jsx-runtime").JSX.Element);
@@ -1,3 +0,0 @@
1
- import { HorizontalBarChartProps } from '../../types';
2
- import { UseTooltip } from './types';
3
- export declare const useTooltip: ({ renderTooltip, tooltipBind, tooltipStyle, tooltipRoot, tooltipClassName, hideTooltip, }: Pick<HorizontalBarChartProps, "renderTooltip" | "tooltipBind" | "tooltipStyle" | "tooltipRoot" | "tooltipClassName" | "hideTooltip">) => UseTooltip;
@@ -1,6 +0,0 @@
1
- import { MouseEvent } from '../../../../../node_modules/@types/react';
2
- import { HorizontalBarChartMarshalingData } from '../../types';
3
- export type UseTooltip = [
4
- (event: MouseEvent, bars: HorizontalBarChartMarshalingData[]) => void,
5
- () => void
6
- ];
@@ -1,3 +0,0 @@
1
- import { FC } from '../../../node_modules/@types/react';
2
- import { HorizontalBarChartProps } from './types';
3
- export declare const HorizontalBarChart: FC<HorizontalBarChartProps>;