@semcore/d3-chart 2.3.5 → 2.3.7

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 (159) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/lib/cjs/Area.js +9 -9
  3. package/lib/cjs/Axis.js +14 -14
  4. package/lib/cjs/Bar.js +8 -8
  5. package/lib/cjs/Bubble.js +10 -10
  6. package/lib/cjs/Donut.js +7 -7
  7. package/lib/cjs/Dots.js +9 -9
  8. package/lib/cjs/HorizontalBar.js +8 -8
  9. package/lib/cjs/Hover.js +4 -4
  10. package/lib/cjs/Line.js +8 -8
  11. package/lib/cjs/Plot.js +6 -5
  12. package/lib/cjs/Plot.js.map +1 -1
  13. package/lib/cjs/RadialTree.js +11 -11
  14. package/lib/cjs/ReferenceLine.js +10 -10
  15. package/lib/cjs/ScatterPlot.js +7 -7
  16. package/lib/cjs/Tooltip.js +8 -8
  17. package/lib/cjs/Venn.js +7 -7
  18. package/lib/cjs/a11y/PlotA11yModule.js +3 -3
  19. package/lib/cjs/a11y/PlotA11yView.js +4 -4
  20. package/lib/cjs/style/plot.shadow.css +4 -0
  21. package/lib/cjs/types/Area.d.js +2 -0
  22. package/lib/cjs/types/Area.d.js.map +1 -0
  23. package/lib/cjs/types/Axis.d.js +2 -0
  24. package/lib/cjs/types/Axis.d.js.map +1 -0
  25. package/lib/cjs/types/Bar.d.js +2 -0
  26. package/lib/cjs/types/Bar.d.js.map +1 -0
  27. package/lib/cjs/types/Bubble.d.js +2 -0
  28. package/lib/cjs/types/Bubble.d.js.map +1 -0
  29. package/lib/cjs/types/ClipPath.d.js +2 -0
  30. package/lib/cjs/types/ClipPath.d.js.map +1 -0
  31. package/lib/cjs/types/Donut.d.js +2 -0
  32. package/lib/cjs/types/Donut.d.js.map +1 -0
  33. package/lib/cjs/types/GroupBar.d.js +2 -0
  34. package/lib/cjs/types/GroupBar.d.js.map +1 -0
  35. package/lib/cjs/types/HorizontalBar.d.js +2 -0
  36. package/lib/cjs/types/HorizontalBar.d.js.map +1 -0
  37. package/lib/cjs/types/Hover.d.js +2 -0
  38. package/lib/cjs/types/Hover.d.js.map +1 -0
  39. package/lib/cjs/types/Line.d.js +2 -0
  40. package/lib/cjs/types/Line.d.js.map +1 -0
  41. package/lib/cjs/types/Plot.d.js +2 -0
  42. package/lib/cjs/types/Plot.d.js.map +1 -0
  43. package/lib/cjs/types/ReferenceLine.d.js +2 -0
  44. package/lib/cjs/types/ReferenceLine.d.js.map +1 -0
  45. package/lib/cjs/types/ResponsiveContainer.d.js +2 -0
  46. package/lib/cjs/types/ResponsiveContainer.d.js.map +1 -0
  47. package/lib/cjs/types/ScatterPlot.d.js +2 -0
  48. package/lib/cjs/types/ScatterPlot.d.js.map +1 -0
  49. package/lib/cjs/types/StackBar.d.js +2 -0
  50. package/lib/cjs/types/StackBar.d.js.map +1 -0
  51. package/lib/cjs/types/StackedArea.d.js +2 -0
  52. package/lib/cjs/types/StackedArea.d.js.map +1 -0
  53. package/lib/cjs/types/Tooltip.d.js +2 -0
  54. package/lib/cjs/types/Tooltip.d.js.map +1 -0
  55. package/lib/cjs/types/Venn.d.js +2 -0
  56. package/lib/cjs/types/Venn.d.js.map +1 -0
  57. package/lib/cjs/types/context.d.js +2 -0
  58. package/lib/cjs/types/context.d.js.map +1 -0
  59. package/lib/cjs/types/index.d.js +378 -0
  60. package/lib/cjs/types/index.d.js.map +1 -0
  61. package/lib/es6/Area.js +9 -9
  62. package/lib/es6/Axis.js +14 -14
  63. package/lib/es6/Bar.js +8 -8
  64. package/lib/es6/Bubble.js +10 -10
  65. package/lib/es6/Donut.js +7 -7
  66. package/lib/es6/Dots.js +9 -9
  67. package/lib/es6/HorizontalBar.js +8 -8
  68. package/lib/es6/Hover.js +4 -4
  69. package/lib/es6/Line.js +8 -8
  70. package/lib/es6/Plot.js +6 -5
  71. package/lib/es6/Plot.js.map +1 -1
  72. package/lib/es6/RadialTree.js +11 -11
  73. package/lib/es6/ReferenceLine.js +10 -10
  74. package/lib/es6/ScatterPlot.js +7 -7
  75. package/lib/es6/Tooltip.js +8 -8
  76. package/lib/es6/Venn.js +7 -7
  77. package/lib/es6/a11y/PlotA11yModule.js +3 -3
  78. package/lib/es6/a11y/PlotA11yView.js +4 -4
  79. package/lib/es6/style/plot.shadow.css +4 -0
  80. package/lib/es6/types/Area.d.js +2 -0
  81. package/lib/es6/types/Area.d.js.map +1 -0
  82. package/lib/es6/types/Axis.d.js +2 -0
  83. package/lib/es6/types/Axis.d.js.map +1 -0
  84. package/lib/es6/types/Bar.d.js +2 -0
  85. package/lib/es6/types/Bar.d.js.map +1 -0
  86. package/lib/es6/types/Bubble.d.js +2 -0
  87. package/lib/es6/types/Bubble.d.js.map +1 -0
  88. package/lib/es6/types/ClipPath.d.js +2 -0
  89. package/lib/es6/types/ClipPath.d.js.map +1 -0
  90. package/lib/es6/types/Donut.d.js +2 -0
  91. package/lib/es6/types/Donut.d.js.map +1 -0
  92. package/lib/es6/types/GroupBar.d.js +2 -0
  93. package/lib/es6/types/GroupBar.d.js.map +1 -0
  94. package/lib/es6/types/HorizontalBar.d.js +2 -0
  95. package/lib/es6/types/HorizontalBar.d.js.map +1 -0
  96. package/lib/es6/types/Hover.d.js +2 -0
  97. package/lib/es6/types/Hover.d.js.map +1 -0
  98. package/lib/es6/types/Line.d.js +2 -0
  99. package/lib/es6/types/Line.d.js.map +1 -0
  100. package/lib/es6/types/Plot.d.js +2 -0
  101. package/lib/es6/types/Plot.d.js.map +1 -0
  102. package/lib/es6/types/ReferenceLine.d.js +2 -0
  103. package/lib/es6/types/ReferenceLine.d.js.map +1 -0
  104. package/lib/es6/types/ResponsiveContainer.d.js +2 -0
  105. package/lib/es6/types/ResponsiveContainer.d.js.map +1 -0
  106. package/lib/es6/types/ScatterPlot.d.js +2 -0
  107. package/lib/es6/types/ScatterPlot.d.js.map +1 -0
  108. package/lib/es6/types/StackBar.d.js +2 -0
  109. package/lib/es6/types/StackBar.d.js.map +1 -0
  110. package/lib/es6/types/StackedArea.d.js +2 -0
  111. package/lib/es6/types/StackedArea.d.js.map +1 -0
  112. package/lib/es6/types/Tooltip.d.js +2 -0
  113. package/lib/es6/types/Tooltip.d.js.map +1 -0
  114. package/lib/es6/types/Venn.d.js +2 -0
  115. package/lib/es6/types/Venn.d.js.map +1 -0
  116. package/lib/es6/types/context.d.js +2 -0
  117. package/lib/es6/types/context.d.js.map +1 -0
  118. package/lib/{cjs/types/index.d.ts → es6/types/index.d.js} +4 -22
  119. package/lib/es6/types/index.d.js.map +1 -0
  120. package/package.json +5 -2
  121. package/lib/cjs/types/Area.d.ts +0 -48
  122. package/lib/cjs/types/Axis.d.ts +0 -64
  123. package/lib/cjs/types/Bar.d.ts +0 -52
  124. package/lib/cjs/types/Bubble.d.ts +0 -32
  125. package/lib/cjs/types/ClipPath.d.ts +0 -26
  126. package/lib/cjs/types/Donut.d.ts +0 -46
  127. package/lib/cjs/types/GroupBar.d.ts +0 -20
  128. package/lib/cjs/types/HorizontalBar.d.ts +0 -29
  129. package/lib/cjs/types/Hover.d.ts +0 -15
  130. package/lib/cjs/types/Line.d.ts +0 -50
  131. package/lib/cjs/types/Plot.d.ts +0 -91
  132. package/lib/cjs/types/ReferenceLine.d.ts +0 -31
  133. package/lib/cjs/types/ResponsiveContainer.d.ts +0 -20
  134. package/lib/cjs/types/ScatterPlot.d.ts +0 -27
  135. package/lib/cjs/types/StackBar.d.ts +0 -26
  136. package/lib/cjs/types/StackedArea.d.ts +0 -26
  137. package/lib/cjs/types/Tooltip.d.ts +0 -33
  138. package/lib/cjs/types/Venn.d.ts +0 -45
  139. package/lib/cjs/types/context.d.ts +0 -6
  140. package/lib/es6/types/Area.d.ts +0 -48
  141. package/lib/es6/types/Axis.d.ts +0 -64
  142. package/lib/es6/types/Bar.d.ts +0 -52
  143. package/lib/es6/types/Bubble.d.ts +0 -32
  144. package/lib/es6/types/ClipPath.d.ts +0 -26
  145. package/lib/es6/types/Donut.d.ts +0 -46
  146. package/lib/es6/types/GroupBar.d.ts +0 -20
  147. package/lib/es6/types/HorizontalBar.d.ts +0 -29
  148. package/lib/es6/types/Hover.d.ts +0 -15
  149. package/lib/es6/types/Line.d.ts +0 -50
  150. package/lib/es6/types/Plot.d.ts +0 -91
  151. package/lib/es6/types/ReferenceLine.d.ts +0 -31
  152. package/lib/es6/types/ResponsiveContainer.d.ts +0 -20
  153. package/lib/es6/types/ScatterPlot.d.ts +0 -27
  154. package/lib/es6/types/StackBar.d.ts +0 -26
  155. package/lib/es6/types/StackedArea.d.ts +0 -26
  156. package/lib/es6/types/Tooltip.d.ts +0 -33
  157. package/lib/es6/types/Venn.d.ts +0 -45
  158. package/lib/es6/types/context.d.ts +0 -6
  159. package/lib/es6/types/index.d.ts +0 -59
