@semcore/d3-chart 3.14.1 → 3.15.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.
Files changed (69) hide show
  1. package/CHANGELOG.md +8 -1
  2. package/lib/cjs/Area.js +9 -9
  3. package/lib/cjs/Axis.js +14 -14
  4. package/lib/cjs/Bar.js +14 -11
  5. package/lib/cjs/Bar.js.map +1 -1
  6. package/lib/cjs/Bubble.js +10 -10
  7. package/lib/cjs/Donut.js +7 -7
  8. package/lib/cjs/Dots.js +10 -10
  9. package/lib/cjs/GroupBar.js +19 -7
  10. package/lib/cjs/GroupBar.js.map +1 -1
  11. package/lib/cjs/HorizontalBar.js +14 -11
  12. package/lib/cjs/HorizontalBar.js.map +1 -1
  13. package/lib/cjs/Hover.js +3 -3
  14. package/lib/cjs/Line.js +93 -32
  15. package/lib/cjs/Line.js.map +1 -1
  16. package/lib/cjs/Plot.js +3 -3
  17. package/lib/cjs/Radar.js +17 -17
  18. package/lib/cjs/RadialTree.js +12 -12
  19. package/lib/cjs/ReferenceLine.js +9 -9
  20. package/lib/cjs/ScatterPlot.js +7 -7
  21. package/lib/cjs/StackBar.js +8 -4
  22. package/lib/cjs/StackBar.js.map +1 -1
  23. package/lib/cjs/Tooltip.js +8 -8
  24. package/lib/cjs/Venn.js +7 -7
  25. package/lib/cjs/a11y/PlotA11yModule.js +2 -2
  26. package/lib/cjs/a11y/PlotA11yView.js +3 -3
  27. package/lib/cjs/style/line.shadow.css +11 -0
  28. package/lib/cjs/types/Bar.d.js.map +1 -1
  29. package/lib/cjs/types/GroupBar.d.js.map +1 -1
  30. package/lib/cjs/types/HorizontalBar.d.js.map +1 -1
  31. package/lib/cjs/types/Line.d.js.map +1 -1
  32. package/lib/cjs/types/StackBar.d.js.map +1 -1
  33. package/lib/es6/Area.js +9 -9
  34. package/lib/es6/Axis.js +14 -14
  35. package/lib/es6/Bar.js +14 -11
  36. package/lib/es6/Bar.js.map +1 -1
  37. package/lib/es6/Bubble.js +10 -10
  38. package/lib/es6/Donut.js +7 -7
  39. package/lib/es6/Dots.js +10 -10
  40. package/lib/es6/GroupBar.js +19 -7
  41. package/lib/es6/GroupBar.js.map +1 -1
  42. package/lib/es6/HorizontalBar.js +14 -11
  43. package/lib/es6/HorizontalBar.js.map +1 -1
  44. package/lib/es6/Hover.js +3 -3
  45. package/lib/es6/Line.js +93 -33
  46. package/lib/es6/Line.js.map +1 -1
  47. package/lib/es6/Plot.js +3 -3
  48. package/lib/es6/Radar.js +17 -17
  49. package/lib/es6/RadialTree.js +12 -12
  50. package/lib/es6/ReferenceLine.js +9 -9
  51. package/lib/es6/ScatterPlot.js +7 -7
  52. package/lib/es6/StackBar.js +8 -4
  53. package/lib/es6/StackBar.js.map +1 -1
  54. package/lib/es6/Tooltip.js +8 -8
  55. package/lib/es6/Venn.js +7 -7
  56. package/lib/es6/a11y/PlotA11yModule.js +2 -2
  57. package/lib/es6/a11y/PlotA11yView.js +3 -3
  58. package/lib/es6/style/line.shadow.css +11 -0
  59. package/lib/es6/types/Bar.d.js.map +1 -1
  60. package/lib/es6/types/GroupBar.d.js.map +1 -1
  61. package/lib/es6/types/HorizontalBar.d.js.map +1 -1
  62. package/lib/es6/types/Line.d.js.map +1 -1
  63. package/lib/es6/types/StackBar.d.js.map +1 -1
  64. package/lib/types/Bar.d.ts +6 -0
  65. package/lib/types/GroupBar.d.ts +5 -0
  66. package/lib/types/HorizontalBar.d.ts +4 -0
  67. package/lib/types/Line.d.ts +13 -1
  68. package/lib/types/StackBar.d.ts +4 -0
  69. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"HorizontalBar.d.js","names":[],"sources":["../../../src/types/HorizontalBar.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { BarContext, BackgroundProps } from './Bar';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IHorizontalBarProps extends HorizontalBarProps, UnknownProperties {}\nexport type HorizontalBarProps = Context & {\n /** Field name from `data` array item for the XAxis */\n x?: string;\n /** Field name from `data` array item for the YAxis */\n y?: string;\n /** Line color\n * @default '#50aef4'*/\n color?: string;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Radius of curvature\n * @default 2\n */\n r?: number | number[];\n /** Enables element transparency */\n transparent?: boolean;\n};\n\ndeclare const HorizontalBar: IntergalacticD3Component<'path', HorizontalBarProps, BarContext> & {\n Background: IntergalacticD3Component<'rect', BackgroundProps, Context>;\n};\n\nexport default HorizontalBar;\n"],"mappings":""}
