@semcore/d3-chart 3.57.0 → 3.58.1

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 (70) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/lib/cjs/Area.js +11 -11
  3. package/lib/cjs/Axis.js +14 -14
  4. package/lib/cjs/Bar.js +16 -16
  5. package/lib/cjs/Bubble.js +12 -12
  6. package/lib/cjs/CompactHorizontalBar.js +16 -16
  7. package/lib/cjs/Donut.js +9 -9
  8. package/lib/cjs/Dots.js +8 -8
  9. package/lib/cjs/HorizontalBar.js +16 -16
  10. package/lib/cjs/Hover.js +3 -3
  11. package/lib/cjs/Line.js +9 -9
  12. package/lib/cjs/Plot.js +3 -3
  13. package/lib/cjs/Radar.js +19 -19
  14. package/lib/cjs/RadialTree.js +12 -12
  15. package/lib/cjs/Reference.js +12 -12
  16. package/lib/cjs/ScatterPlot.js +9 -9
  17. package/lib/cjs/Tooltip.js +9 -9
  18. package/lib/cjs/Venn.js +9 -9
  19. package/lib/cjs/a11y/PlotA11yModule.js +2 -2
  20. package/lib/cjs/a11y/PlotA11yView.js +2 -2
  21. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
  22. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +19 -19
  23. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  24. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
  25. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +6 -6
  26. package/lib/cjs/component/StackGroupBar/StackGroupBar.js +173 -0
  27. package/lib/cjs/component/StackGroupBar/StackGroupBar.js.map +1 -0
  28. package/lib/cjs/component/StackGroupBar/StackGroupBar.type.js +2 -0
  29. package/lib/cjs/component/StackGroupBar/StackGroupBar.type.js.map +1 -0
  30. package/lib/cjs/index.js +7 -0
  31. package/lib/cjs/index.js.map +1 -1
  32. package/lib/cjs/types/index.d.js +9 -1
  33. package/lib/cjs/types/index.d.js.map +1 -1
  34. package/lib/es6/Area.js +11 -11
  35. package/lib/es6/Axis.js +14 -14
  36. package/lib/es6/Bar.js +16 -16
  37. package/lib/es6/Bubble.js +12 -12
  38. package/lib/es6/CompactHorizontalBar.js +16 -16
  39. package/lib/es6/Donut.js +9 -9
  40. package/lib/es6/Dots.js +8 -8
  41. package/lib/es6/HorizontalBar.js +16 -16
  42. package/lib/es6/Hover.js +3 -3
  43. package/lib/es6/Line.js +9 -9
  44. package/lib/es6/Plot.js +3 -3
  45. package/lib/es6/Radar.js +19 -19
  46. package/lib/es6/RadialTree.js +12 -12
  47. package/lib/es6/Reference.js +12 -12
  48. package/lib/es6/ScatterPlot.js +9 -9
  49. package/lib/es6/Tooltip.js +9 -9
  50. package/lib/es6/Venn.js +9 -9
  51. package/lib/es6/a11y/PlotA11yModule.js +2 -2
  52. package/lib/es6/a11y/PlotA11yView.js +2 -2
  53. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
  54. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +19 -19
  55. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  56. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
  57. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +6 -6
  58. package/lib/es6/component/StackGroupBar/StackGroupBar.js +163 -0
  59. package/lib/es6/component/StackGroupBar/StackGroupBar.js.map +1 -0
  60. package/lib/es6/component/StackGroupBar/StackGroupBar.type.js +2 -0
  61. package/lib/es6/component/StackGroupBar/StackGroupBar.type.js.map +1 -0
  62. package/lib/es6/index.js +1 -0
  63. package/lib/es6/index.js.map +1 -1
  64. package/lib/es6/types/index.d.js +1 -0
  65. package/lib/es6/types/index.d.js.map +1 -1
  66. package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +1 -0
  67. package/lib/types/component/StackGroupBar/StackGroupBar.d.ts +3 -0
  68. package/lib/types/component/StackGroupBar/StackGroupBar.type.d.ts +29 -0
  69. package/lib/types/index.d.ts +2 -0
  70. package/package.json +1 -1
@@ -79,4 +79,5 @@ export * from './component/Chart/VennChart.type';
79
79
  export * from './component/Chart/RadarChart.type';
80
80
  export * from './component/Chart/ScatterPlotChart.type';
81
81
  export * from './component/Chart/CigaretteChart.type';
