@semcore/d3-chart 3.45.2 → 3.46.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/CHANGELOG.md +11 -0
- package/lib/cjs/Area.js +11 -11
- package/lib/cjs/Axis.js +14 -14
- package/lib/cjs/Bar.js +10 -10
- package/lib/cjs/Bubble.js +12 -12
- package/lib/cjs/Donut.js +9 -9
- package/lib/cjs/Dots.js +8 -8
- package/lib/cjs/HorizontalBar.js +10 -10
- package/lib/cjs/Hover.js +3 -3
- package/lib/cjs/Line.js +9 -9
- package/lib/cjs/Plot.js +3 -3
- package/lib/cjs/Radar.js +19 -19
- package/lib/cjs/RadialTree.js +11 -11
- package/lib/cjs/{ReferenceLine.js → Reference.js} +91 -48
- package/lib/cjs/Reference.js.map +1 -0
- package/lib/cjs/ScatterPlot.js +9 -9
- package/lib/cjs/Tooltip.js +9 -9
- package/lib/cjs/Venn.js +9 -9
- package/lib/cjs/a11y/PlotA11yModule.js +2 -2
- package/lib/cjs/a11y/PlotA11yView.js +2 -2
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +17 -17
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +6 -6
- package/lib/cjs/index.js +14 -2
- package/lib/cjs/index.js.map +1 -1
- package/lib/{es6/style/reference-line.shadow.css → cjs/style/reference.shadow.css} +8 -0
- package/lib/cjs/types/Reference.d.js +2 -0
- package/lib/cjs/types/Reference.d.js.map +1 -0
- package/lib/cjs/types/index.d.js +4 -11
- package/lib/cjs/types/index.d.js.map +1 -1
- package/lib/es6/Area.js +11 -11
- package/lib/es6/Axis.js +14 -14
- package/lib/es6/Bar.js +10 -10
- package/lib/es6/Bubble.js +12 -12
- package/lib/es6/Donut.js +9 -9
- package/lib/es6/Dots.js +8 -8
- package/lib/es6/HorizontalBar.js +10 -10
- package/lib/es6/Hover.js +3 -3
- package/lib/es6/Line.js +9 -9
- package/lib/es6/Plot.js +3 -3
- package/lib/es6/Radar.js +19 -19
- package/lib/es6/RadialTree.js +11 -11
- package/lib/es6/{ReferenceLine.js → Reference.js} +88 -47
- package/lib/es6/Reference.js.map +1 -0
- package/lib/es6/ScatterPlot.js +9 -9
- package/lib/es6/Tooltip.js +9 -9
- package/lib/es6/Venn.js +9 -9
- package/lib/es6/a11y/PlotA11yModule.js +2 -2
- package/lib/es6/a11y/PlotA11yView.js +2 -2
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +17 -17
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +6 -6
- package/lib/es6/index.js +1 -1
- package/lib/es6/index.js.map +1 -1
- package/lib/{cjs/style/reference-line.shadow.css → es6/style/reference.shadow.css} +8 -0
- package/lib/es6/types/Reference.d.js +2 -0
- package/lib/es6/types/Reference.d.js.map +1 -0
- package/lib/es6/types/index.d.js +1 -2
- package/lib/es6/types/index.d.js.map +1 -1
- package/lib/types/{ReferenceLine.d.ts → Reference.d.ts} +31 -5
- package/lib/types/index.d.ts +1 -2
- package/package.json +2 -2
- package/lib/cjs/ReferenceLine.js.map +0 -1
- package/lib/cjs/types/ReferenceLine.d.js +0 -2
- package/lib/cjs/types/ReferenceLine.d.js.map +0 -1
- package/lib/es6/ReferenceLine.js.map +0 -1
- package/lib/es6/types/ReferenceLine.d.js +0 -2
- package/lib/es6/types/ReferenceLine.d.js.map +0 -1
|
@@ -27,18 +27,44 @@ export type ReferenceLineTitleProps = Context & {
|
|
|
27
27
|
export interface IReferenceLineBackgroundProps
|
|
28
28
|
extends ReferenceLineBackgroundProps,
|
|
29
29
|
UnknownProperties {}
|
|
30
|
-
export type
|
|
31
|
-
/** The position
|
|
30
|
+
export type ReferenceBackgroundProps = Context & {
|
|
31
|
+
/** The position relative the `value` */
|
|
32
32
|
position?: 'top' | 'right' | 'bottom' | 'left';
|
|
33
33
|
/** Value element of data */
|
|
34
34
|
value?: any;
|
|
35
35
|
/** Value of the background end */
|
|
36
36
|
endValue?: number | string;
|
|
37
37
|
};
|
|
38
|
+
/** @deprecated use ReferenceBackgroundProps instead **/
|
|
39
|
+
export type ReferenceLineBackgroundProps = ReferenceBackgroundProps;
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
export type ReferenceStripesProps = Context & {
|
|
42
|
+
/** The position relative the `value` */
|
|
43
|
+
position?: 'top' | 'right' | 'bottom' | 'left';
|
|
44
|
+
/** Value element of data */
|
|
45
|
+
value?: any;
|
|
46
|
+
/** Value of the background end */
|
|
47
|
+
endValue?: number | string;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export declare const ReferenceLine: IntergalacticD3Component<
|
|
51
|
+
'line',
|
|
52
|
+
ReferenceLineProps,
|
|
53
|
+
Context
|
|
54
|
+
> & {
|
|
40
55
|
Title: IntergalacticD3Component<'text', ReferenceLineTitleProps, Context>;
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated use `ReferenceBackground` instead.
|
|
58
|
+
*/
|
|
41
59
|
Background: IntergalacticD3Component<'rect', ReferenceLineBackgroundProps, Context>;
|
|
42
60
|
};
|
|
43
|
-
|
|
44
|
-
|
|
61
|
+
export declare const ReferenceBackground: IntergalacticD3Component<
|
|
62
|
+
'rect',
|
|
63
|
+
ReferenceLineBackgroundProps,
|
|
64
|
+
Context
|
|
65
|
+
>;
|
|
66
|
+
export declare const ReferenceStripes: IntergalacticD3Component<
|
|
67
|
+
'rect',
|
|
68
|
+
ReferenceStripesProps,
|
|
69
|
+
Context
|
|
70
|
+
>;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -65,8 +65,7 @@ export * from './ScatterPlot';
|
|
|
65
65
|
export { default as Bubble } from './Bubble';
|
|
66
66
|
export * from './Bubble';
|
|
67
67
|
|
|
68
|
-
export
|
|
69
|
-
export * from './ReferenceLine';
|
|
68
|
+
export * from './Reference';
|
|
70
69
|
|
|
71
70
|
export { default as Venn } from './Venn';
|
|
72
71
|
export * from './Venn';
|
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.
|
|
4
|
+
"version": "3.46.0",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@semcore/animation": "2.27.1",
|
|
19
19
|
"@semcore/divider": "4.26.1",
|
|
20
20
|
"@semcore/flex-box": "5.27.1",
|
|
21
|
-
"@semcore/popper": "5.35.
|
|
21
|
+
"@semcore/popper": "5.35.6",
|
|
22
22
|
"@semcore/utils": "4.28.1",
|
|
23
23
|
"@types/d3-shape": "^3.1.0",
|
|
24
24
|
"@upsetjs/venn.js": "1.4.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ReferenceLine.js","names":["_react","_interopRequireDefault","require","_core","_createElement","_utils","style","_index","sstyled","insert","side2direction","left","right","top","bottom","lineDirection2props","vertical","_ref4","value","_ref5","_slicedToArray2","xScale","yScale","yRange","range","x","scaleOfBandwidth","x1","x2","y1","y2","horizontal","_ref6","_ref7","xRange","y","rectDirection2props","_ref8","endValue","_ref9","width","undefined","height","_ref10","_ref11","titleOffset","titleSideToProps","_ref12","_ref13","_ref14","_ref15","_ref16","_ref17","_ref18","_ref19","ReferenceLineRoot","_Component","_inherits2","_super","_createSuper2","_classCallCheck2","apply","arguments","_createClass2","key","getTitleProps","_this$asProps","asProps","position","getBackgroundProps","_this$asProps2","render","_ref","SReferenceLine","Element","_this$asProps3","title","scale","color","resolveColor","styles","positionProps","createElement","Fragment","cn","_objectSpread2","ReferenceLine","Title","Component","_defineProperty2","props","_ref2","STitle","_titleSideToProps$pos","sstyles","sTitleStyles","concat","toFixed","className","Background","_ref3","SBackground","_default","exports"],"sources":["../../src/ReferenceLine.jsx"],"sourcesContent":["import React from 'react';\nimport { Component, sstyled } from '@semcore/core';\nimport createElement from './createElement';\nimport { scaleOfBandwidth } from './utils';\n\nimport style from './style/reference-line.shadow.css';\n\nconst side2direction = {\n left: 'vertical',\n right: 'vertical',\n top: 'horizontal',\n bottom: 'horizontal',\n};\n\nconst lineDirection2props = {\n vertical: ([xScale, yScale], value) => {\n const yRange = yScale.range();\n const x = scaleOfBandwidth(xScale, value);\n return {\n x1: x,\n x2: x,\n y1: yRange[0],\n y2: yRange[1],\n };\n },\n horizontal: ([xScale, yScale], value) => {\n const xRange = xScale.range();\n const y = scaleOfBandwidth(yScale, value);\n return {\n x1: xRange[0],\n x2: xRange[1],\n y1: y,\n y2: y,\n };\n },\n};\n\nconst rectDirection2props = {\n vertical: ([xScale, yScale], value, endValue) => {\n const yRange = yScale.range();\n const x = scaleOfBandwidth(xScale, value);\n const width = endValue !== undefined ? scaleOfBandwidth(xScale, endValue) - x : 100;\n return {\n x: x,\n y: yRange[1],\n width,\n height: yRange[0] - yRange[1],\n };\n },\n horizontal: ([xScale, yScale], value, endValue) => {\n const xRange = xScale.range();\n const y = scaleOfBandwidth(yScale, value);\n const height = endValue !== undefined ? scaleOfBandwidth(yScale, endValue) - y : 100;\n return {\n x: xRange[0],\n y: y,\n width: xRange[1] - xRange[0],\n height,\n };\n },\n};\n\nconst titleOffset = 10;\nconst titleSideToProps = {\n left: ([xScale, yScale], value) => {\n const yRange = yScale.range();\n const x = scaleOfBandwidth(xScale, value);\n return {\n x: x - titleOffset,\n y: (yRange[0] + yRange[1]) / 2,\n };\n },\n right: ([xScale, yScale], value) => {\n const yRange = yScale.range();\n const x = scaleOfBandwidth(xScale, value);\n return {\n x: x + titleOffset,\n y: (yRange[0] + yRange[1]) / 2,\n };\n },\n top: ([xScale, yScale], value) => {\n const xRange = xScale.range();\n const y = scaleOfBandwidth(yScale, value);\n return {\n x: (xRange[1] + xRange[0]) / 2,\n y: y - titleOffset,\n };\n },\n bottom: ([xScale, yScale], value) => {\n const xRange = xScale.range();\n const y = scaleOfBandwidth(yScale, value);\n return {\n x: (xRange[1] + xRange[0]) / 2,\n y: y + titleOffset,\n };\n },\n};\n\nclass ReferenceLineRoot extends Component {\n static displayName = 'ReferenceLine';\n static style = style;\n static defaultProps = {\n position: 'left',\n };\n\n getTitleProps() {\n const { position, value } = this.asProps;\n return { position, value };\n }\n\n getBackgroundProps() {\n const { position, value } = this.asProps;\n return { position, value };\n }\n\n render() {\n const SReferenceLine = this.Element;\n const { title, scale, position, value, color, resolveColor, styles } = this.asProps;\n const positionProps = lineDirection2props[side2direction[position]];\n\n return sstyled(styles)(\n <>\n <SReferenceLine\n render='line'\n __excludeProps={['data', 'scale', 'format', 'value', 'color']}\n stroke={resolveColor(color)}\n {...positionProps(scale, value)}\n />\n {title && <ReferenceLine.Title>{title}</ReferenceLine.Title>}\n </>,\n );\n }\n}\n\nfunction Title(props) {\n const { Element: STitle, styles, scale, position, value } = props;\n const { x, y } = titleSideToProps[position](scale, value);\n\n const sstyles = sstyled(styles);\n const sTitleStyles = sstyles.cn('STitle', {\n 'transform-origin': `${x.toFixed(2)}px ${y.toFixed(2)}px`,\n });\n\n return sstyled(styles)(\n <STitle\n render='text'\n childrenPosition='inside'\n className={sTitleStyles.className}\n style={sTitleStyles.style}\n position={position}\n x={x}\n y={y}\n />,\n );\n}\n\nfunction Background(props) {\n const { Element: SBackground, styles, scale, position, value, endValue } = props;\n const positionProps = rectDirection2props[side2direction[position]];\n\n return sstyled(styles)(\n <SBackground\n render='rect'\n childrenPosition='inside'\n {...positionProps(scale, value, endValue)}\n />,\n );\n}\n\nconst ReferenceLine = createElement(ReferenceLineRoot, {\n Title,\n Background,\n});\n\nexport default ReferenceLine;\n"],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAH,sBA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,aACdW,YAAY,CAACG,SAAS;IAAA,SAC1BH,YAAY,CAACzF,KAAK;IAAA,YACf8D,QAAQ;IAAA,KACf3C,CAAC;IAAA,KACDU;EAAC,GACJ;AAEN;AAEA,SAASgE,UAAUA,CAACT,KAAK,EAAE;EAAA,IAAAU,KAAA;EACzB,IAAiBC,WAAW,GAA+CX,KAAK,CAAxEhB,OAAO;IAAeM,MAAM,GAAuCU,KAAK,CAAlDV,MAAM;IAAEH,KAAK,GAAgCa,KAAK,CAA1Cb,KAAK;IAAET,QAAQ,GAAsBsB,KAAK,CAAnCtB,QAAQ;IAAElD,KAAK,GAAewE,KAAK,CAAzBxE,KAAK;IAAEoB,QAAQ,GAAKoD,KAAK,CAAlBpD,QAAQ;EACtE,IAAM2C,aAAa,GAAG7C,mBAAmB,CAAC1B,cAAc,CAAC0D,QAAQ,CAAC,CAAC;EAEnE,OAAAgC,KAAA,GAAO,IAAA5F,aAAO,EAACwE,MAAM,CAAC,eACpBhF,MAAA,YAAAkF,aAAA,CAACmB,WAAW,EAAAD,KAAA,CAAAhB,EAAA,oBAAAC,cAAA;IAAA,UACH,MAAM;IAAA,oBACI;EAAQ,GACrBJ,aAAa,CAACJ,KAAK,EAAE3D,KAAK,EAAEoB,QAAQ,CAAC,GACzC;AAEN;AAEA,IAAMgD,aAAa,GAAG,IAAAJ,yBAAa,EAAC3B,iBAAiB,EAAE;EACrDgC,KAAK,EAALA,KAAK;EACLY,UAAU,EAAVA;AACF,CAAC,CAAC;AAAC,IAAAG,QAAA,GAEYhB,aAAa;AAAAiB,OAAA,cAAAD,QAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ReferenceLine.d.js","names":[],"sources":["../../../src/types/ReferenceLine.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated **/\nexport interface IReferenceLineProps extends ReferenceLineProps, UnknownProperties {}\nexport type ReferenceLineProps = Context & {\n /** The position of the title relative reference line\n * @default 'left' */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value?: any;\n\n title?: string;\n};\n\n/** @deprecated **/\nexport interface IReferenceLineTitleProps extends ReferenceLineTitleProps, UnknownProperties {}\nexport type ReferenceLineTitleProps = Context & {\n /** The position of the axis relative reference line */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value: any;\n};\n\n/** @deprecated **/\nexport interface IReferenceLineBackgroundProps\n extends ReferenceLineBackgroundProps,\n UnknownProperties {}\nexport type ReferenceLineBackgroundProps = Context & {\n /** The position of the axis relative reference line */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value?: any;\n /** Value of the background end */\n endValue?: number | string;\n};\n\ndeclare const ReferenceLine: IntergalacticD3Component<'line', ReferenceLineProps, Context> & {\n Title: IntergalacticD3Component<'text', ReferenceLineTitleProps, Context>;\n Background: IntergalacticD3Component<'rect', ReferenceLineBackgroundProps, Context>;\n};\n\nexport default ReferenceLine;\n"],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ReferenceLine.js","names":["React","Component","sstyled","createElement","scaleOfBandwidth","style","_sstyled","insert","side2direction","left","right","top","bottom","lineDirection2props","vertical","_ref4","value","_ref5","_slicedToArray","xScale","yScale","yRange","range","x","x1","x2","y1","y2","horizontal","_ref6","_ref7","xRange","y","rectDirection2props","_ref8","endValue","_ref9","width","undefined","height","_ref10","_ref11","titleOffset","titleSideToProps","_ref12","_ref13","_ref14","_ref15","_ref16","_ref17","_ref18","_ref19","ReferenceLineRoot","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","getTitleProps","_this$asProps","asProps","position","getBackgroundProps","_this$asProps2","render","_ref","SReferenceLine","Element","_this$asProps3","title","scale","color","resolveColor","styles","positionProps","Fragment","cn","_objectSpread","ReferenceLine","Title","_defineProperty","props","_ref2","STitle","_titleSideToProps$pos","sstyles","sTitleStyles","concat","toFixed","className","Background","_ref3","SBackground"],"sources":["../../src/ReferenceLine.jsx"],"sourcesContent":["import React from 'react';\nimport { Component, sstyled } from '@semcore/core';\nimport createElement from './createElement';\nimport { scaleOfBandwidth } from './utils';\n\nimport style from './style/reference-line.shadow.css';\n\nconst side2direction = {\n left: 'vertical',\n right: 'vertical',\n top: 'horizontal',\n bottom: 'horizontal',\n};\n\nconst lineDirection2props = {\n vertical: ([xScale, yScale], value) => {\n const yRange = yScale.range();\n const x = scaleOfBandwidth(xScale, value);\n return {\n x1: x,\n x2: x,\n y1: yRange[0],\n y2: yRange[1],\n };\n },\n horizontal: ([xScale, yScale], value) => {\n const xRange = xScale.range();\n const y = scaleOfBandwidth(yScale, value);\n return {\n x1: xRange[0],\n x2: xRange[1],\n y1: y,\n y2: y,\n };\n },\n};\n\nconst rectDirection2props = {\n vertical: ([xScale, yScale], value, endValue) => {\n const yRange = yScale.range();\n const x = scaleOfBandwidth(xScale, value);\n const width = endValue !== undefined ? scaleOfBandwidth(xScale, endValue) - x : 100;\n return {\n x: x,\n y: yRange[1],\n width,\n height: yRange[0] - yRange[1],\n };\n },\n horizontal: ([xScale, yScale], value, endValue) => {\n const xRange = xScale.range();\n const y = scaleOfBandwidth(yScale, value);\n const height = endValue !== undefined ? scaleOfBandwidth(yScale, endValue) - y : 100;\n return {\n x: xRange[0],\n y: y,\n width: xRange[1] - xRange[0],\n height,\n };\n },\n};\n\nconst titleOffset = 10;\nconst titleSideToProps = {\n left: ([xScale, yScale], value) => {\n const yRange = yScale.range();\n const x = scaleOfBandwidth(xScale, value);\n return {\n x: x - titleOffset,\n y: (yRange[0] + yRange[1]) / 2,\n };\n },\n right: ([xScale, yScale], value) => {\n const yRange = yScale.range();\n const x = scaleOfBandwidth(xScale, value);\n return {\n x: x + titleOffset,\n y: (yRange[0] + yRange[1]) / 2,\n };\n },\n top: ([xScale, yScale], value) => {\n const xRange = xScale.range();\n const y = scaleOfBandwidth(yScale, value);\n return {\n x: (xRange[1] + xRange[0]) / 2,\n y: y - titleOffset,\n };\n },\n bottom: ([xScale, yScale], value) => {\n const xRange = xScale.range();\n const y = scaleOfBandwidth(yScale, value);\n return {\n x: (xRange[1] + xRange[0]) / 2,\n y: y + titleOffset,\n };\n },\n};\n\nclass ReferenceLineRoot extends Component {\n static displayName = 'ReferenceLine';\n static style = style;\n static defaultProps = {\n position: 'left',\n };\n\n getTitleProps() {\n const { position, value } = this.asProps;\n return { position, value };\n }\n\n getBackgroundProps() {\n const { position, value } = this.asProps;\n return { position, value };\n }\n\n render() {\n const SReferenceLine = this.Element;\n const { title, scale, position, value, color, resolveColor, styles } = this.asProps;\n const positionProps = lineDirection2props[side2direction[position]];\n\n return sstyled(styles)(\n <>\n <SReferenceLine\n render='line'\n __excludeProps={['data', 'scale', 'format', 'value', 'color']}\n stroke={resolveColor(color)}\n {...positionProps(scale, value)}\n />\n {title && <ReferenceLine.Title>{title}</ReferenceLine.Title>}\n </>,\n );\n }\n}\n\nfunction Title(props) {\n const { Element: STitle, styles, scale, position, value } = props;\n const { x, y } = titleSideToProps[position](scale, value);\n\n const sstyles = sstyled(styles);\n const sTitleStyles = sstyles.cn('STitle', {\n 'transform-origin': `${x.toFixed(2)}px ${y.toFixed(2)}px`,\n });\n\n return sstyled(styles)(\n <STitle\n render='text'\n childrenPosition='inside'\n className={sTitleStyles.className}\n style={sTitleStyles.style}\n position={position}\n x={x}\n y={y}\n />,\n );\n}\n\nfunction Background(props) {\n const { Element: SBackground, styles, scale, position, value, endValue } = props;\n const positionProps = rectDirection2props[side2direction[position]];\n\n return sstyled(styles)(\n <SBackground\n render='rect'\n childrenPosition='inside'\n {...positionProps(scale, value, endValue)}\n />,\n );\n}\n\nconst ReferenceLine = createElement(ReferenceLineRoot, {\n Title,\n Background,\n});\n\nexport default ReferenceLine;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,EAAEC,OAAO,QAAQ,eAAe;AAClD,OAAOC,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,KACDS;EAAC,GACJ;AAEN;AAEA,SAAS8D,UAAUA,CAACT,KAAK,EAAE;EAAA,IAAAU,KAAA;EACzB,IAAiBC,WAAW,GAA+CX,KAAK,CAAxEd,OAAO;IAAeM,MAAM,GAAuCQ,KAAK,CAAlDR,MAAM;IAAEH,KAAK,GAAgCW,KAAK,CAA1CX,KAAK;IAAET,QAAQ,GAAsBoB,KAAK,CAAnCpB,QAAQ;IAAEjD,KAAK,GAAeqE,KAAK,CAAzBrE,KAAK;IAAEmB,QAAQ,GAAKkD,KAAK,CAAlBlD,QAAQ;EACtE,IAAM2C,aAAa,GAAG7C,mBAAmB,CAACzB,cAAc,CAACyD,QAAQ,CAAC,CAAC;EAEnE,OAAA8B,KAAA,GAAO7F,OAAO,CAAC2E,MAAM,CAAC,eACpB7E,KAAA,CAAAG,aAAA,CAAC6F,WAAW,EAAAD,KAAA,CAAAf,EAAA,gBAAAC,aAAA;IAAA,UACH,MAAM;IAAA,oBACI;EAAQ,GACrBH,aAAa,CAACJ,KAAK,EAAE1D,KAAK,EAAEmB,QAAQ,CAAC,GACzC;AAEN;AAEA,IAAM+C,aAAa,GAAG/E,aAAa,CAACiD,iBAAiB,EAAE;EACrD+B,KAAK,EAALA,KAAK;EACLW,UAAU,EAAVA;AACF,CAAC,CAAC;AAEF,eAAeZ,aAAa"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ReferenceLine.d.js","names":[],"sources":["../../../src/types/ReferenceLine.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated **/\nexport interface IReferenceLineProps extends ReferenceLineProps, UnknownProperties {}\nexport type ReferenceLineProps = Context & {\n /** The position of the title relative reference line\n * @default 'left' */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value?: any;\n\n title?: string;\n};\n\n/** @deprecated **/\nexport interface IReferenceLineTitleProps extends ReferenceLineTitleProps, UnknownProperties {}\nexport type ReferenceLineTitleProps = Context & {\n /** The position of the axis relative reference line */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value: any;\n};\n\n/** @deprecated **/\nexport interface IReferenceLineBackgroundProps\n extends ReferenceLineBackgroundProps,\n UnknownProperties {}\nexport type ReferenceLineBackgroundProps = Context & {\n /** The position of the axis relative reference line */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value?: any;\n /** Value of the background end */\n endValue?: number | string;\n};\n\ndeclare const ReferenceLine: IntergalacticD3Component<'line', ReferenceLineProps, Context> & {\n Title: IntergalacticD3Component<'text', ReferenceLineTitleProps, Context>;\n Background: IntergalacticD3Component<'rect', ReferenceLineBackgroundProps, Context>;\n};\n\nexport default ReferenceLine;\n"],"mappings":""}
|