1
+ {"version":3,"file":"HorizontalBar.d.js","names":[],"sources":["../../../src/types/HorizontalBar.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { BarContext, BackgroundProps } from './Bar';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IHorizontalBarProps extends HorizontalBarProps, UnknownProperties {}\nexport type HorizontalBarProps = Context & {\n /** Field name from `data` array item for the XAxis */\n x?: string;\n /** Field name from `data` array item for the YAxis */\n y?: string;\n /** Line color\n * @default '#50aef4'*/\n color?: string;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Radius of curvature\n * @default 2\n */\n r?: number | number[];\n /** Enables element transparency */\n transparent?: boolean;\n /**\n * The maximum width of each Bar\n */\n maxBarSize?: number;\n};\n\ndeclare const HorizontalBar: IntergalacticD3Component<'path', HorizontalBarProps, BarContext> & {\n Background: IntergalacticD3Component<'rect', BackgroundProps, Context>;\n};\n\nexport default HorizontalBar;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"Line.d.js","names":[],"sources":["../../../src/types/Line.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { CurveFactory } from 'd3-shape';\nimport { FadeInOutProps } from '@semcore/animation';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface ILineProps extends LineProps, UnknownProperties {}\nexport type LineProps = Context & {\n /** Field name from `data` array item for the XAxis */\n x?: string;\n /** Field name from `data` array item for the YAxis */\n y?: string;\n /** Line color\n * @default '#50aef4'*/\n color?: string;\n /** Element hide property */\n hide?: boolean;\n /** Curve method */\n curve?: CurveFactory;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Enables element transparency */\n transparent?: boolean;\n};\n\n/** @deprecated */\nexport interface ILineDotsProps extends LineDotsProps, UnknownProperties {}\nexport type LineDotsProps = Context &\n Omit<FadeInOutProps, 'display'> & {\n /** Show all Dot */\n display?: boolean;\n /** Hide property */\n hide?: boolean;\n /** Index active of element */\n activeIndex?: number;\n /** Dot radius, radius of active dot is 4/3 times larger\n * @default 6\n */\n radius?: number;\n };\n\n/** @deprecated */\nexport interface ILineDotsContext extends LineDotsContext, UnknownProperties {}\nexport type LineDotsContext = {\n /** Value element of data */\n /** @deprecated */\n value?: any;\n /** Index element of data */\n index?: number;\n};\n\n/** @deprecated */\nexport interface ILineNullProps extends LineNullProps, UnknownProperties {}\nexport type LineNullProps = Context & {\n /** Hide property */\n hide?: boolean;\n};\n\ndeclare const Line: IntergalacticD3Component<'line', LineProps, Context> & {\n Dots: IntergalacticD3Component<'circle', LineDotsProps, LineDotsContext>;\n Null: IntergalacticD3Component<'path', LineNullProps>;\n};\n\nexport default Line;\n"],"mappings":""}
1
+ {"version":3,"file":"Line.d.js","names":[],"sources":["../../../src/types/Line.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { curveCardinal, CurveFactory } from 'd3-shape';\nimport { FadeInOutProps } from '@semcore/animation';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface ILineProps extends LineProps, UnknownProperties {}\nexport type LineProps = Context & {\n /** Field name from `data` array item for the XAxis */\n x?: string;\n /** Field name from `data` array item for the YAxis */\n y?: string;\n /** Line color\n * @default '#50aef4'*/\n color?: string;\n /** Element hide property */\n hide?: boolean;\n /** Curve method */\n curve?: CurveFactory;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Enables element transparency */\n transparent?: boolean;\n};\n\n/** @deprecated */\nexport interface ILineDotsProps extends LineDotsProps, UnknownProperties {}\nexport type LineDotsProps = Context &\n Omit<FadeInOutProps, 'display'> & {\n /** Show all Dot */\n display?: boolean;\n /** Hide property */\n hide?: boolean;\n /** Index active of element */\n activeIndex?: number;\n /** Dot radius, radius of active dot is 4/3 times larger\n * @default 6\n */\n radius?: number;\n };\n\n/** @deprecated */\nexport interface ILineDotsContext extends LineDotsContext, UnknownProperties {}\nexport type LineDotsContext = {\n /** Value element of data */\n /** @deprecated */\n value?: any;\n /** Index element of data */\n index?: number;\n};\n\n/** @deprecated */\nexport interface ILineNullProps extends LineNullProps, UnknownProperties {}\nexport type LineNullProps = Context & {\n /** Hide property */\n hide?: boolean;\n};\n\nexport type LineAreaProps = Omit<LineProps, 'transparent'> & {\n /**\n * Field name from `data` array for y0 point by the YAxis for the Area\n */\n y0: string;\n /**\n * Field name from `data` array for y1 point by the YAxis for the Area\n */\n y1: string;\n};\n\ndeclare const Line: IntergalacticD3Component<'line', LineProps, Context> & {\n Dots: IntergalacticD3Component<'circle', LineDotsProps, LineDotsContext>;\n Null: IntergalacticD3Component<'path', LineNullProps>;\n Area: IntergalacticD3Component<'path', LineAreaProps>;\n};\n\nexport default Line;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"StackBar.d.js","names":[],"sources":["../../../src/types/StackBar.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { BarContext, BarProps } from './Bar';\nimport { HorizontalBarProps } from './HorizontalBar';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IStackBarProps extends StackBarProps, UnknownProperties {}\nexport type StackBarProps = Context & {\n /** Field name from `data` array item for the XAxis */\n x?: string;\n /** Field name from `data` array item for the YAxis */\n y?: string;\n /** Stack generators\n * @default d3.stack() */\n /** @deprecated */\n stack?: any;\n};\n\n/** @deprecated */\nexport interface IStackBarContext extends StackBarContext, UnknownProperties {}\nexport type StackBarContext = {\n /** Series is an array of points, where each point corresponds to the element in the input data. */\n /** @deprecated */\n series: any[];\n};\n\ndeclare const StackBar: IntergalacticD3Component<'g', StackBarProps, StackBarContext> & {\n Bar: IntergalacticD3Component<'path', BarProps, BarContext>;\n HorizontalBar: IntergalacticD3Component<'path', HorizontalBarProps, BarContext>;\n};\n\nexport default StackBar;\n"],"mappings":""}
1
+ {"version":3,"file":"StackBar.d.js","names":[],"sources":["../../../src/types/StackBar.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { BarContext, BarProps } from './Bar';\nimport { HorizontalBarProps } from './HorizontalBar';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IStackBarProps extends StackBarProps, UnknownProperties {}\nexport type StackBarProps = Context & {\n /** Field name from `data` array item for the XAxis */\n x?: string;\n /** Field name from `data` array item for the YAxis */\n y?: string;\n /** Stack generators\n * @default d3.stack() */\n /** @deprecated */\n stack?: any;\n /**\n * The maximum width of each Bar\n */\n maxBarSize?: number;\n};\n\n/** @deprecated */\nexport interface IStackBarContext extends StackBarContext, UnknownProperties {}\nexport type StackBarContext = {\n /** Series is an array of points, where each point corresponds to the element in the input data. */\n /** @deprecated */\n series: any[];\n};\n\ndeclare const StackBar: IntergalacticD3Component<'g', StackBarProps, StackBarContext> & {\n Bar: IntergalacticD3Component<'path', BarProps, BarContext>;\n HorizontalBar: IntergalacticD3Component<'path', HorizontalBarProps, BarContext>;\n};\n\nexport default StackBar;\n"],"mappings":""}
@@ -1,6 +1,7 @@
1
1
  import { UnknownProperties } from '@semcore/core';
2
2
  import { Context } from './context';
3
3
  import { IntergalacticD3Component } from './Plot';
4
+ import { ScaleBand, ScaleLinear } from 'd3-scale';
4
5
 
5
6
  /** @deprecated */
6
7
  export interface IBarProps extends BarProps, UnknownProperties {}
@@ -32,11 +33,16 @@ export type BarProps = Context & {
32
33
  onClick?: (data: { [key: string]: string | number }, event: Event) => void;
33
34
  /** Enables element transparency */
34
35
  transparent?: boolean;
36
+ /**
37
+ * The maximum width of each Bar
38
+ */
39
+ maxBarSize?: number;
35
40
  };
36
41
 
37
42
  /** @deprecated */
38
43
  export interface IBarContext extends BarContext, UnknownProperties {}
39
44
  export type BarContext = {
45
+ scale: [ScaleBand<any>, ScaleLinear<any, any>];
40
46
  /** @deprecated */
41
47
  value: unknown;
42
48
  /** Index in `data` array */
@@ -14,6 +14,11 @@ export type GroupBarProps = Context & {
14
14
  /** Scale for group bars */
15
15
  /** @deprecated */
16
16
  scaleGroup?: any;
17
+
18
+ /**
19
+ * The maximum width of each Bar
20
+ */
21
+ maxBarSize?: number;
17
22
  };
18
23
 
19
24
  declare const GroupBar: IntergalacticD3Component<'g', GroupBarProps> & {
@@ -23,6 +23,10 @@ export type HorizontalBarProps = Context & {
23
23
  r?: number | number[];
24
24
  /** Enables element transparency */
25
25
  transparent?: boolean;
26
+ /**
27
+ * The maximum width of each Bar
28
+ */
29
+ maxBarSize?: number;
26
30
  };
27
31
 
28
32
  declare const HorizontalBar: IntergalacticD3Component<'path', HorizontalBarProps, BarContext> & {
@@ -1,6 +1,6 @@
1
1
  import { UnknownProperties } from '@semcore/core';
2
2
  import { Context } from './context';
3
- import { CurveFactory } from 'd3-shape';
3
+ import { curveCardinal, CurveFactory } from 'd3-shape';
4
4
  import { FadeInOutProps } from '@semcore/animation';
5
5
  import { IntergalacticD3Component } from './Plot';
6
6
 
@@ -59,9 +59,21 @@ export type LineNullProps = Context & {
59
59
  hide?: boolean;
60
60
  };
61
61
 
62
+ export type LineAreaProps = Omit<LineProps, 'transparent'> & {
63
+ /**
64
+ * Field name from `data` array for y0 point by the YAxis for the Area
65
+ */
66
+ y0: string;
67
+ /**
68
+ * Field name from `data` array for y1 point by the YAxis for the Area
69
+ */
70
+ y1: string;
71
+ };
72
+
62
73
  declare const Line: IntergalacticD3Component<'line', LineProps, Context> & {
63
74
  Dots: IntergalacticD3Component<'circle', LineDotsProps, LineDotsContext>;
64
75
  Null: IntergalacticD3Component<'path', LineNullProps>;
76
+ Area: IntergalacticD3Component<'path', LineAreaProps>;
65
77
  };
66
78
 
67
79
  export default Line;
@@ -15,6 +15,10 @@ export type StackBarProps = Context & {
15
15
  * @default d3.stack() */
16
16
  /** @deprecated */
17
17
  stack?: any;
18
+ /**
19
+ * The maximum width of each Bar
20
+ */
21
+ maxBarSize?: number;
18
22
  };
19
23
 
20
24
  /** @deprecated */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/d3-chart",
3
3
  "description": "Semrush D3 Chart Component",
4
- "version": "3.14.1",
4
+ "version": "3.15.0",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",