82
+ export { default as StackGroupBar } from './component/StackGroupBar/StackGroupBar';
82
83
  //# sourceMappingURL=index.d.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":["PlotEventEmitter","makeDataHintsContainer","default","Plot","ResponsiveContainer","Line","Bar","HorizontalBar","CompactHorizontalBar","GroupBar","StackBar","Area","StackedArea","Radar","Donut","Tooltip","ScatterPlot","Bubble","Venn","RadialTree","ChartLegend","ChartLegendTable","Chart"],"sources":["../../../src/types/index.d.ts"],"sourcesContent":["// Utils\n// @ts-ignore\nimport { interpolateValue as intValue, PlotEventEmitter } from './utils';\n\nexport declare const interpolateValue: typeof intValue;\nexport declare function minMax(data: any, key: string | number): any;\nexport declare function calculateBubbleDomain(\n data: Array<{ value: number; x: number; y: number }>,\n key: 'x' | 'y',\n range: [number, number],\n): [min: number, max: number];\nexport { PlotEventEmitter };\n\nexport { makeDataHintsContainer } from './a11y/hints';\n\n// Color\n/**\n * @deprecated\n * This export will be removed in the next major release.\n */\nexport declare const colors: { [key: string]: string };\n\nexport { default as Plot } from './Plot';\nexport * from './Plot';\n\nexport * from './Axis';\nexport * from './Hover';\n\nexport { default as ResponsiveContainer } from './ResponsiveContainer';\nexport * from './ResponsiveContainer';\n\nexport { default as Line } from './Line';\nexport * from './Line';\n\nexport { default as Bar } from './Bar';\nexport * from './Bar';\n\nexport { default as HorizontalBar } from './HorizontalBar';\nexport * from './HorizontalBar';\n\nexport { default as CompactHorizontalBar } from './CompactHorizontalBar';\nexport * from './CompactHorizontalBar';\n\nexport { default as GroupBar } from './GroupBar';\nexport * from './GroupBar';\n\nexport { default as StackBar } from './StackBar';\nexport * from './StackBar';\n\nexport { default as Area } from './Area';\nexport * from './Area';\n\nexport { default as StackedArea } from './StackedArea';\nexport * from './StackedArea';\n\nexport { default as Radar } from './Radar';\nexport * from './Radar';\n\nexport { default as Donut } from './Donut';\nexport * from './Donut';\n\nexport { default as Tooltip } from './Tooltip';\nexport * from './Tooltip';\n\nexport { default as ScatterPlot } from './ScatterPlot';\nexport * from './ScatterPlot';\n\nexport { default as Bubble } from './Bubble';\nexport * from './Bubble';\n\nexport * from './Reference';\n\nexport { default as Venn } from './Venn';\nexport * from './Venn';\n\n/** It becomes resolvable after building and moving file to lib dir */\n\n// @ts-ignore\nexport { default as RadialTree } from './RadialTree';\n\n// @ts-ignore\nexport * from './RadialTree';\n\n// @ts-ignore\nexport { ChartLegend, ChartLegendTable } from './component/ChartLegend';\n\n// @ts-ignore\nexport * from './component/ChartLegend/LegendFlex/LegendFlex.type';\n// @ts-ignore\nexport * from './component/ChartLegend/LegendTable/LegendTable.type';\n// @ts-ignore\nexport * from './component/ChartLegend/LegendItem/LegendItem.type';\n\n// @ts-ignore\nexport * from './Pattern';\n\nexport { default as Chart } from './component/Chart';\nexport * from './component/Chart/AbstractChart.type';\nexport * from './component/Chart/LineChart.type';\nexport * from './component/Chart/BarChart.type';\nexport * from './component/Chart/HistogramChart.type';\nexport * from './component/Chart/ScatterPlotChart.type';\nexport * from './component/Chart/AreaChart.type';\nexport * from './component/Chart/BubbleChart.type';\nexport * from './component/Chart/DonutChart.type';\nexport * from './component/Chart/VennChart.type';\nexport * from './component/Chart/RadarChart.type';\nexport * from './component/Chart/ScatterPlotChart.type';\nexport * from './component/Chart/CigaretteChart.type';\n"],"mappings":"AAAA;AACA;AACA,SAAuCA,gBAAgB,QAAQ,SAAS;AASxE,SAASA,gBAAgB;AAEzB,SAASC,sBAAsB,QAAQ,cAAc;;AAErD;AACA;AACA;AACA;AACA;;AAGA,SAASC,OAAO,IAAIC,IAAI,QAAQ,QAAQ;AACxC,cAAc,QAAQ;AAEtB,cAAc,QA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pE;AACA,cAAc,oDAAoD;;AAElE;AACA,cAAc,WAAW;AAEzB,SAASnB,OAAO,IAAIoB,KAAK,QAAQ,mBAAmB;AACpD,cAAc,sCAAsC;AACpD,cAAc,kCAAkC;AAChD,cAAc,iCAAiC;AAC/C,cAAc,uCAAuC;AACrD,cAAc,yCAAyC;AACvD,cAAc,kCAAkC;AAChD,cAAc,oCAAoC;AAClD,cAAc,mCAAmC;AACjD,cAAc,kCAAkC;AAChD,cAAc,mCAAmC;AACjD,cAAc,yCAAyC;AACvD,cAAc,uCAAuC"}