@@ -1,31 +0,0 @@
1
- import { CProps, ReturnEl } from '@semcore/core';
2
- import IContext from './context';
3
-
4
- export interface IReferenceLineProps extends IContext {
5
- /** The position of the title relative reference line
6
- * @default 'left' */
7
- position?: 'top' | 'right' | 'bottom' | 'left';
8
- /** Value element of data */
9
- value: any;
10
- }
11
-
12
- export interface IReferenceLineTitleProps extends IContext {
13
- /** The position of the axis relative reference line */
14
- position?: 'top' | 'right' | 'bottom' | 'left';
15
- /** Value element of data */
16
- value: any;
17
- }
18
-
19
- export interface IReferenceLineBackgroundProps extends IContext {
20
- /** The position of the axis relative reference line */
21
- position?: 'top' | 'right' | 'bottom' | 'left';
22
- /** Value element of data */
23
- value: any;
24
- }
25
-
26
- declare const ReferenceLine: (<T>(props: CProps<IReferenceLineProps & T>) => ReturnEl) & {
27
- Title: <T>(props: CProps<IReferenceLineTitleProps & T>) => ReturnEl;
28
- Background: <T>(props: CProps<IReferenceLineBackgroundProps & T>) => ReturnEl;
29
- };
30
-
31
- export default ReferenceLine;
@@ -1,20 +0,0 @@
1
- import { IBoxProps } from '@semcore/flex-box';
2
- import { CProps, ReturnEl } from '@semcore/core';
3
-
4
- export interface IResponsiveContainerProps extends IBoxProps {
5
- /** Relation between height and width dimensions block */
6
- aspect?: number;
7
- /** Callback which will be called after changing the block size */
8
- onResize?: (size: [number, number], entries: ResizeObserverEntry[]) => void;
9
- }
10
-
11
- export interface IResponsiveContainerContext {
12
- width?: number;
13
- height?: number;
14
- }
15
-
16
- declare const ResponsiveContainer: <T>(
17
- props: CProps<IResponsiveContainerProps & T, IResponsiveContainerContext>,
18
- ) => ReturnEl;
19
-
20
- export default ResponsiveContainer;
@@ -1,27 +0,0 @@
1
- import { CProps, ReturnEl } from '@semcore/core';
2
- import IContext from './context';
3
-
4
- export interface IScatterPlotProps extends IContext {
5
- /** Field from data for XAxis */
6
- x: string;
7
- /** Field from data for YAxis */
8
- y: string;
9
- /** Field from data for circle value */
10
- value?: string;
11
- /** Circle color */
12
- color?: string;
13
- /** Circle value color */
14
- valueColor?: string;
15
- /** Animation duration in ms
16
- * @default 500
17
- */
18
- duration?: number;
19
- /** Radius of circles
20
- * @default 5.5 or 12 with value
21
- */
22
- r?: number;
23
- }
24
-
25
- declare const ScatterPlot: <T>(props: CProps<IScatterPlotProps & T>) => ReturnEl;
26
-
27
- export default ScatterPlot;
@@ -1,26 +0,0 @@
1
- import { CProps, ReturnEl } from '@semcore/core';
2
- import IContext from './context';
3
- import { IBarContext, IBarProps } from './Bar';
4
- import { IHorizontalBarProps } from './HorizontalBar';
5
-
6
- export interface IStackBarProps extends IContext {
7
- /** Field from data for XAxis */
8
- x?: string;
9
- /** Field from data for YAxis */
10
- y?: string;
11
- /** Stack generators
12
- * @default d3.stack() */
13
- stack?: any;
14
- }
15
-
16
- export interface IStackBarContext {
17
- /** Series is an array of points, where each point corresponds to the element in the input data. */
18
- series: any[];
19
- }
20
-
21
- declare const StackBar: (<T>(props: CProps<IStackBarProps & T, IStackBarContext>) => ReturnEl) & {
22
- Bar: <T>(props: CProps<IBarProps & T, IBarContext>) => ReturnEl;
23
- HorizontalBar: <T>(props: CProps<IHorizontalBarProps & T, IBarContext>) => ReturnEl;
24
- };
25
-
26
- export default StackBar;
@@ -1,26 +0,0 @@
1
- import { CProps, ReturnEl } from '@semcore/core';
2
- import IContext from './context';
3
- import Area from './Area';
4
-
5
- export interface IStackedAreaProps extends IContext {
6
- /** Field from data for XAxis */
7
- x?: string;
8
- /** Field from data for YAxis */
9
- y?: string;
10
- /** Stack generators
11
- * @default d3.stack() */
12
- stack?: any;
13
- }
14
-
15
- export interface IStackedAreaContext {
16
- /** Series is an array of points, where each point corresponds to the element in the input data. */
17
- series: any[];
18
- }
19
-
20
- declare const StackedArea: (<T>(
21
- props: CProps<IStackedAreaProps & T, IStackedAreaContext>,
22
- ) => ReturnEl) & {
23
- Area: typeof Area;
24
- };
25
-
26
- export default StackedArea;
@@ -1,33 +0,0 @@
1
- import { ComponentProps } from 'react';
2
- import Popper, { IPopperProps, IPopperTriggerProps } from '@semcore/popper';
3
- import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';
4
- import { IBoxProps } from '@semcore/flex-box';
5
- import IContext from './context';
6
-
7
- export interface ITooltipChartProps extends IPopperProps, IPopperTriggerProps, IContext {
8
- /** Field from data for XAxis */
9
- x?: string;
10
- /** Field from data for YAxis */
11
- y?: string;
12
- }
13
-
14
- export interface ITooltipChartContext {
15
- getTriggerProps: PropGetterFn;
16
- getPopperProps: PropGetterFn;
17
- /** Index active value for Axis x */
18
- xIndex: number | null;
19
- /** Index active value for Axis y */
20
- yIndex: number | null;
21
- }
22
-
23
- declare const Tooltip: (<T>(
24
- props: CProps<ITooltipChartProps & T, ITooltipChartContext>,
25
- ) => ReturnEl) & {
26
- Trigger: <T>(props: CProps<ComponentProps<typeof Popper.Trigger> & T>) => ReturnEl;
27
- Popper: <T>(props: CProps<ComponentProps<typeof Popper.Popper> & T>) => ReturnEl;
28
- Title: <T>(props: CProps<IBoxProps & T>) => ReturnEl;
29
- Dot: <T>(props: CProps<IBoxProps & { color?: string } & T>) => ReturnEl;
30
- Footer: <T>(props: CProps<T>) => null;
31
- };
32
-
33
- export default Tooltip;
@@ -1,45 +0,0 @@
1
- import { CProps, ReturnEl } from '@semcore/core';
2
- import IContext from './context';
3
- import { IFadeInOutProps } from '@semcore/animation';
4
-
5
- export interface IVennProps extends IContext, IFadeInOutProps {
6
- /**
7
- * Rotate sets in the chart
8
- * @default Math.PI / 2
9
- */
10
- orientation?: number;
11
- /**
12
- * The function for sorting sets inside the chart
13
- * @default (circle1, circle2) => circle2.radius - circle1.radius
14
- */
15
- orientationOrder?: (c1: number, c2: number) => number;
16
- }
17
-
18
- export interface ICircleProps extends IContext {
19
- /**
20
- * Name of the field in the data
21
- * */
22
- dataKey: string;
23
- /** Color circle
24
- @default #3AB011
25
- **/
26
- color?: string;
27
- /** Animation duration in ms
28
- * @default 500
29
- */
30
- duration?: number;
31
- }
32
-
33
- export interface IIntersectionProps extends IContext, IFadeInOutProps {
34
- /**
35
- * Name of the field in the data
36
- * */
37
- dataKey: string;
38
- }
39
-
40
- declare const Venn: (<T>(props: CProps<IVennProps & T>) => ReturnEl) & {
41
- Circle: <T>(props: CProps<ICircleProps & T>) => ReturnEl;
42
- Intersection: <T>(props: CProps<IIntersectionProps & T>) => ReturnEl;
43
- };
44
-
45
- export default Venn;
@@ -1,6 +0,0 @@
1
- export default interface IContext {
2
- /** Data for graphic */
3
- data?: any;
4
- /** Scale for svg element */
5
- scale?: any[];
6
- }
@@ -1,59 +0,0 @@
1
- // Utils
2
- export declare function minMax(data: any, key: string | number): any;
3
-
4
- // Color
5
- export declare const colors: { [key: string]: string };
6
-
7
- export { default as Plot } from './Plot';
8
- export * from './Plot';
9
-
10
- export * from './Axis';
11
- export * from './Hover';
12
-
13
- export { default as ResponsiveContainer } from './ResponsiveContainer';
14
- export * from './ResponsiveContainer';
15
-
16
- export { default as Line } from './Line';
17
- export * from './Line';
18
-
19
- export { default as Bar } from './Bar';
20
- export * from './Bar';
21
-
22
- export { default as HorizontalBar } from './HorizontalBar';
23
- export * from './HorizontalBar';
24
-
25
- export { default as GroupBar } from './GroupBar';
26
- export * from './GroupBar';
27
-
28
- export { default as StackBar } from './StackBar';
29
- export * from './StackBar';
30
-
31
- export { default as Area } from './Area';
32
- export * from './Area';
33
-
34
- export { default as StackedArea } from './StackedArea';
35
- export * from './StackedArea';
36
-
37
- /** It becomes resolvable after building and moving file to lib dir */
38
- // eslint-disable-next-line import/no-unresolved
39
- export { default as RadialTree } from './RadialTree';
40
- // eslint-disable-next-line import/no-unresolved
41
- export * from './RadialTree';
42
-
43
- export { default as Donut } from './Donut';
44
- export * from './Donut';
45
-
46
- export { default as Tooltip } from './Tooltip';
47
- export * from './Tooltip';
48
-
49
- export { default as ScatterPlot } from './ScatterPlot';
50
- export * from './ScatterPlot';
51
-
52
- export { default as Bubble } from './Bubble';
53
- export * from './Bubble';
54
-
55
- export { default as ReferenceLine } from './ReferenceLine';
56
- export * from './ReferenceLine';
57
-
58
- export { default as Venn } from './Venn';
59
- export * from './Venn';