@semcore/d3-chart 2.7.1 → 2.8.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 +12 -0
- package/lib/cjs/Area.js +24 -16
- package/lib/cjs/Area.js.map +1 -1
- package/lib/cjs/Axis.js +14 -14
- package/lib/cjs/Bar.js +13 -10
- package/lib/cjs/Bar.js.map +1 -1
- package/lib/cjs/Bubble.js +10 -10
- package/lib/cjs/Donut.js +13 -10
- package/lib/cjs/Donut.js.map +1 -1
- package/lib/cjs/Dots.js +14 -11
- package/lib/cjs/Dots.js.map +1 -1
- package/lib/cjs/HorizontalBar.js +12 -9
- package/lib/cjs/HorizontalBar.js.map +1 -1
- package/lib/cjs/Hover.js +4 -4
- package/lib/cjs/Line.js +16 -11
- package/lib/cjs/Line.js.map +1 -1
- package/lib/cjs/Plot.js +4 -4
- package/lib/cjs/RadialTree.js +11 -11
- package/lib/cjs/ReferenceLine.js +10 -10
- package/lib/cjs/ScatterPlot.js +7 -7
- package/lib/cjs/Tooltip.js +8 -8
- package/lib/cjs/Venn.js +22 -13
- package/lib/cjs/Venn.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yModule.js +3 -3
- package/lib/cjs/a11y/PlotA11yView.js +4 -4
- package/lib/cjs/style/area.shadow.css +8 -0
- package/lib/cjs/style/bar.shadow.css +4 -0
- package/lib/cjs/style/donut.shadow.css +4 -0
- package/lib/cjs/style/dot.shadow.css +4 -0
- package/lib/cjs/style/line.shadow.css +4 -0
- package/lib/cjs/style/venn.shadow.css +8 -0
- package/lib/cjs/types/Area.d.js.map +1 -1
- package/lib/cjs/types/Bar.d.js.map +1 -1
- package/lib/cjs/types/Donut.d.js.map +1 -1
- package/lib/cjs/types/HorizontalBar.d.js.map +1 -1
- package/lib/cjs/types/Line.d.js.map +1 -1
- package/lib/cjs/types/Venn.d.js.map +1 -1
- package/lib/es6/Area.js +24 -16
- package/lib/es6/Area.js.map +1 -1
- package/lib/es6/Axis.js +14 -14
- package/lib/es6/Bar.js +13 -10
- package/lib/es6/Bar.js.map +1 -1
- package/lib/es6/Bubble.js +10 -10
- package/lib/es6/Donut.js +13 -10
- package/lib/es6/Donut.js.map +1 -1
- package/lib/es6/Dots.js +14 -11
- package/lib/es6/Dots.js.map +1 -1
- package/lib/es6/HorizontalBar.js +12 -9
- package/lib/es6/HorizontalBar.js.map +1 -1
- package/lib/es6/Hover.js +4 -4
- package/lib/es6/Line.js +16 -11
- package/lib/es6/Line.js.map +1 -1
- package/lib/es6/Plot.js +4 -4
- package/lib/es6/RadialTree.js +11 -11
- package/lib/es6/ReferenceLine.js +10 -10
- package/lib/es6/ScatterPlot.js +7 -7
- package/lib/es6/Tooltip.js +8 -8
- package/lib/es6/Venn.js +22 -13
- package/lib/es6/Venn.js.map +1 -1
- package/lib/es6/a11y/PlotA11yModule.js +3 -3
- package/lib/es6/a11y/PlotA11yView.js +4 -4
- package/lib/es6/style/area.shadow.css +8 -0
- package/lib/es6/style/bar.shadow.css +4 -0
- package/lib/es6/style/donut.shadow.css +4 -0
- package/lib/es6/style/dot.shadow.css +4 -0
- package/lib/es6/style/line.shadow.css +4 -0
- package/lib/es6/style/venn.shadow.css +8 -0
- package/lib/es6/types/Area.d.js.map +1 -1
- package/lib/es6/types/Bar.d.js.map +1 -1
- package/lib/es6/types/Donut.d.js.map +1 -1
- package/lib/es6/types/HorizontalBar.d.js.map +1 -1
- package/lib/es6/types/Line.d.js.map +1 -1
- package/lib/es6/types/Venn.d.js.map +1 -1
- package/lib/types/Area.d.ts +4 -0
- package/lib/types/Bar.d.ts +2 -0
- package/lib/types/Donut.d.ts +2 -0
- package/lib/types/HorizontalBar.d.ts +2 -0
- package/lib/types/Line.d.ts +2 -0
- package/lib/types/Venn.d.ts +4 -0
- package/package.json +1 -1
|
@@ -9,6 +9,10 @@ SArea[color] {
|
|
|
9
9
|
fill: var(--color);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
SArea[transparent] {
|
|
13
|
+
opacity: 0.3;
|
|
14
|
+
}
|
|
15
|
+
|
|
12
16
|
SAreaLine {
|
|
13
17
|
stroke: var(--intergalactic-chart-palette-order-blue, #2bb3ff);
|
|
14
18
|
stroke-width: 3;
|
|
@@ -19,6 +23,10 @@ SAreaLine[color] {
|
|
|
19
23
|
stroke: var(--color);
|
|
20
24
|
}
|
|
21
25
|
|
|
26
|
+
SAreaLine[transparent] {
|
|
27
|
+
opacity: 0.3;
|
|
28
|
+
}
|
|
29
|
+
|
|
22
30
|
SArea,
|
|
23
31
|
SAreaLine {
|
|
24
32
|
transition-property: d;
|
|
@@ -18,6 +18,10 @@ SCircle[color] {
|
|
|
18
18
|
fill: var(--color);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
SCircle[transparent] {
|
|
22
|
+
opacity: 0.3;
|
|
23
|
+
}
|
|
24
|
+
|
|
21
25
|
SIntersection {
|
|
22
26
|
stroke: var(--intergalactic-chart-grid-border, #ffffff);
|
|
23
27
|
stroke-width: 2px;
|
|
@@ -27,3 +31,7 @@ SIntersection {
|
|
|
27
31
|
fill-opacity: 0.1;
|
|
28
32
|
}
|
|
29
33
|
}
|
|
34
|
+
|
|
35
|
+
SIntersection[transparent] {
|
|
36
|
+
opacity: 0.3;
|
|
37
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Area.d.js","names":[],"sources":["../../../src/types/Area.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\nimport { CurveFactory } from 'd3-shape';\n\nexport interface IAreaProps extends IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for 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}\n\nexport interface IAreaDotsProps extends IContext {\n /** Show all Dot */\n display?: boolean;\n /** Hide property */\n hide?: boolean;\n}\n\nexport interface IAreaDotsContext {\n /** Value element of data */\n value?: any;\n /** Index element of data */\n index?: number;\n}\n\nexport interface IAreaNullProps extends IContext {\n /** Hide property */\n hide?: boolean;\n}\n\ndeclare const Area: (<T>(props: MapProps<IAreaProps & T>) => ReturnEl) & {\n Dots: <T>(props: MapProps<IAreaDotsProps & T, IAreaDotsContext>) => ReturnEl;\n Null: <T>(props: MapProps<IAreaNullProps & T>) => ReturnEl;\n Line: <T>(props: MapProps<IContext & T>) => ReturnEl;\n};\n\nexport default Area;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Area.d.js","names":[],"sources":["../../../src/types/Area.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\nimport { CurveFactory } from 'd3-shape';\n\nexport interface IAreaProps extends IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for 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 /** Element opacity property */\n transparent?: boolean;\n}\n\nexport interface IAreaDotsProps extends IContext {\n /** Show all Dot */\n display?: boolean;\n /** Hide property */\n hide?: boolean;\n /** Element opacity property */\n transparent?: boolean;\n}\n\nexport interface IAreaDotsContext {\n /** Value element of data */\n value?: any;\n /** Index element of data */\n index?: number;\n}\n\nexport interface IAreaNullProps extends IContext {\n /** Hide property */\n hide?: boolean;\n}\n\ndeclare const Area: (<T>(props: MapProps<IAreaProps & T>) => ReturnEl) & {\n Dots: <T>(props: MapProps<IAreaDotsProps & T, IAreaDotsContext>) => ReturnEl;\n Null: <T>(props: MapProps<IAreaNullProps & T>) => ReturnEl;\n Line: <T>(props: MapProps<IContext & T>) => ReturnEl;\n};\n\nexport default Area;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bar.d.js","names":[],"sources":["../../../src/types/Bar.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\n\nexport interface IBarProps extends IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for YAxis */\n y?: string;\n /** Line color\n * @default '#50aef4'*/\n color?: string;\n /** Element hide property */\n hide?: boolean;\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 /** Minimal height\n * @default 4\n */\n hMin?: number;\n /**\n * Bar click handler\n */\n onClick?: (data: { [key: string]: string | number }, event: Event) => void;\n}\n\nexport interface IBarContext {\n /** Value element of data */\n value: any;\n /** Index element of data */\n index: number;\n}\n\nexport interface IBackgroundProps extends IContext {\n /** Coordinate x */\n x?: number | string;\n /** Coordinate y */\n y?: number | string;\n /** Value element of data */\n value?: any;\n /** Width rect */\n width?: number | string;\n /** Height rect */\n height?: number | string;\n}\n\ndeclare const Bar: (<T>(props: MapProps<IBarProps & T, IBarContext>) => ReturnEl) & {\n Background: <T>(props: MapProps<IBackgroundProps & T>) => ReturnEl;\n};\n\nexport default Bar;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Bar.d.js","names":[],"sources":["../../../src/types/Bar.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\n\nexport interface IBarProps extends IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for YAxis */\n y?: string;\n /** Line color\n * @default '#50aef4'*/\n color?: string;\n /** Element hide property */\n hide?: boolean;\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 /** Minimal height\n * @default 4\n */\n hMin?: number;\n /**\n * Bar click handler\n */\n onClick?: (data: { [key: string]: string | number }, event: Event) => void;\n /** Element opacity property */\n transparent?: boolean;\n}\n\nexport interface IBarContext {\n /** Value element of data */\n value: any;\n /** Index element of data */\n index: number;\n}\n\nexport interface IBackgroundProps extends IContext {\n /** Coordinate x */\n x?: number | string;\n /** Coordinate y */\n y?: number | string;\n /** Value element of data */\n value?: any;\n /** Width rect */\n width?: number | string;\n /** Height rect */\n height?: number | string;\n}\n\ndeclare const Bar: (<T>(props: MapProps<IBarProps & T, IBarContext>) => ReturnEl) & {\n Background: <T>(props: MapProps<IBackgroundProps & T>) => ReturnEl;\n};\n\nexport default Bar;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Donut.d.js","names":[],"sources":["../../../src/types/Donut.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\n\nexport interface IDonutProps extends IContext {\n /** Inner radius\n * @default 0\n * */\n innerRadius?: number;\n /** Outer radius\n * @default calculated by the formula from width, height\n * */\n outerRadius?: number;\n /** Semi donut */\n halfsize?: boolean;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n}\n\nexport interface IPieProps extends IContext {\n /**\n * Name of the field in the data\n * */\n dataKey: string;\n /** Color pie\n @default #50aef4\n **/\n color?: string;\n /**\n * Active sector\n * */\n active?: boolean;\n}\n\nexport interface IEmptyDataProps extends IContext {}\n\nexport interface ILabelProps extends IContext {}\n\ndeclare const Donut: (<T>(props: MapProps<IDonutProps & T>) => ReturnEl) & {\n Pie: <T>(props: MapProps<IPieProps & T>) => ReturnEl;\n EmptyData: <T>(props: MapProps<IEmptyDataProps & T>) => ReturnEl;\n Label: <T>(props: MapProps<ILabelProps & T>) => ReturnEl;\n};\n\nexport default Donut;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Donut.d.js","names":[],"sources":["../../../src/types/Donut.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\n\nexport interface IDonutProps extends IContext {\n /** Inner radius\n * @default 0\n * */\n innerRadius?: number;\n /** Outer radius\n * @default calculated by the formula from width, height\n * */\n outerRadius?: number;\n /** Semi donut */\n halfsize?: boolean;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n}\n\nexport interface IPieProps extends IContext {\n /**\n * Name of the field in the data\n * */\n dataKey: string;\n /** Color pie\n @default #50aef4\n **/\n color?: string;\n /**\n * Active sector\n * */\n active?: boolean;\n /** Element opacity property */\n transparent?: boolean;\n}\n\nexport interface IEmptyDataProps extends IContext {}\n\nexport interface ILabelProps extends IContext {}\n\ndeclare const Donut: (<T>(props: MapProps<IDonutProps & T>) => ReturnEl) & {\n Pie: <T>(props: MapProps<IPieProps & T>) => ReturnEl;\n EmptyData: <T>(props: MapProps<IEmptyDataProps & T>) => ReturnEl;\n Label: <T>(props: MapProps<ILabelProps & T>) => ReturnEl;\n};\n\nexport default Donut;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HorizontalBar.d.js","names":[],"sources":["../../../src/types/HorizontalBar.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\nimport { IBarContext, IBackgroundProps } from './Bar';\n\nexport interface IHorizontalBarProps extends IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for 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}\n\ndeclare const HorizontalBar: (<T>(\n props: MapProps<IHorizontalBarProps & T, IBarContext>,\n) => ReturnEl) & {\n Background: <T>(props: MapProps<IBackgroundProps & T>) => ReturnEl;\n};\n\nexport default HorizontalBar;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"HorizontalBar.d.js","names":[],"sources":["../../../src/types/HorizontalBar.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\nimport { IBarContext, IBackgroundProps } from './Bar';\n\nexport interface IHorizontalBarProps extends IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for 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 /** Element opacity property */\n transparent?: boolean;\n}\n\ndeclare const HorizontalBar: (<T>(\n props: MapProps<IHorizontalBarProps & T, IBarContext>,\n) => ReturnEl) & {\n Background: <T>(props: MapProps<IBackgroundProps & T>) => ReturnEl;\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 { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\nimport { CurveFactory } from 'd3-shape';\nimport { IFadeInOutProps } from '@semcore/animation';\n\nexport interface ILineProps extends IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for 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}\n\nexport interface ILineDotsProps extends IContext, IFadeInOutProps {\n /** Show all Dot */\n display?: boolean;\n /** Hide property */\n hide?: boolean;\n /** Index active of element */\n activeIndex?: number;\n}\n\nexport interface ILineDotsContext {\n /** Value element of data */\n value?: any;\n /** Index element of data */\n index?: number;\n}\n\nexport interface ILineNullProps extends IContext {\n /** Hide property */\n hide?: boolean;\n}\n\ndeclare const Line: (<T>(props: MapProps<ILineProps & T>) => ReturnEl) & {\n Dots: <T>(props: MapProps<ILineDotsProps & T, ILineDotsContext>) => ReturnEl;\n Null: <T>(props: MapProps<ILineNullProps & T>) => ReturnEl;\n};\n\nexport default Line;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Line.d.js","names":[],"sources":["../../../src/types/Line.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\nimport { CurveFactory } from 'd3-shape';\nimport { IFadeInOutProps } from '@semcore/animation';\n\nexport interface ILineProps extends IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for 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 /** Element opacity property */\n transparent?: boolean;\n}\n\nexport interface ILineDotsProps extends IContext, IFadeInOutProps {\n /** Show all Dot */\n display?: boolean;\n /** Hide property */\n hide?: boolean;\n /** Index active of element */\n activeIndex?: number;\n}\n\nexport interface ILineDotsContext {\n /** Value element of data */\n value?: any;\n /** Index element of data */\n index?: number;\n}\n\nexport interface ILineNullProps extends IContext {\n /** Hide property */\n hide?: boolean;\n}\n\ndeclare const Line: (<T>(props: MapProps<ILineProps & T>) => ReturnEl) & {\n Dots: <T>(props: MapProps<ILineDotsProps & T, ILineDotsContext>) => ReturnEl;\n Null: <T>(props: MapProps<ILineNullProps & T>) => ReturnEl;\n};\n\nexport default Line;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Venn.d.js","names":[],"sources":["../../../src/types/Venn.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\nimport { IFadeInOutProps } from '@semcore/animation';\n\nexport interface IVennProps extends IContext, IFadeInOutProps {\n /**\n * Rotate sets in the chart\n * @default Math.PI / 2\n */\n orientation?: number;\n /**\n * The function for sorting sets inside the chart\n * @default (circle1, circle2) => circle2.radius - circle1.radius\n */\n orientationOrder?: (c1: number, c2: number) => number;\n}\n\nexport interface ICircleProps extends IContext {\n /**\n * Name of the field in the data\n * */\n dataKey: string;\n /** Color circle\n @default #3AB011\n **/\n color?: string;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n}\n\nexport interface IIntersectionProps extends IContext, IFadeInOutProps {\n /**\n * Name of the field in the data\n * */\n dataKey: string;\n}\n\ndeclare const Venn: (<T>(props: MapProps<IVennProps & T>) => ReturnEl) & {\n Circle: <T>(props: MapProps<ICircleProps & T>) => ReturnEl;\n Intersection: <T>(props: MapProps<IIntersectionProps & T>) => ReturnEl;\n};\n\nexport default Venn;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Venn.d.js","names":[],"sources":["../../../src/types/Venn.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\nimport { IFadeInOutProps } from '@semcore/animation';\n\nexport interface IVennProps extends IContext, IFadeInOutProps {\n /**\n * Rotate sets in the chart\n * @default Math.PI / 2\n */\n orientation?: number;\n /**\n * The function for sorting sets inside the chart\n * @default (circle1, circle2) => circle2.radius - circle1.radius\n */\n orientationOrder?: (c1: number, c2: number) => number;\n}\n\nexport interface ICircleProps extends IContext {\n /**\n * Name of the field in the data\n * */\n dataKey: string;\n /** Color circle\n @default #3AB011\n **/\n color?: string;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Element opacity property */\n transparent?: boolean;\n}\n\nexport interface IIntersectionProps extends IContext, IFadeInOutProps {\n /**\n * Name of the field in the data\n * */\n dataKey: string;\n /** Element opacity property */\n transparent?: boolean;\n}\n\ndeclare const Venn: (<T>(props: MapProps<IVennProps & T>) => ReturnEl) & {\n Circle: <T>(props: MapProps<ICircleProps & T>) => ReturnEl;\n Intersection: <T>(props: MapProps<IIntersectionProps & T>) => ReturnEl;\n};\n\nexport default Venn;\n"],"mappings":""}
|
package/lib/es6/Area.js
CHANGED
|
@@ -26,18 +26,19 @@ var style = (
|
|
|
26
26
|
/*__reshadow_css_start__*/
|
|
27
27
|
_sstyled.insert(
|
|
28
28
|
/*__inner_css_start__*/
|
|
29
|
-
".
|
|
29
|
+
".___SArea_1xtjl_gg_{fill:var(--intergalactic-chart-palette-order-blue,#2bb3ff);fill-opacity:.2}.___SArea_1xtjl_gg_.__color_1xtjl_gg_{fill:var(--color_1xtjl)}.___SArea_1xtjl_gg_.__transparent_1xtjl_gg_{opacity:.3}.___SAreaLine_1xtjl_gg_{stroke:var(--intergalactic-chart-palette-order-blue,#2bb3ff);stroke-width:3;fill:transparent}.___SAreaLine_1xtjl_gg_.__color_1xtjl_gg_{stroke:var(--color_1xtjl)}.___SAreaLine_1xtjl_gg_.__transparent_1xtjl_gg_{opacity:.3}.___SArea_1xtjl_gg_,.___SAreaLine_1xtjl_gg_{transition-property:d;transition-duration:var(--duration_1xtjl);transition-timing-function:ease-in-out}.___SNull_1xtjl_gg_{fill:transparent;stroke:var(--intergalactic-chart-grid-x-axis,#c4c7cf);stroke-dasharray:4}.___SNull_1xtjl_gg_.__hide_1xtjl_gg_{display:none}"
|
|
30
30
|
/*__inner_css_end__*/
|
|
31
|
-
, "
|
|
31
|
+
, "1xtjl_gg_")
|
|
32
32
|
/*__reshadow_css_end__*/
|
|
33
33
|
, {
|
|
34
|
-
"__SArea": "
|
|
35
|
-
"_color": "
|
|
36
|
-
"--color": "--
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
34
|
+
"__SArea": "___SArea_1xtjl_gg_",
|
|
35
|
+
"_color": "__color_1xtjl_gg_",
|
|
36
|
+
"--color": "--color_1xtjl",
|
|
37
|
+
"_transparent": "__transparent_1xtjl_gg_",
|
|
38
|
+
"__SAreaLine": "___SAreaLine_1xtjl_gg_",
|
|
39
|
+
"--duration": "--duration_1xtjl",
|
|
40
|
+
"__SNull": "___SNull_1xtjl_gg_",
|
|
41
|
+
"_hide": "__hide_1xtjl_gg_"
|
|
41
42
|
});
|
|
42
43
|
|
|
43
44
|
var AreaRoot = /*#__PURE__*/function (_Component) {
|
|
@@ -59,13 +60,15 @@ var AreaRoot = /*#__PURE__*/function (_Component) {
|
|
|
59
60
|
y = _this$asProps.y,
|
|
60
61
|
color = _this$asProps.color,
|
|
61
62
|
data = _this$asProps.data,
|
|
62
|
-
d3Line = _this$asProps.d3Line
|
|
63
|
+
d3Line = _this$asProps.d3Line,
|
|
64
|
+
transparent = _this$asProps.transparent;
|
|
63
65
|
return {
|
|
64
66
|
x: x,
|
|
65
67
|
y: y,
|
|
66
68
|
data: data,
|
|
67
69
|
d3: d3Line,
|
|
68
|
-
color: color
|
|
70
|
+
color: color,
|
|
71
|
+
transparent: transparent
|
|
69
72
|
};
|
|
70
73
|
}
|
|
71
74
|
}, {
|
|
@@ -119,7 +122,8 @@ var AreaRoot = /*#__PURE__*/function (_Component) {
|
|
|
119
122
|
duration = _this$asProps4.duration,
|
|
120
123
|
x = _this$asProps4.x,
|
|
121
124
|
y = _this$asProps4.y,
|
|
122
|
-
Children = _this$asProps4.Children
|
|
125
|
+
Children = _this$asProps4.Children,
|
|
126
|
+
transparent = _this$asProps4.transparent;
|
|
123
127
|
var advanceMode = !!findComponent(Children, [Area.Line.displayName]);
|
|
124
128
|
this.asProps.dataHintsHandler.specifyDataRowFields(x, y);
|
|
125
129
|
this.asProps.dataHintsHandler.establishDataType('time-series');
|
|
@@ -128,7 +132,8 @@ var AreaRoot = /*#__PURE__*/function (_Component) {
|
|
|
128
132
|
"clipPath": "url(#".concat(uid, ")"),
|
|
129
133
|
"d": d3Line(data),
|
|
130
134
|
"color": color,
|
|
131
|
-
"use:duration": "".concat(duration, "ms")
|
|
135
|
+
"use:duration": "".concat(duration, "ms"),
|
|
136
|
+
"transparent": transparent
|
|
132
137
|
})), /*#__PURE__*/React.createElement(SArea, _ref.cn("SArea", {
|
|
133
138
|
"aria-hidden": true,
|
|
134
139
|
"clipPath": "url(#".concat(uid, ")"),
|
|
@@ -136,7 +141,8 @@ var AreaRoot = /*#__PURE__*/function (_Component) {
|
|
|
136
141
|
"d": d3(data),
|
|
137
142
|
"hide": hide,
|
|
138
143
|
"color": color,
|
|
139
|
-
"use:duration": "".concat(duration, "ms")
|
|
144
|
+
"use:duration": "".concat(duration, "ms"),
|
|
145
|
+
"transparent": transparent
|
|
140
146
|
})), duration && /*#__PURE__*/React.createElement(ClipPath, _ref.cn("ClipPath", {
|
|
141
147
|
"aria-hidden": true,
|
|
142
148
|
"setAttributeTag": function setAttributeTag(rect) {
|
|
@@ -202,13 +208,15 @@ function Line(props) {
|
|
|
202
208
|
data = props.data,
|
|
203
209
|
color = props.color,
|
|
204
210
|
duration = props.duration,
|
|
205
|
-
uid = props.uid
|
|
211
|
+
uid = props.uid,
|
|
212
|
+
transparent = props.transparent;
|
|
206
213
|
return _ref2 = sstyled(styles), /*#__PURE__*/React.createElement(SAreaLine, _ref2.cn("SAreaLine", {
|
|
207
214
|
"render": "path",
|
|
208
215
|
"clipPath": "url(#".concat(uid, ")"),
|
|
209
216
|
"d": d3(data),
|
|
210
217
|
"color": color,
|
|
211
|
-
"use:duration": "".concat(duration, "ms")
|
|
218
|
+
"use:duration": "".concat(duration, "ms"),
|
|
219
|
+
"transparent": transparent
|
|
212
220
|
}));
|
|
213
221
|
}
|
|
214
222
|
|
package/lib/es6/Area.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Area.js","names":["React","area","curveLinear","line","Component","sstyled","uniqueIDEnhancement","findComponent","Dots","createElement","definedData","scaleOfBandwidth","getNullData","definedNullData","ClipPath","AreaRoot","asProps","x","y","color","data","d3Line","d3","duration","uid","SArea","Element","SAreaLine","styles","hide","size","Children","advanceMode","Area","Line","displayName","dataHintsHandler","specifyDataRowFields","establishDataType","rect","setAttribute","style","y0","$rootProps","curve","scale","xScale","yScale","yRange","range","defined","p","y1","props","Null","SNull"],"sources":["../../src/Area.jsx"],"sourcesContent":["import React from 'react';\nimport { area, curveLinear, line } from 'd3-shape';\nimport { Component, sstyled } from '@semcore/core';\nimport uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';\nimport findComponent from '@semcore/utils/lib/findComponent';\nimport Dots from './Dots';\nimport createElement from './createElement';\nimport { definedData, scaleOfBandwidth, getNullData, definedNullData } from './utils';\nimport ClipPath from './ClipPath';\n\nimport style from './style/area.shadow.css';\n\nclass AreaRoot extends Component {\n static displayName = 'Area';\n static style = style;\n static enhance = [uniqueIDEnhancement()];\n\n static defaultProps = ({ x, y, y0, $rootProps, curve = curveLinear, scale }) => {\n const [xScale, yScale] = scale || $rootProps.scale;\n const yRange = yScale.range();\n\n return {\n d3: area()\n .defined(definedData(x, y))\n .curve(curve)\n .x((p) => scaleOfBandwidth(xScale, p[x]))\n .y0((p) => (p[y0] ? scaleOfBandwidth(yScale, p[y0]) : yRange[0]))\n .y1((p) => scaleOfBandwidth(yScale, p[y])),\n d3Line: line()\n .defined(definedData(x, y))\n .curve(curve)\n .x((p) => scaleOfBandwidth(xScale, p[x]))\n .y((p) => scaleOfBandwidth(yScale, p[y])),\n duration: 500,\n };\n };\n\n getDotsProps() {\n const { x, y, color, data, d3Line } = this.asProps;\n\n return {\n x,\n y,\n data,\n d3: d3Line,\n color,\n };\n }\n\n getNullProps() {\n const { x, y, color, data, d3Line } = this.asProps;\n return {\n data: getNullData(data, definedNullData(x, y), y),\n d3: d3Line,\n color,\n };\n }\n\n getLineProps() {\n const { duration, color, data, d3Line, uid } = this.asProps;\n\n return {\n uid,\n data,\n d3: d3Line,\n color,\n duration,\n };\n }\n\n render() {\n const SArea = this.Element;\n const SAreaLine = 'path';\n const {
|
|
1
|
+
{"version":3,"file":"Area.js","names":["React","area","curveLinear","line","Component","sstyled","uniqueIDEnhancement","findComponent","Dots","createElement","definedData","scaleOfBandwidth","getNullData","definedNullData","ClipPath","AreaRoot","asProps","x","y","color","data","d3Line","transparent","d3","duration","uid","SArea","Element","SAreaLine","styles","hide","size","Children","advanceMode","Area","Line","displayName","dataHintsHandler","specifyDataRowFields","establishDataType","rect","setAttribute","style","y0","$rootProps","curve","scale","xScale","yScale","yRange","range","defined","p","y1","props","Null","SNull"],"sources":["../../src/Area.jsx"],"sourcesContent":["import React from 'react';\nimport { area, curveLinear, line } from 'd3-shape';\nimport { Component, sstyled } from '@semcore/core';\nimport uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';\nimport findComponent from '@semcore/utils/lib/findComponent';\nimport Dots from './Dots';\nimport createElement from './createElement';\nimport { definedData, scaleOfBandwidth, getNullData, definedNullData } from './utils';\nimport ClipPath from './ClipPath';\n\nimport style from './style/area.shadow.css';\n\nclass AreaRoot extends Component {\n static displayName = 'Area';\n static style = style;\n static enhance = [uniqueIDEnhancement()];\n\n static defaultProps = ({ x, y, y0, $rootProps, curve = curveLinear, scale }) => {\n const [xScale, yScale] = scale || $rootProps.scale;\n const yRange = yScale.range();\n\n return {\n d3: area()\n .defined(definedData(x, y))\n .curve(curve)\n .x((p) => scaleOfBandwidth(xScale, p[x]))\n .y0((p) => (p[y0] ? scaleOfBandwidth(yScale, p[y0]) : yRange[0]))\n .y1((p) => scaleOfBandwidth(yScale, p[y])),\n d3Line: line()\n .defined(definedData(x, y))\n .curve(curve)\n .x((p) => scaleOfBandwidth(xScale, p[x]))\n .y((p) => scaleOfBandwidth(yScale, p[y])),\n duration: 500,\n };\n };\n\n getDotsProps() {\n const { x, y, color, data, d3Line, transparent } = this.asProps;\n\n return {\n x,\n y,\n data,\n d3: d3Line,\n color,\n transparent,\n };\n }\n\n getNullProps() {\n const { x, y, color, data, d3Line } = this.asProps;\n return {\n data: getNullData(data, definedNullData(x, y), y),\n d3: d3Line,\n color,\n };\n }\n\n getLineProps() {\n const { duration, color, data, d3Line, uid } = this.asProps;\n\n return {\n uid,\n data,\n d3: d3Line,\n color,\n duration,\n };\n }\n\n render() {\n const SArea = this.Element;\n const SAreaLine = 'path';\n const {\n styles,\n hide,\n d3,\n d3Line,\n data,\n color,\n uid,\n size,\n duration,\n x,\n y,\n Children,\n transparent,\n } = this.asProps;\n const advanceMode = !!findComponent(Children, [Area.Line.displayName]);\n\n this.asProps.dataHintsHandler.specifyDataRowFields(x, y);\n this.asProps.dataHintsHandler.establishDataType('time-series');\n\n return sstyled(styles)(\n <>\n {!advanceMode && (\n <SAreaLine\n aria-hidden\n clipPath={`url(#${uid})`}\n d={d3Line(data)}\n color={color}\n use:duration={`${duration}ms`}\n transparent={transparent}\n />\n )}\n <SArea\n aria-hidden\n clipPath={`url(#${uid})`}\n render=\"path\"\n d={d3(data)}\n hide={hide}\n color={color}\n use:duration={`${duration}ms`}\n transparent={transparent}\n />\n {duration && (\n <ClipPath\n aria-hidden\n setAttributeTag={(rect) => {\n rect.setAttribute('width', size[0]);\n }}\n id={uid}\n x=\"0\"\n y=\"0\"\n width={0}\n height={size[1]}\n transition={`width ${duration}ms ease-in-out`}\n />\n )}\n </>,\n );\n }\n}\n\nfunction Line(props) {\n const { Element: SAreaLine, styles, d3, data, color, duration, uid, transparent } = props;\n return sstyled(styles)(\n <SAreaLine\n render=\"path\"\n clipPath={`url(#${uid})`}\n d={d3(data)}\n color={color}\n use:duration={`${duration}ms`}\n transparent={transparent}\n />,\n );\n}\n\nfunction Null(props) {\n const { Element: SNull, styles, d3, data, hide, color } = props;\n return sstyled(styles)(<SNull render=\"path\" d={d3(data)} hide={hide} color={color} />);\n}\n\nconst Area = createElement(AreaRoot, {\n Dots,\n Null,\n Line,\n});\n\nexport default Area;\n"],"mappings":";;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,EAAeC,WAAf,EAA4BC,IAA5B,QAAwC,UAAxC;AACA,SAASC,SAAT,EAAoBC,OAApB,QAAmC,eAAnC;AACA,OAAOC,mBAAP,MAAgC,6BAAhC;AACA,OAAOC,aAAP,MAA0B,kCAA1B;AACA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,aAAP,MAA0B,iBAA1B;AACA,SAASC,WAAT,EAAsBC,gBAAtB,EAAwCC,WAAxC,EAAqDC,eAArD,QAA4E,SAA5E;AACA,OAAOC,QAAP,MAAqB,YAArB;;;;;;;;;;;;;;;;;;;;;;IAIMC,Q;;;;;;;;;;;;;WAyBJ,wBAAe;MAC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AA1D,CAAQ3B,OAAR;EAAA,IAAwBE,MAAxB,GAA0DyB,KAA1D,CAAwBzB,MAAxB;EAAA,IAAgCN,EAAhC,GAA0D+B,KAA1D,CAAgC/B,EAAhC;EAAA,IAAoCH,IAApC,GAA0DkC,KAA1D,CAAoClC,IAApC;EAAA,IAA0CU,IAA1C,GAA0DwB,KAA1D,CAA0CxB,IAA1C;EAAA,IAAgDX,KAAhD,GAA0DmC,KAA1D,CAAgDnC,KAAhD;EACA,eAAOd,OAAO,CAACwB,MAAD,CAAd,eAAuB,oBAAC,KAAD;IAAA,UAAc,MAAd;IAAA,KAAwBN,EAAE,CAACH,IAAD,CAA1B;IAAA,QAAwCU,IAAxC;IAAA,SAAqDX;EAArD,GAAvB;AACD;;AAED,IAAMe,IAAI,GAAGzB,aAAa,CAACM,QAAD,EAAW;EACnCP,IAAI,EAAJA,IADmC;EAEnC+C,IAAI,EAAJA,IAFmC;EAGnCpB,IAAI,EAAJA;AAHmC,CAAX,CAA1B;AAMA,eAAeD,IAAf"}
|
package/lib/es6/Axis.js
CHANGED
|
@@ -27,23 +27,23 @@ var style = (
|
|
|
27
27
|
/*__reshadow_css_start__*/
|
|
28
28
|
_sstyled.insert(
|
|
29
29
|
/*__inner_css_start__*/
|
|
30
|
-
".
|
|
30
|
+
".___SAxis_197b3_gg_{stroke:var(--intergalactic-chart-grid-x-axis,#c4c7cf)}.___SAxis_197b3_gg_.__hide_197b3_gg_{display:none}.___STick_197b3_gg_{font-size:var(--intergalactic-fs-100,12px);fill:var(--intergalactic-chart-grid-text-label,#6c6e79)}.___STick_197b3_gg_.__hide_197b3_gg_{display:none}.___SGrid_197b3_gg_{fill:transparent;stroke:var(--intergalactic-border-secondary,#e0e1e9)}.___STitle_197b3_gg_{font-size:var(--intergalactic-fs-100,12px);fill:var(--intergalactic-text-hint,#6c6e79);transform-origin:var(--transform-origin_197b3)}.___STitle_197b3_gg_._position_top_197b3_gg_{text-anchor:middle}.___STitle_197b3_gg_._position_bottom_197b3_gg_{text-anchor:middle;alignment-baseline:hanging}.___STitle_197b3_gg_._position_right_197b3_gg_{transform:rotate(-90deg);alignment-baseline:middle;text-anchor:middle}.___STitle_197b3_gg_._position_left_197b3_gg_{transform:rotate(-90deg);text-anchor:middle;alignment-baseline:middle}.___STick_197b3_gg_._position_top_197b3_gg_{transform:translateY(-12px);text-anchor:middle}.___STick_197b3_gg_._position_bottom_197b3_gg_{transform:translateY(12px);text-anchor:middle;alignment-baseline:hanging}.___STick_197b3_gg_._position_right_197b3_gg_{transform:translateX(16px);text-anchor:start;alignment-baseline:middle}.___STick_197b3_gg_._position_left_197b3_gg_{transform:translateX(-16px);text-anchor:end;alignment-baseline:middle}.___STick_197b3_gg_._position_custom_0_197b3_gg_{transform:translateY(12px);text-anchor:middle;alignment-baseline:hanging}.___STick_197b3_gg_._position_custom_1_197b3_gg_{transform:translateX(-16px);text-anchor:end;alignment-baseline:middle}"
|
|
31
31
|
/*__inner_css_end__*/
|
|
32
|
-
, "
|
|
32
|
+
, "197b3_gg_")
|
|
33
33
|
/*__reshadow_css_end__*/
|
|
34
34
|
, {
|
|
35
|
-
"__SAxis": "
|
|
36
|
-
"_hide": "
|
|
37
|
-
"__STick": "
|
|
38
|
-
"__SGrid": "
|
|
39
|
-
"__STitle": "
|
|
40
|
-
"--transform-origin": "--transform-
|
|
41
|
-
"_position_top": "
|
|
42
|
-
"_position_bottom": "
|
|
43
|
-
"_position_right": "
|
|
44
|
-
"_position_left": "
|
|
45
|
-
"_position_custom_0": "
|
|
46
|
-
"_position_custom_1": "
|
|
35
|
+
"__SAxis": "___SAxis_197b3_gg_",
|
|
36
|
+
"_hide": "__hide_197b3_gg_",
|
|
37
|
+
"__STick": "___STick_197b3_gg_",
|
|
38
|
+
"__SGrid": "___SGrid_197b3_gg_",
|
|
39
|
+
"__STitle": "___STitle_197b3_gg_",
|
|
40
|
+
"--transform-origin": "--transform-origin_197b3",
|
|
41
|
+
"_position_top": "_position_top_197b3_gg_",
|
|
42
|
+
"_position_bottom": "_position_bottom_197b3_gg_",
|
|
43
|
+
"_position_right": "_position_right_197b3_gg_",
|
|
44
|
+
"_position_left": "_position_left_197b3_gg_",
|
|
45
|
+
"_position_custom_0": "_position_custom_0_197b3_gg_",
|
|
46
|
+
"_position_custom_1": "_position_custom_1_197b3_gg_"
|
|
47
47
|
});
|
|
48
48
|
var CUSTOM_0 = Symbol('custom_0');
|
|
49
49
|
var CUSTOM_1 = Symbol('custom_1');
|
package/lib/es6/Bar.js
CHANGED
|
@@ -24,17 +24,18 @@ var style = (
|
|
|
24
24
|
/*__reshadow_css_start__*/
|
|
25
25
|
_sstyled.insert(
|
|
26
26
|
/*__inner_css_start__*/
|
|
27
|
-
".
|
|
27
|
+
".___SBar_1c6er_gg_{fill:var(--intergalactic-chart-palette-order-blue,#2bb3ff);transition-property:height,width,y;transition-duration:var(--duration_1c6er);transition-timing-function:ease-in-out}.___SBar_1c6er_gg_.__color_1c6er_gg_{fill:var(--color_1c6er)}.___SBar_1c6er_gg_.__hide_1c6er_gg_{display:none}.___SBar_1c6er_gg_.__transparent_1c6er_gg_{opacity:.3}.___SBackground_1c6er_gg_{fill:var(--intergalactic-chart-palette-order-other-data,#c4c7cf)}"
|
|
28
28
|
/*__inner_css_end__*/
|
|
29
|
-
, "
|
|
29
|
+
, "1c6er_gg_")
|
|
30
30
|
/*__reshadow_css_end__*/
|
|
31
31
|
, {
|
|
32
|
-
"__SBar": "
|
|
33
|
-
"--duration": "--
|
|
34
|
-
"_color": "
|
|
35
|
-
"--color": "--
|
|
36
|
-
"_hide": "
|
|
37
|
-
"
|
|
32
|
+
"__SBar": "___SBar_1c6er_gg_",
|
|
33
|
+
"--duration": "--duration_1c6er",
|
|
34
|
+
"_color": "__color_1c6er_gg_",
|
|
35
|
+
"--color": "--color_1c6er",
|
|
36
|
+
"_hide": "__hide_1c6er_gg_",
|
|
37
|
+
"_transparent": "__transparent_1c6er_gg_",
|
|
38
|
+
"__SBackground": "___SBackground_1c6er_gg_"
|
|
38
39
|
});
|
|
39
40
|
|
|
40
41
|
var BarRoot = /*#__PURE__*/function (_Component) {
|
|
@@ -102,7 +103,8 @@ var BarRoot = /*#__PURE__*/function (_Component) {
|
|
|
102
103
|
hMin = _this$asProps3.hMin,
|
|
103
104
|
widthProps = _this$asProps3.width,
|
|
104
105
|
groupKey = _this$asProps3.groupKey,
|
|
105
|
-
onClick = _this$asProps3.onClick
|
|
106
|
+
onClick = _this$asProps3.onClick,
|
|
107
|
+
transparent = _this$asProps3.transparent;
|
|
106
108
|
|
|
107
109
|
var _scale = _slicedToArray(scale, 2),
|
|
108
110
|
xScale = _scale[0],
|
|
@@ -149,7 +151,8 @@ var BarRoot = /*#__PURE__*/function (_Component) {
|
|
|
149
151
|
"height": height,
|
|
150
152
|
"d": dSvg,
|
|
151
153
|
"onClickCapture": handleClick,
|
|
152
|
-
"use:duration": "".concat(duration, "ms")
|
|
154
|
+
"use:duration": "".concat(duration, "ms"),
|
|
155
|
+
"transparent": transparent
|
|
153
156
|
}));
|
|
154
157
|
}
|
|
155
158
|
}, {
|
package/lib/es6/Bar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bar.js","names":["React","transition","Component","sstyled","uniqueIDEnhancement","createElement","ClipPath","getBandwidth","roundedPath","BarRoot","props","index","asProps","x","data","value","duration","uid","selectRect","selection","selectAll","selectRectNode","node","getAttribute","attr","animationBar","d","i","SBar","Element","styles","color","y","y0","scale","hide","offset","r","hMin","widthProps","width","groupKey","onClick","xScale","yScale","barY","Math","max","Object","is","barX","height","abs","min","domain","handleClick","event","dSvg","getRect","radius","Array","isArray","position","dataHintsHandler","describeGroupedValues","describeValueEntity","size","map","renderBar","bind","style","Background","SBackground","yRange","range","bandwidth"],"sources":["../../src/Bar.jsx"],"sourcesContent":["import React from 'react';\nimport { transition } from 'd3-transition';\nimport { Component, sstyled } from '@semcore/core';\nimport uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';\nimport createElement from './createElement';\nimport ClipPath from './ClipPath';\nimport { getBandwidth, roundedPath } from './utils';\n\nimport style from './style/bar.shadow.css';\n\nclass BarRoot extends Component {\n static displayName = 'Bar';\n static style = style;\n static enhance = [uniqueIDEnhancement()];\n\n static defaultProps = {\n offset: [0, 0],\n duration: 500,\n r: 2,\n hMin: 4,\n };\n\n getBackgroundProps(props, index) {\n const { x, data } = this.asProps;\n return {\n value: data[index][x],\n };\n }\n\n animationBar() {\n const { duration, uid } = this.asProps;\n const selectRect = transition().selection().selectAll(`#${uid} rect`);\n const selectRectNode = selectRect.node();\n\n if (duration > 0 && selectRectNode && selectRectNode.getAttribute('y') !== '0') {\n selectRect.transition().duration(duration).attr('y', 0);\n }\n }\n\n componentDidUpdate() {\n this.animationBar();\n }\n\n componentDidMount() {\n this.animationBar();\n }\n\n renderBar(d, i) {\n const SBar = this.Element;\n const {\n styles,\n color,\n x,\n y,\n y0,\n scale,\n hide,\n offset,\n duration,\n uid,\n r,\n hMin,\n width: widthProps,\n groupKey,\n onClick,\n } = this.asProps;\n\n const [xScale, yScale] = scale;\n const barY = yScale(Math.max(d[y0] ?? 0, d[y])) + offset[1] - (Object.is(d[y], 0) ? hMin : 0);\n const barX = xScale(d[x]) + offset[0];\n const height =\n Math.abs(yScale(d[y]) - Math.min(yScale(yScale.domain()[0]), yScale(d[y0] ?? 0))) || hMin;\n const handleClick = (event) => onClick?.(d, event);\n const width = widthProps || getBandwidth(xScale);\n const dSvg = getRect({\n x: barX,\n y: barY,\n width,\n height,\n radius: Array.isArray(r) ? r[i] : r,\n position: d[y] > 0 || Object.is(d[y], 0) ? 'top' : 'bottom',\n });\n\n if (groupKey) {\n this.asProps.dataHintsHandler.describeGroupedValues(groupKey, y);\n } else {\n this.asProps.dataHintsHandler.describeValueEntity(`${i}.${y}`, groupKey ?? d[x]);\n }\n\n return sstyled(styles)(\n <SBar\n aria-hidden\n key={`bar-${i}`}\n render=\"path\"\n clipPath={`url(#${uid})`}\n __excludeProps={['data', 'scale', 'value', 'onClick']}\n childrenPosition=\"above\"\n value={d}\n index={i}\n hide={hide}\n color={color}\n x={barX}\n y={barY}\n width={width}\n height={height}\n d={dSvg}\n onClickCapture={handleClick}\n use:duration={`${duration}ms`}\n />,\n );\n }\n render() {\n const { data, uid, size, duration } = this.asProps;\n return (\n <>\n {data.map(this.renderBar.bind(this))}\n {duration && (\n <ClipPath\n aria-hidden\n key={`${uid}-animation`}\n id={uid}\n x=\"0\"\n y={size[1]}\n width={size[0]}\n height={`${size[1]}px`}\n />\n )}\n </>\n );\n }\n}\n\nfunction Background(props) {\n const { Element: SBackground, styles, scale, value } = props;\n\n const [xScale, yScale] = scale;\n const yRange = yScale.range();\n\n return sstyled(styles)(\n <SBackground\n aria-hidden\n render=\"rect\"\n childrenPosition=\"above\"\n width={xScale.bandwidth()}\n height={yRange[0] - yRange[1]}\n x={xScale(value)}\n y={yRange[1]}\n />,\n );\n}\n\nfunction getRect({ x, y, width, height, radius, position }) {\n if (height <= radius) return '';\n if (radius) {\n if (position === 'top')\n return roundedPath(x, y, width, height, radius, true, true, false, false);\n return roundedPath(x, y, width, height, radius, false, false, true, true);\n }\n return roundedPath(x, y, width, height, radius);\n}\n\nexport default createElement(BarRoot, { Background });\n"],"mappings":";;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,UAAT,QAA2B,eAA3B;AACA,SAASC,SAAT,EAAoBC,OAApB,QAAmC,eAAnC;AACA,OAAOC,mBAAP,MAAgC,6BAAhC;AACA,OAAOC,aAAP,MAA0B,iBAA1B;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,SAASC,YAAT,EAAuBC,WAAvB,QAA0C,SAA1C;;;;;;;;;;;;;;;;;;;;IAIMC,O;;;;;;;;;;;;;WAYJ,4BAAmBC,KAAnB,EAA0BC,KAA1B,EAAiC;MAC/B,oBAAoB,KAAKC,OAAzB;MAAA,IAAQC,CAAR,iBAAQA,CAAR;MAAA,IAAWC,IAAX,iBAAWA,IAAX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AAzC7C,CAAyC,SAAzCA,CAAyC;EAAA,IAAtCmB,CAAsC,SAAtCA,CAAsC;EAAA,IAAnCQ,KAAmC,SAAnCA,KAAmC;EAAA,IAA5BW,MAA4B,SAA5BA,MAA4B;EAAA,IAApBQ,MAAoB,SAApBA,MAAoB;EAAA,IAAZG,QAAY,SAAZA,QAAY;EAC1D,IAAIX,MAAM,IAAIQ,MAAd,EAAsB,OAAO,EAAP;;EACtB,IAAIA,MAAJ,EAAY;IACV,IAAIG,QAAQ,KAAK,KAAjB,EACE,OAAOtD,WAAW,CAACK,CAAD,EAAImB,CAAJ,EAAOQ,KAAP,EAAcW,MAAd,EAAsBQ,MAAtB,EAA8B,IAA9B,EAAoC,IAApC,EAA0C,KAA1C,EAAiD,KAAjD,CAAlB;IACF,OAAOnD,WAAW,CAACK,CAAD,EAAImB,CAAJ,EAAOQ,KAAP,EAAcW,MAAd,EAAsBQ,MAAtB,EAA8B,KAA9B,EAAqC,KAArC,EAA4C,IAA5C,EAAkD,IAAlD,CAAlB;EACD;;EACD,OAAOnD,WAAW,CAACK,CAAD,EAAImB,CAAJ,EAAOQ,KAAP,EAAcW,MAAd,EAAsBQ,MAAtB,CAAlB;AACD;;AAED,eAAetD,aAAa,CAACI,OAAD,EAAU;EAAE8D,UAAU,EAAVA;AAAF,CAAV,CAA5B"}
|
|
1
|
+
{"version":3,"file":"Bar.js","names":["React","transition","Component","sstyled","uniqueIDEnhancement","createElement","ClipPath","getBandwidth","roundedPath","BarRoot","props","index","asProps","x","data","value","duration","uid","selectRect","selection","selectAll","selectRectNode","node","getAttribute","attr","animationBar","d","i","SBar","Element","styles","color","y","y0","scale","hide","offset","r","hMin","widthProps","width","groupKey","onClick","transparent","xScale","yScale","barY","Math","max","Object","is","barX","height","abs","min","domain","handleClick","event","dSvg","getRect","radius","Array","isArray","position","dataHintsHandler","describeGroupedValues","describeValueEntity","size","map","renderBar","bind","style","Background","SBackground","yRange","range","bandwidth"],"sources":["../../src/Bar.jsx"],"sourcesContent":["import React from 'react';\nimport { transition } from 'd3-transition';\nimport { Component, sstyled } from '@semcore/core';\nimport uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';\nimport createElement from './createElement';\nimport ClipPath from './ClipPath';\nimport { getBandwidth, roundedPath } from './utils';\n\nimport style from './style/bar.shadow.css';\n\nclass BarRoot extends Component {\n static displayName = 'Bar';\n static style = style;\n static enhance = [uniqueIDEnhancement()];\n\n static defaultProps = {\n offset: [0, 0],\n duration: 500,\n r: 2,\n hMin: 4,\n };\n\n getBackgroundProps(props, index) {\n const { x, data } = this.asProps;\n return {\n value: data[index][x],\n };\n }\n\n animationBar() {\n const { duration, uid } = this.asProps;\n const selectRect = transition().selection().selectAll(`#${uid} rect`);\n const selectRectNode = selectRect.node();\n\n if (duration > 0 && selectRectNode && selectRectNode.getAttribute('y') !== '0') {\n selectRect.transition().duration(duration).attr('y', 0);\n }\n }\n\n componentDidUpdate() {\n this.animationBar();\n }\n\n componentDidMount() {\n this.animationBar();\n }\n\n renderBar(d, i) {\n const SBar = this.Element;\n const {\n styles,\n color,\n x,\n y,\n y0,\n scale,\n hide,\n offset,\n duration,\n uid,\n r,\n hMin,\n width: widthProps,\n groupKey,\n onClick,\n transparent,\n } = this.asProps;\n\n const [xScale, yScale] = scale;\n const barY = yScale(Math.max(d[y0] ?? 0, d[y])) + offset[1] - (Object.is(d[y], 0) ? hMin : 0);\n const barX = xScale(d[x]) + offset[0];\n const height =\n Math.abs(yScale(d[y]) - Math.min(yScale(yScale.domain()[0]), yScale(d[y0] ?? 0))) || hMin;\n const handleClick = (event) => onClick?.(d, event);\n const width = widthProps || getBandwidth(xScale);\n const dSvg = getRect({\n x: barX,\n y: barY,\n width,\n height,\n radius: Array.isArray(r) ? r[i] : r,\n position: d[y] > 0 || Object.is(d[y], 0) ? 'top' : 'bottom',\n });\n\n if (groupKey) {\n this.asProps.dataHintsHandler.describeGroupedValues(groupKey, y);\n } else {\n this.asProps.dataHintsHandler.describeValueEntity(`${i}.${y}`, groupKey ?? d[x]);\n }\n\n return sstyled(styles)(\n <SBar\n aria-hidden\n key={`bar-${i}`}\n render=\"path\"\n clipPath={`url(#${uid})`}\n __excludeProps={['data', 'scale', 'value', 'onClick']}\n childrenPosition=\"above\"\n value={d}\n index={i}\n hide={hide}\n color={color}\n x={barX}\n y={barY}\n width={width}\n height={height}\n d={dSvg}\n onClickCapture={handleClick}\n use:duration={`${duration}ms`}\n transparent={transparent}\n />,\n );\n }\n render() {\n const { data, uid, size, duration } = this.asProps;\n return (\n <>\n {data.map(this.renderBar.bind(this))}\n {duration && (\n <ClipPath\n aria-hidden\n key={`${uid}-animation`}\n id={uid}\n x=\"0\"\n y={size[1]}\n width={size[0]}\n height={`${size[1]}px`}\n />\n )}\n </>\n );\n }\n}\n\nfunction Background(props) {\n const { Element: SBackground, styles, scale, value } = props;\n\n const [xScale, yScale] = scale;\n const yRange = yScale.range();\n\n return sstyled(styles)(\n <SBackground\n aria-hidden\n render=\"rect\"\n childrenPosition=\"above\"\n width={xScale.bandwidth()}\n height={yRange[0] - yRange[1]}\n x={xScale(value)}\n y={yRange[1]}\n />,\n );\n}\n\nfunction getRect({ x, y, width, height, radius, position }) {\n if (height <= radius) return '';\n if (radius) {\n if (position === 'top')\n return roundedPath(x, y, width, height, radius, true, true, false, false);\n return roundedPath(x, y, width, height, radius, false, false, true, true);\n }\n return roundedPath(x, y, width, height, radius);\n}\n\nexport default createElement(BarRoot, { Background });\n"],"mappings":";;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,UAAT,QAA2B,eAA3B;AACA,SAASC,SAAT,EAAoBC,OAApB,QAAmC,eAAnC;AACA,OAAOC,mBAAP,MAAgC,6BAAhC;AACA,OAAOC,aAAP,MAA0B,iBAA1B;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,SAASC,YAAT,EAAuBC,WAAvB,QAA0C,SAA1C;;;;;;;;;;;;;;;;;;;;;IAIMC,O;;;;;;;;;;;;;WAYJ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AJT;IAAA,UAKUF,MAAM,CAAC,CAAD,CAAN,GAAYA,MAAM,CAAC,CAAD,CAL5B;IAAA,KAMK9B,MAAM,CAAC7B,KAAD,CANX;IAAA,KAOK2D,MAAM,CAAC,CAAD;EAPX,GADF;AAWD;;AAED,SAASf,OAAT,QAA4D;EAAA,IAAzC9C,CAAyC,SAAzCA,CAAyC;EAAA,IAAtCmB,CAAsC,SAAtCA,CAAsC;EAAA,IAAnCQ,KAAmC,SAAnCA,KAAmC;EAAA,IAA5BY,MAA4B,SAA5BA,MAA4B;EAAA,IAApBQ,MAAoB,SAApBA,MAAoB;EAAA,IAAZG,QAAY,SAAZA,QAAY;EAC1D,IAAIX,MAAM,IAAIQ,MAAd,EAAsB,OAAO,EAAP;;EACtB,IAAIA,MAAJ,EAAY;IACV,IAAIG,QAAQ,KAAK,KAAjB,EACE,OAAOvD,WAAW,CAACK,CAAD,EAAImB,CAAJ,EAAOQ,KAAP,EAAcY,MAAd,EAAsBQ,MAAtB,EAA8B,IAA9B,EAAoC,IAApC,EAA0C,KAA1C,EAAiD,KAAjD,CAAlB;IACF,OAAOpD,WAAW,CAACK,CAAD,EAAImB,CAAJ,EAAOQ,KAAP,EAAcY,MAAd,EAAsBQ,MAAtB,EAA8B,KAA9B,EAAqC,KAArC,EAA4C,IAA5C,EAAkD,IAAlD,CAAlB;EACD;;EACD,OAAOpD,WAAW,CAACK,CAAD,EAAImB,CAAJ,EAAOQ,KAAP,EAAcY,MAAd,EAAsBQ,MAAtB,CAAlB;AACD;;AAED,eAAevD,aAAa,CAACI,OAAD,EAAU;EAAE+D,UAAU,EAAVA;AAAF,CAAV,CAA5B"}
|
package/lib/es6/Bubble.js
CHANGED
|
@@ -32,19 +32,19 @@ var style = (
|
|
|
32
32
|
/*__reshadow_css_start__*/
|
|
33
33
|
_sstyled.insert(
|
|
34
34
|
/*__inner_css_start__*/
|
|
35
|
-
".
|
|
35
|
+
".___SBubble_1w6v0_gg_{fill:var(--intergalactic-chart-palette-order-blue,#2bb3ff);stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;transition-property:cx,cy;transition-duration:var(--duration_1w6v0);transition-timing-function:ease-in-out;opacity:.5}.___SBubble_1w6v0_gg_:hover{opacity:.8}.___SBubble_1w6v0_gg_.__color_1w6v0_gg_{fill:var(--color_1w6v0)}.___SCenter_1w6v0_gg_{text-anchor:middle;font-size:calc(var(--intergalactic-fs-100, 12px) - 1px);stroke:var(--intergalactic-chart-palette-order-blue,#2bb3ff)}.___SCenter_1w6v0_gg_.__color_1w6v0_gg_{stroke:var(--color_1w6v0)}.___SLabel_1w6v0_gg_{fill:var(--intergalactic-chart-palette-order-blue,#2bb3ff)}.___SLabel_1w6v0_gg_._position_right_1w6v0_gg_{text-anchor:end}.___SLabel_1w6v0_gg_._position_left_1w6v0_gg_{text-anchor:start}.___SLabel_1w6v0_gg_.__color_1w6v0_gg_{fill:var(--color_1w6v0)}"
|
|
36
36
|
/*__inner_css_end__*/
|
|
37
|
-
, "
|
|
37
|
+
, "1w6v0_gg_")
|
|
38
38
|
/*__reshadow_css_end__*/
|
|
39
39
|
, {
|
|
40
|
-
"__SBubble": "
|
|
41
|
-
"--duration": "--
|
|
42
|
-
"_color": "
|
|
43
|
-
"--color": "--
|
|
44
|
-
"__SCenter": "
|
|
45
|
-
"__SLabel": "
|
|
46
|
-
"_position_right": "
|
|
47
|
-
"_position_left": "
|
|
40
|
+
"__SBubble": "___SBubble_1w6v0_gg_",
|
|
41
|
+
"--duration": "--duration_1w6v0",
|
|
42
|
+
"_color": "__color_1w6v0_gg_",
|
|
43
|
+
"--color": "--color_1w6v0",
|
|
44
|
+
"__SCenter": "___SCenter_1w6v0_gg_",
|
|
45
|
+
"__SLabel": "___SLabel_1w6v0_gg_",
|
|
46
|
+
"_position_right": "_position_right_1w6v0_gg_",
|
|
47
|
+
"_position_left": "_position_left_1w6v0_gg_"
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
var BubbleRoot = /*#__PURE__*/function (_Component) {
|
package/lib/es6/Donut.js
CHANGED
|
@@ -8,7 +8,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
9
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
10
10
|
import { sstyled as _sstyled } from "@semcore/core";
|
|
11
|
-
var _excluded = ["Element", "styles", "d3Arc", "data", "color", "$animationActivePie", "active", "d3ArcOut", "name", "dataKey", "dataHintsHandler"];
|
|
11
|
+
var _excluded = ["Element", "styles", "d3Arc", "data", "color", "$animationActivePie", "active", "d3ArcOut", "name", "dataKey", "dataHintsHandler", "transparent"];
|
|
12
12
|
|
|
13
13
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
14
14
|
|
|
@@ -34,16 +34,17 @@ var style = (
|
|
|
34
34
|
/*__reshadow_css_start__*/
|
|
35
35
|
_sstyled.insert(
|
|
36
36
|
/*__inner_css_start__*/
|
|
37
|
-
".
|
|
37
|
+
".___SPie_17fbb_gg_{stroke:var(--intergalactic-chart-grid-border,#fff);fill:var(--intergalactic-chart-palette-order-blue,#2bb3ff)}.___SPie_17fbb_gg_.__color_17fbb_gg_{fill:var(--color_17fbb)}.___SPie_17fbb_gg_.__transparent_17fbb_gg_{opacity:.3}.___SEmptyData_17fbb_gg_{fill:var(--intergalactic-chart-palette-order-null,#e0e1e9)}.___SEmptyData_17fbb_gg_.__color_17fbb_gg_{fill:var(--color_17fbb)}.___SLabel_17fbb_gg_{text-anchor:middle;vertical-anchor:middle}"
|
|
38
38
|
/*__inner_css_end__*/
|
|
39
|
-
, "
|
|
39
|
+
, "17fbb_gg_")
|
|
40
40
|
/*__reshadow_css_end__*/
|
|
41
41
|
, {
|
|
42
|
-
"__SPie": "
|
|
43
|
-
"_color": "
|
|
44
|
-
"--color": "--
|
|
45
|
-
"
|
|
46
|
-
"
|
|
42
|
+
"__SPie": "___SPie_17fbb_gg_",
|
|
43
|
+
"_color": "__color_17fbb_gg_",
|
|
44
|
+
"--color": "--color_17fbb",
|
|
45
|
+
"_transparent": "__transparent_17fbb_gg_",
|
|
46
|
+
"__SEmptyData": "___SEmptyData_17fbb_gg_",
|
|
47
|
+
"__SLabel": "___SLabel_17fbb_gg_"
|
|
47
48
|
});
|
|
48
49
|
var DEFAULT_INSTANCE = Symbol('DEFAULT_INSTANCE');
|
|
49
50
|
|
|
@@ -100,7 +101,7 @@ function animationHoverPie(_ref6) {
|
|
|
100
101
|
outerRadius = _ref6.outerRadius;
|
|
101
102
|
|
|
102
103
|
if (duration > 0) {
|
|
103
|
-
transition().selection().select(selector).transition().duration(duration).attrTween('d', function () {
|
|
104
|
+
transition().selection().select(selector).transition(transition).duration(duration).attrTween('d', function () {
|
|
104
105
|
if (!d) return function () {
|
|
105
106
|
return '';
|
|
106
107
|
};
|
|
@@ -430,6 +431,7 @@ function Pie(_ref15) {
|
|
|
430
431
|
name = _ref15.name,
|
|
431
432
|
dataKey = _ref15.dataKey,
|
|
432
433
|
dataHintsHandler = _ref15.dataHintsHandler,
|
|
434
|
+
transparent = _ref15.transparent,
|
|
433
435
|
other = _objectWithoutProperties(_ref15, _excluded);
|
|
434
436
|
|
|
435
437
|
var _useState = useState(false),
|
|
@@ -457,7 +459,8 @@ function Pie(_ref15) {
|
|
|
457
459
|
return _ref = sstyled(styles), /*#__PURE__*/React.createElement(SPie, _ref.cn("SPie", {
|
|
458
460
|
"render": "path",
|
|
459
461
|
"color": color,
|
|
460
|
-
"d": active ? d3ArcOut(data) : d3Arc(data)
|
|
462
|
+
"d": active ? d3ArcOut(data) : d3Arc(data),
|
|
463
|
+
"transparent": transparent
|
|
461
464
|
}));
|
|
462
465
|
}
|
|
463
466
|
|