1
+ {"version":3,"file":"index.d.js","names":["PlotEventEmitter","makeDataHintsContainer","default","Plot","ResponsiveContainer","Line","Bar","HorizontalBar","CompactHorizontalBar","GroupBar","StackBar","Area","StackedArea","Radar","Donut","Tooltip","ScatterPlot","Bubble","Venn","RadialTree","ChartLegend","ChartLegendTable","Chart","StackGroupBar"],"sources":["../../../src/types/index.d.ts"],"sourcesContent":["// Utils\n// @ts-ignore\nimport { interpolateValue as intValue, PlotEventEmitter } from './utils';\n\nexport declare const interpolateValue: typeof intValue;\nexport declare function minMax(data: any, key: string | number): any;\nexport declare function calculateBubbleDomain(\n data: Array<{ value: number; x: number; y: number }>,\n key: 'x' | 'y',\n range: [number, number],\n): [min: number, max: number];\nexport { PlotEventEmitter };\n\nexport { makeDataHintsContainer } from './a11y/hints';\n\n// Color\n/**\n * @deprecated\n * This export will be removed in the next major release.\n */\nexport declare const colors: { [key: string]: string };\n\nexport { default as Plot } from './Plot';\nexport * from './Plot';\n\nexport * from './Axis';\nexport * from './Hover';\n\nexport { default as ResponsiveContainer } from './ResponsiveContainer';\nexport * from './ResponsiveContainer';\n\nexport { default as Line } from './Line';\nexport * from './Line';\n\nexport { default as Bar } from './Bar';\nexport * from './Bar';\n\nexport { default as HorizontalBar } from './HorizontalBar';\nexport * from './HorizontalBar';\n\nexport { default as CompactHorizontalBar } from './CompactHorizontalBar';\nexport * from './CompactHorizontalBar';\n\nexport { default as GroupBar } from './GroupBar';\nexport * from './GroupBar';\n\nexport { default as StackBar } from './StackBar';\nexport * from './StackBar';\n\nexport { default as Area } from './Area';\nexport * from './Area';\n\nexport { default as StackedArea } from './StackedArea';\nexport * from './StackedArea';\n\nexport { default as Radar } from './Radar';\nexport * from './Radar';\n\nexport { default as Donut } from './Donut';\nexport * from './Donut';\n\nexport { default as Tooltip } from './Tooltip';\nexport * from './Tooltip';\n\nexport { default as ScatterPlot } from './ScatterPlot';\nexport * from './ScatterPlot';\n\nexport { default as Bubble } from './Bubble';\nexport * from './Bubble';\n\nexport * from './Reference';\n\nexport { default as Venn } from './Venn';\nexport * from './Venn';\n\n/** It becomes resolvable after building and moving file to lib dir */\n\n// @ts-ignore\nexport { default as RadialTree } from './RadialTree';\n\n// @ts-ignore\nexport * from './RadialTree';\n\n// @ts-ignore\nexport { ChartLegend, ChartLegendTable } from './component/ChartLegend';\n\n// @ts-ignore\nexport * from './component/ChartLegend/LegendFlex/LegendFlex.type';\n// @ts-ignore\nexport * from './component/ChartLegend/LegendTable/LegendTable.type';\n// @ts-ignore\nexport * from './component/ChartLegend/LegendItem/LegendItem.type';\n\n// @ts-ignore\nexport * from './Pattern';\n\nexport { default as Chart } from './component/Chart';\nexport * from './component/Chart/AbstractChart.type';\nexport * from './component/Chart/LineChart.type';\nexport * from './component/Chart/BarChart.type';\nexport * from './component/Chart/HistogramChart.type';\nexport * from './component/Chart/ScatterPlotChart.type';\nexport * from './component/Chart/AreaChart.type';\nexport * from './component/Chart/BubbleChart.type';\nexport * from './component/Chart/DonutChart.type';\nexport * from './component/Chart/VennChart.type';\nexport * from './component/Chart/RadarChart.type';\nexport * from './component/Chart/ScatterPlotChart.type';\nexport * from './component/Chart/CigaretteChart.type';\n\nexport { default as StackGroupBar } from './component/StackGroupBar/StackGroupBar';\n"],"mappings":"AAAA;AACA;AACA,SAAuCA,gBAAgB,QAAQ,SAAS;AASxE,SAASA,gBAAgB;AAEzB,SAASC,sBAAsB,QAAQ,cAAc;;AAErD;A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,SAASC,WAAW,EAAEC,gBAAgB,QAAQ,yBAAyB;;AAEvE;AACA,cAAc,oDAAoD;AAClE;AACA,cAAc,sDAAsD;AACpE;AACA,cAAc,oDAAoD;;AAElE;AACA,cAAc,WAAW;AAEzB,SAASnB,OAAO,IAAIoB,KAAK,QAAQ,mBAAmB;AACpD,cAAc,sCAAsC;AACpD,cAAc,kCAAkC;AAChD,cAAc,iCAAiC;AAC/C,cAAc,uCAAuC;AACrD,cAAc,yCAAyC;AACvD,cAAc,kCAAkC;AAChD,cAAc,oCAAoC;AAClD,cAAc,mCAAmC;AACjD,cAAc,kCAAkC;AAChD,cAAc,mCAAmC;AACjD,cAAc,yCAAyC;AACvD,cAAc,uCAAuC;AAErD,SAASpB,OAAO,IAAIqB,aAAa,QAAQ,yCAAyC"}
@@ -71,6 +71,7 @@ export type ShapeProps = LegendItem & ({
71
71
  size: LSize;
72
72
  shape: Extract<ShapeType, 'Checkbox'>;
73
73
  onChange: (checked: boolean, e?: React.SyntheticEvent<HTMLInputElement>) => void;
74
+ 'aria-labelledby'?: string;
74
75
  });
