@alfalab/core-components-chart 3.3.3 → 3.4.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/Component.js +1 -1
- package/components/Dot/index.css +8 -8
- package/components/Dot/index.js +1 -1
- package/components/Legends/index.css +8 -8
- package/components/Legends/index.js +1 -1
- package/components/Tick/index.css +4 -4
- package/components/Tick/index.js +1 -1
- package/components/TooltipContent/index.css +7 -7
- package/components/TooltipContent/index.js +1 -1
- package/esm/Component.js +1 -1
- package/esm/components/Dot/index.css +8 -8
- package/esm/components/Dot/index.js +1 -1
- package/esm/components/Legends/index.css +8 -8
- package/esm/components/Legends/index.js +1 -1
- package/esm/components/Tick/index.css +4 -4
- package/esm/components/Tick/index.js +1 -1
- package/esm/components/TooltipContent/index.css +7 -7
- package/esm/components/TooltipContent/index.js +1 -1
- package/esm/index.css +5 -5
- package/index.css +5 -5
- package/modern/Component.js +1 -1
- package/modern/components/Dot/index.css +8 -8
- package/modern/components/Dot/index.js +1 -1
- package/modern/components/Legends/index.css +8 -8
- package/modern/components/Legends/index.js +1 -1
- package/modern/components/Tick/index.css +4 -4
- package/modern/components/Tick/index.js +1 -1
- package/modern/components/TooltipContent/index.css +7 -7
- package/modern/components/TooltipContent/index.js +1 -1
- package/modern/index.css +5 -5
- package/moderncssm/Component.d.ts +8 -0
- package/moderncssm/Component.js +251 -0
- package/moderncssm/components/CustomizedLabel.d.ts +4 -0
- package/moderncssm/components/CustomizedLabel.js +11 -0
- package/moderncssm/components/Dot/index.d.ts +5 -0
- package/moderncssm/components/Dot/index.js +43 -0
- package/moderncssm/components/Dot/index.module.css +22 -0
- package/moderncssm/components/Legends/index.d.ts +14 -0
- package/moderncssm/components/Legends/index.js +36 -0
- package/moderncssm/components/Legends/index.module.css +36 -0
- package/moderncssm/components/LinearGradient.d.ts +5 -0
- package/moderncssm/components/LinearGradient.js +5 -0
- package/moderncssm/components/RectBar.d.ts +3 -0
- package/moderncssm/components/RectBar.js +27 -0
- package/moderncssm/components/Tick/index.d.ts +5 -0
- package/moderncssm/components/Tick/index.js +16 -0
- package/moderncssm/components/Tick/index.module.css +18 -0
- package/moderncssm/components/TooltipContent/index.d.ts +11 -0
- package/moderncssm/components/TooltipContent/index.js +26 -0
- package/moderncssm/components/TooltipContent/index.module.css +51 -0
- package/moderncssm/hooks/usePathBar/index.d.ts +14 -0
- package/moderncssm/hooks/usePathBar/index.js +37 -0
- package/moderncssm/hooks/usePathBar/utils/getRadius.d.ts +2 -0
- package/moderncssm/hooks/usePathBar/utils/getRadius.js +6 -0
- package/moderncssm/hooks/useSettings/index.d.ts +19 -0
- package/moderncssm/hooks/useSettings/index.js +43 -0
- package/moderncssm/hooks/useSettings/utils/setComposedChartsMargin.d.ts +12 -0
- package/moderncssm/hooks/useSettings/utils/setComposedChartsMargin.js +12 -0
- package/moderncssm/hooks/useSettings/utils/setDatas.d.ts +5 -0
- package/moderncssm/hooks/useSettings/utils/setDatas.js +32 -0
- package/moderncssm/hooks/useSettings/utils/setGradientCharts.d.ts +3 -0
- package/moderncssm/hooks/useSettings/utils/setGradientCharts.js +35 -0
- package/moderncssm/hooks/useSettings/utils/setLegendMargin.d.ts +4 -0
- package/moderncssm/hooks/useSettings/utils/setLegendMargin.js +14 -0
- package/moderncssm/hooks/useSettings/utils/sortByIndex.d.ts +3 -0
- package/moderncssm/hooks/useSettings/utils/sortByIndex.js +8 -0
- package/moderncssm/icons/Circle.d.ts +8 -0
- package/moderncssm/icons/Circle.js +6 -0
- package/moderncssm/icons/CircleLine.d.ts +8 -0
- package/moderncssm/icons/CircleLine.js +7 -0
- package/moderncssm/icons/FilledCircle.d.ts +8 -0
- package/moderncssm/icons/FilledCircle.js +10 -0
- package/moderncssm/icons/Point.d.ts +8 -0
- package/moderncssm/icons/Point.js +7 -0
- package/moderncssm/icons/StrokeCircle.d.ts +8 -0
- package/moderncssm/icons/StrokeCircle.js +6 -0
- package/moderncssm/index.d.ts +2 -0
- package/moderncssm/index.js +1 -0
- package/moderncssm/index.module.css +19 -0
- package/moderncssm/types/brush.types.d.ts +41 -0
- package/moderncssm/types/brush.types.js +1 -0
- package/moderncssm/types/cartesianGrid.types.d.ts +23 -0
- package/moderncssm/types/cartesianGrid.types.js +1 -0
- package/moderncssm/types/chart.types.d.ts +61 -0
- package/moderncssm/types/chart.types.js +1 -0
- package/moderncssm/types/composedChart.types.d.ts +33 -0
- package/moderncssm/types/composedChart.types.js +1 -0
- package/moderncssm/types/index.d.ts +14 -0
- package/moderncssm/types/index.js +1 -0
- package/moderncssm/types/labelList.types.d.ts +5 -0
- package/moderncssm/types/labelList.types.js +1 -0
- package/moderncssm/types/legend.types.d.ts +30 -0
- package/moderncssm/types/legend.types.js +1 -0
- package/moderncssm/types/options.types.d.ts +59 -0
- package/moderncssm/types/options.types.js +1 -0
- package/moderncssm/types/payload.types.d.ts +29 -0
- package/moderncssm/types/payload.types.js +1 -0
- package/moderncssm/types/responsiveContainer.types.d.ts +10 -0
- package/moderncssm/types/responsiveContainer.types.js +1 -0
- package/moderncssm/types/seria.types.d.ts +72 -0
- package/moderncssm/types/seria.types.js +1 -0
- package/moderncssm/types/tooltip.types.d.ts +70 -0
- package/moderncssm/types/tooltip.types.js +1 -0
- package/moderncssm/types/utils/axis.types.d.ts +68 -0
- package/moderncssm/types/utils/axis.types.js +1 -0
- package/moderncssm/types/utils/coordinates.types.d.ts +11 -0
- package/moderncssm/types/utils/coordinates.types.js +1 -0
- package/moderncssm/types/utils/data.types.d.ts +17 -0
- package/moderncssm/types/utils/data.types.js +1 -0
- package/moderncssm/types/utils/dot.types.d.ts +73 -0
- package/moderncssm/types/utils/dot.types.js +1 -0
- package/moderncssm/types/utils/gradient.types.d.ts +29 -0
- package/moderncssm/types/utils/gradient.types.js +1 -0
- package/moderncssm/types/utils/index.d.ts +7 -0
- package/moderncssm/types/utils/index.js +1 -0
- package/moderncssm/types/utils/tick.types.d.ts +19 -0
- package/moderncssm/types/utils/tick.types.js +1 -0
- package/moderncssm/types/xAxis.types.d.ts +16 -0
- package/moderncssm/types/xAxis.types.js +1 -0
- package/moderncssm/types/yAxis.types.d.ts +8 -0
- package/moderncssm/types/yAxis.types.js +1 -0
- package/package.json +4 -4
- package/src/components/Legends/index.module.css +1 -1
- package/src/components/Tick/index.module.css +1 -1
- package/src/components/TooltipContent/index.module.css +1 -1
- package/src/index.module.css +1 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { CoordinatesProps } from "./coordinates.types";
|
|
2
|
+
import { DataProps } from "./data.types";
|
|
3
|
+
interface DotSettingProps {
|
|
4
|
+
/**
|
|
5
|
+
* Значение media query.
|
|
6
|
+
*/
|
|
7
|
+
media?: number;
|
|
8
|
+
/**
|
|
9
|
+
* Значение маштаба при ховере.
|
|
10
|
+
*/
|
|
11
|
+
scale: number;
|
|
12
|
+
/**
|
|
13
|
+
* Начальный значения маштаба.
|
|
14
|
+
*/
|
|
15
|
+
initScale: number;
|
|
16
|
+
/**
|
|
17
|
+
* Ширина точки.
|
|
18
|
+
*/
|
|
19
|
+
width: number;
|
|
20
|
+
/**
|
|
21
|
+
* Высота точки.
|
|
22
|
+
*/
|
|
23
|
+
height: number;
|
|
24
|
+
}
|
|
25
|
+
interface ActiveDotProps {
|
|
26
|
+
/**
|
|
27
|
+
* Индекс предыдущей точки.
|
|
28
|
+
*/
|
|
29
|
+
prev: number | null;
|
|
30
|
+
/**
|
|
31
|
+
* Индекс активной точки.
|
|
32
|
+
*/
|
|
33
|
+
active: number | null;
|
|
34
|
+
}
|
|
35
|
+
interface PointProps extends CoordinatesProps {
|
|
36
|
+
value: string | number;
|
|
37
|
+
payload: DataProps;
|
|
38
|
+
}
|
|
39
|
+
interface DotProps {
|
|
40
|
+
/**
|
|
41
|
+
* Индекс активной точки на графике.
|
|
42
|
+
*/
|
|
43
|
+
activeDot: null | number;
|
|
44
|
+
/**
|
|
45
|
+
* Координата Х.
|
|
46
|
+
*/
|
|
47
|
+
cx: number;
|
|
48
|
+
/**
|
|
49
|
+
* Координата У.
|
|
50
|
+
*/
|
|
51
|
+
cy: number;
|
|
52
|
+
/**
|
|
53
|
+
* Ключ данных.
|
|
54
|
+
*/
|
|
55
|
+
dataKey: string;
|
|
56
|
+
/**
|
|
57
|
+
* Параметры точки.
|
|
58
|
+
*/
|
|
59
|
+
dotSettings?: DotSettingProps;
|
|
60
|
+
/**
|
|
61
|
+
* Индекс.
|
|
62
|
+
*/
|
|
63
|
+
index: number;
|
|
64
|
+
/**
|
|
65
|
+
* Цвет линии.
|
|
66
|
+
*/
|
|
67
|
+
stroke: string;
|
|
68
|
+
/**
|
|
69
|
+
* Значения по этим координатам.
|
|
70
|
+
*/
|
|
71
|
+
value: number;
|
|
72
|
+
}
|
|
73
|
+
export { DotSettingProps, ActiveDotProps, PointProps, DotProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
interface GradientProps {
|
|
2
|
+
/**
|
|
3
|
+
* Отступ.
|
|
4
|
+
*/
|
|
5
|
+
offset: number;
|
|
6
|
+
/**
|
|
7
|
+
* Цвет.
|
|
8
|
+
*/
|
|
9
|
+
stopColor: string;
|
|
10
|
+
/**
|
|
11
|
+
* Значение празрачности.
|
|
12
|
+
*/
|
|
13
|
+
stopOpacity: number;
|
|
14
|
+
}
|
|
15
|
+
interface LinearGradientProps {
|
|
16
|
+
/**
|
|
17
|
+
* Индефикатор графика.
|
|
18
|
+
*/
|
|
19
|
+
id: string;
|
|
20
|
+
/**
|
|
21
|
+
* Индефикатор градиента.
|
|
22
|
+
*/
|
|
23
|
+
gid: string;
|
|
24
|
+
/**
|
|
25
|
+
* Массив настроек градинта.
|
|
26
|
+
*/
|
|
27
|
+
points: GradientProps[];
|
|
28
|
+
}
|
|
29
|
+
export { GradientProps, LinearGradientProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { XAxisProps } from "../xAxis.types";
|
|
3
|
+
interface TickProps {
|
|
4
|
+
payload: {
|
|
5
|
+
coordinate: number;
|
|
6
|
+
value: number;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Функция форматирования
|
|
10
|
+
*/
|
|
11
|
+
tickFormatter: (value: number | string) => React.ReactText;
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
/**
|
|
15
|
+
* Настройки оси Х
|
|
16
|
+
*/
|
|
17
|
+
xAxis: XAxisProps;
|
|
18
|
+
}
|
|
19
|
+
export { TickProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AxisProps } from "./utils/axis.types";
|
|
2
|
+
interface XAxisProps extends AxisProps {
|
|
3
|
+
/**
|
|
4
|
+
* Ключ данных, отображаемых на оси.
|
|
5
|
+
*/
|
|
6
|
+
dataKey: string | number;
|
|
7
|
+
/**
|
|
8
|
+
* Ориентация оси
|
|
9
|
+
*/
|
|
10
|
+
orientation?: 'top' | 'bottom';
|
|
11
|
+
/**
|
|
12
|
+
* Тип деления оси
|
|
13
|
+
*/
|
|
14
|
+
tickType?: 'point';
|
|
15
|
+
}
|
|
16
|
+
export { XAxisProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-chart",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Chart component",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"directory": "dist"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@alfalab/core-components-typography": "^4.
|
|
14
|
+
"@alfalab/core-components-typography": "^4.10.0",
|
|
15
15
|
"classnames": "^2.3.1",
|
|
16
16
|
"recharts": "^2.1.2",
|
|
17
17
|
"tslib": "^2.4.0"
|
|
@@ -22,6 +22,6 @@
|
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
24
24
|
},
|
|
25
|
-
"themesVersion": "13.0
|
|
26
|
-
"varsVersion": "9.
|
|
25
|
+
"themesVersion": "13.1.0",
|
|
26
|
+
"varsVersion": "9.12.0"
|
|
27
27
|
}
|
package/src/index.module.css
CHANGED