75
76
  export declare const StaticShapes: readonly ["Circle", "Line", "Square", "Pattern"];
76
77
  export type ShapeType = 'Checkbox' | typeof StaticShapes[number];
@@ -0,0 +1,3 @@
1
+ import { StackGroupType } from './StackGroupBar.type';
2
+ declare const StackGroupBar: StackGroupType;
3
+ export default StackGroupBar;
@@ -0,0 +1,29 @@
1
+ /// <reference types="react" />
2
+ import { ScaleBand, ScaleLinear } from 'd3-scale';
3
+ import { Stack } from 'd3-shape';
4
+ import { IntergalacticD3Component } from '../../Plot';
5
+ type StackGroupData = {
6
+ [key: string]: number;
7
+ };
8
+ export type StackGroupProps = {
9
+ children: React.ReactNode | React.ReactNode[];
10
+ data?: StackGroupData[];
11
+ x: keyof StackGroupData;
12
+ scale?: [ScaleBand<any>, ScaleLinear<any, any>];
13
+ maxBarSize?: number;
14
+ patterns?: any;
15
+ dataHintsHandler?: any;
16
+ stack?: Stack<any, {
17
+ [key: string]: number;
18
+ }, string>;
19
+ r?: number;
20
+ };
21
+ export type StackGroupBarProps = {
22
+ y: keyof StackGroupData;
23
+ group: string;
24
+ hMin?: number;
25
+ };
26
+ export type StackGroupType = IntergalacticD3Component<'g', StackGroupProps> & {
27
+ Bar: IntergalacticD3Component<'path', StackGroupBarProps>;
28
+ };
29
+ export {};
@@ -107,3 +107,5 @@ export * from './component/Chart/VennChart.type';
107
107
  export * from './component/Chart/RadarChart.type';
108
108
  export * from './component/Chart/ScatterPlotChart.type';
109
109
  export * from './component/Chart/CigaretteChart.type';
110
+
111
+ export { default as StackGroupBar } from './component/StackGroupBar/StackGroupBar';
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.57.0",
4
+ "version": "3.58.1",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",