@evergis/charts 3.1.6 → 3.1.8
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/LICENSE +2 -2
- package/README.md +10 -0
- package/dist/charts/BarChart/draw.d.ts +2 -2
- package/dist/charts/BarChart/drawGrid/index.d.ts +2 -2
- package/dist/charts/BarChart/drawGrid/types.d.ts +8 -8
- package/dist/charts/BarChart/drawLines/index.d.ts +13 -13
- package/dist/charts/BarChart/drawLines/types.d.ts +9 -9
- package/dist/charts/BarChart/drawTooltip/getLabel.d.ts +2 -2
- package/dist/charts/BarChart/drawTooltip/getLabelY.d.ts +2 -2
- package/dist/charts/BarChart/drawTooltip/index.d.ts +2 -2
- package/dist/charts/BarChart/drawTooltip/types.d.ts +12 -13
- package/dist/charts/BarChart/getBars/index.d.ts +3 -3
- package/dist/charts/BarChart/getBars/types.d.ts +6 -6
- package/dist/charts/BarChart/getDomain.d.ts +5 -5
- package/dist/charts/BarChart/hooks/useSelection.d.ts +2 -2
- package/dist/charts/BarChart/index.d.ts +3 -3
- package/dist/charts/BarChart/marshaling.d.ts +2 -2
- package/dist/charts/BarChart/resizeBarWidth/index.d.ts +2 -2
- package/dist/charts/BarChart/resizeBarWidth/types.d.ts +5 -5
- package/dist/charts/BarChart/styled.d.ts +37 -37
- package/dist/charts/BarChart/types.d.ts +148 -148
- package/dist/charts/BubbleChart/bubbleChartDefaultProps.d.ts +14 -14
- package/dist/charts/BubbleChart/draw.d.ts +2 -2
- package/dist/charts/BubbleChart/drawGrid/index.d.ts +2 -2
- package/dist/charts/BubbleChart/drawGrid/types.d.ts +8 -8
- package/dist/charts/BubbleChart/drawTooltip/index.d.ts +2 -2
- package/dist/charts/BubbleChart/drawTooltip/styled.d.ts +1 -1
- package/dist/charts/BubbleChart/drawTooltip/types.d.ts +4 -4
- package/dist/charts/BubbleChart/index.d.ts +3 -3
- package/dist/charts/BubbleChart/styled.d.ts +17 -17
- package/dist/charts/BubbleChart/types.d.ts +55 -55
- package/dist/charts/BubbleChart/unmount.d.ts +1 -1
- package/dist/charts/CalendarChart/draw.d.ts +2 -2
- package/dist/charts/CalendarChart/index.d.ts +3 -3
- package/dist/charts/CalendarChart/styled.d.ts +18 -18
- package/dist/charts/CalendarChart/types.d.ts +22 -22
- package/dist/charts/HorizontalBarChart/Bar/index.d.ts +3 -3
- package/dist/charts/HorizontalBarChart/Bar/styled.d.ts +1 -1
- package/dist/charts/HorizontalBarChart/Bar/types.d.ts +11 -11
- package/dist/charts/HorizontalBarChart/Tooltip/index.d.ts +3 -3
- package/dist/charts/HorizontalBarChart/Tooltip/types.d.ts +5 -5
- package/dist/charts/HorizontalBarChart/XScale/hooks/useScale.d.ts +2 -2
- package/dist/charts/HorizontalBarChart/XScale/index.d.ts +3 -3
- package/dist/charts/HorizontalBarChart/XScale/styled.d.ts +3 -3
- package/dist/charts/HorizontalBarChart/hooks/useMarshaling.d.ts +5 -5
- package/dist/charts/HorizontalBarChart/hooks/useStackWrapper.d.ts +12 -12
- package/dist/charts/HorizontalBarChart/hooks/useTooltip/index.d.ts +3 -3
- package/dist/charts/HorizontalBarChart/hooks/useTooltip/types.d.ts +6 -3
- package/dist/charts/HorizontalBarChart/index.d.ts +3 -3
- package/dist/charts/HorizontalBarChart/styled.d.ts +30 -30
- package/dist/charts/HorizontalBarChart/types.d.ts +41 -41
- package/dist/charts/LineChart/draw.d.ts +2 -2
- package/dist/charts/LineChart/drawGrid/index.d.ts +2 -2
- package/dist/charts/LineChart/drawGrid/types.d.ts +9 -9
- package/dist/charts/LineChart/drawLabel/index.d.ts +3 -3
- package/dist/charts/LineChart/drawLabel/styled.d.ts +2 -2
- package/dist/charts/LineChart/drawLabel/types.d.ts +7 -7
- package/dist/charts/LineChart/drawTooltip/index.d.ts +2 -2
- package/dist/charts/LineChart/drawTooltip/types.d.ts +9 -9
- package/dist/charts/LineChart/index.d.ts +3 -3
- package/dist/charts/LineChart/styled.d.ts +27 -27
- package/dist/charts/LineChart/types.d.ts +78 -78
- package/dist/charts/PieChart/draw.d.ts +2 -2
- package/dist/charts/PieChart/drawRadialLabels/helpers.d.ts +3 -3
- package/dist/charts/PieChart/drawRadialLabels/index.d.ts +2 -2
- package/dist/charts/PieChart/drawRadialLabels/types.d.ts +11 -11
- package/dist/charts/PieChart/drawTooltips/index.d.ts +2 -2
- package/dist/charts/PieChart/drawTooltips/types.d.ts +8 -8
- package/dist/charts/PieChart/index.d.ts +3 -3
- package/dist/charts/PieChart/styled.d.ts +18 -18
- package/dist/charts/PieChart/types.d.ts +54 -54
- package/dist/charts/RadarChart/draw.d.ts +2 -2
- package/dist/charts/RadarChart/drawRadialLabels/index.d.ts +2 -2
- package/dist/charts/RadarChart/drawRadialLabels/styled.d.ts +2 -2
- package/dist/charts/RadarChart/drawRadialLabels/types.d.ts +25 -25
- package/dist/charts/RadarChart/helpers.d.ts +2 -2
- package/dist/charts/RadarChart/index.d.ts +3 -3
- package/dist/charts/RadarChart/styled.d.ts +13 -13
- package/dist/charts/RadarChart/types.d.ts +42 -42
- package/dist/charts.esm.js +3327 -3297
- package/dist/charts.esm.js.map +1 -1
- package/dist/common/components/SwipeScroll/animate.d.ts +6 -6
- package/dist/common/components/SwipeScroll/hooks/useSwipe.d.ts +2 -2
- package/dist/common/components/SwipeScroll/index.d.ts +3 -3
- package/dist/common/components/SwipeScroll/styled.d.ts +1 -1
- package/dist/common/components/SwipeScroll/types.d.ts +8 -8
- package/dist/common/components/Wrapper.d.ts +1 -1
- package/dist/common/components/labels/index.d.ts +7 -7
- package/dist/common/components/labels/types.d.ts +6 -6
- package/dist/common/components/tooltips/index.d.ts +14 -14
- package/dist/common/types/interpolator.d.ts +1 -1
- package/dist/common/types/margin.d.ts +6 -6
- package/dist/helpers/appendSvg.d.ts +2 -2
- package/dist/helpers/common.d.ts +2 -2
- package/dist/helpers/computeDimensions.d.ts +2 -2
- package/dist/helpers/getLegend/index.d.ts +19 -19
- package/dist/helpers/getLegend/types.d.ts +15 -15
- package/dist/helpers/getTextWidth.d.ts +1 -1
- package/dist/helpers/index.d.ts +1 -1
- package/dist/helpers/math.d.ts +2 -2
- package/dist/helpers/stackedData.d.ts +2 -2
- package/dist/helpers/textAlignCenter.d.ts +2 -2
- package/dist/helpers/throttle.d.ts +1 -1
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/useNode.d.ts +2 -2
- package/dist/hooks/useResize.d.ts +1 -1
- package/dist/index.d.ts +26 -26
- package/dist/index.js +3553 -5
- package/dist/index.js.map +1 -0
- package/package.json +29 -40
- package/dist/charts.cjs.development.js +0 -3513
- package/dist/charts.cjs.development.js.map +0 -1
- package/dist/charts.cjs.production.min.js +0 -2
- package/dist/charts.cjs.production.min.js.map +0 -1
- package/dist/jest.config.d.ts +0 -14
- package/dist/stories/Bar/Examples.stories.d.ts +0 -23
- package/dist/stories/Bar/HorizontalBar.stories.d.ts +0 -25
- package/dist/stories/Bar/Statistics.stories.d.ts +0 -7
- package/dist/stories/Bar/VerticalBar.stories.d.ts +0 -41
- package/dist/stories/Bubble/Bubble.stories.d.ts +0 -23
- package/dist/stories/Bubble/Examples.stories.d.ts +0 -4
- package/dist/stories/Bubble/examples/VEB/InvestBubble.d.ts +0 -5
- package/dist/stories/Bubble/examples/VEB/hooks/useCustomize.d.ts +0 -3
- package/dist/stories/Bubble/examples/VEB/hooks/useRenderTooltip/index.d.ts +0 -4
- package/dist/stories/Bubble/examples/VEB/hooks/useRenderTooltip/styled.d.ts +0 -8
- package/dist/stories/Bubble/examples/VEB/styled.d.ts +0 -1
- package/dist/stories/Calendar/Calendar.stories.d.ts +0 -23
- package/dist/stories/Calendar/ColorScheme.stories.d.ts +0 -7
- package/dist/stories/Calendar/Examples.stories.d.ts +0 -11
- package/dist/stories/Calendar/Legend.stories.d.ts +0 -30
- package/dist/stories/Common/SwipeScroll/SwipeScroll.stories.d.ts +0 -13
- package/dist/stories/Common/SwipeScroll/hooks/useSwipe.d.ts +0 -1
- package/dist/stories/Line/Examples.stories.d.ts +0 -7
- package/dist/stories/Line/Line.stories.d.ts +0 -48
- package/dist/stories/Line/examples/Beeline.d.ts +0 -5
- package/dist/stories/Line/examples/GeoVeb.d.ts +0 -5
- package/dist/stories/Line/examples/GeoVebInterval/data.d.ts +0 -9
- package/dist/stories/Line/examples/GeoVebInterval/index.d.ts +0 -5
- package/dist/stories/Line/examples/GeoVebInterval/styled.d.ts +0 -4
- package/dist/stories/Line/examples/Msp.d.ts +0 -5
- package/dist/stories/Pie/ColorScheme.stories.d.ts +0 -7
- package/dist/stories/Pie/Examples.stories.d.ts +0 -7
- package/dist/stories/Pie/Pie.stories.d.ts +0 -47
- package/dist/stories/Radar/Chart.stories.d.ts +0 -38
- package/dist/stories/Radar/Github.stories.d.ts +0 -7
- package/dist/stories/Radar/Gradient.stories.d.ts +0 -7
- package/dist/stories/Radar/Veb.stories.d.ts +0 -7
- package/dist/stories/Sankey/Examples.stories.d.ts +0 -4
- package/dist/stories/Sankey/examples/RelatedIndustries/data.d.ts +0 -2
- package/dist/stories/Sankey/examples/RelatedIndustries/index.d.ts +0 -5
- package/dist/stories/__internal__/colors.d.ts +0 -40
- package/dist/stories/__internal__/components/BeelineLineChart/hooks/useCustomize.d.ts +0 -11
- package/dist/stories/__internal__/components/BeelineLineChart/hooks/useLineRenderTooltip/index.d.ts +0 -5
- package/dist/stories/__internal__/components/BeelineLineChart/hooks/useLineRenderTooltip/styled.d.ts +0 -5
- package/dist/stories/__internal__/components/BeelineLineChart/index.d.ts +0 -3
- package/dist/stories/__internal__/components/BeelineLineChart/styled.d.ts +0 -3
- package/dist/stories/__internal__/components/BeelineRangeLineChart/Range/index.d.ts +0 -7
- package/dist/stories/__internal__/components/BeelineRangeLineChart/Range/styled.d.ts +0 -3
- package/dist/stories/__internal__/components/BeelineRangeLineChart/hooks/useChange.d.ts +0 -8
- package/dist/stories/__internal__/components/BeelineRangeLineChart/index.d.ts +0 -2
- package/dist/stories/__internal__/components/BeelineRangeLineChart/styled.d.ts +0 -4
- package/dist/stories/__internal__/components/BeelineTrafficHorizontalBarChart/data.d.ts +0 -5
- package/dist/stories/__internal__/components/BeelineTrafficHorizontalBarChart/hooks/useRenderDataTable.d.ts +0 -2
- package/dist/stories/__internal__/components/BeelineTrafficHorizontalBarChart/index.d.ts +0 -2
- package/dist/stories/__internal__/components/BeelineTrafficHorizontalBarChart/styled.d.ts +0 -3
- package/dist/stories/__internal__/components/Divider.d.ts +0 -6
- package/dist/stories/__internal__/components/GeoVebBarCharts.d.ts +0 -2
- package/dist/stories/__internal__/components/GeoVebHorizontalBarCharts/data.d.ts +0 -47
- package/dist/stories/__internal__/components/GeoVebHorizontalBarCharts/hooks/useRenderTooltip.d.ts +0 -3
- package/dist/stories/__internal__/components/GeoVebHorizontalBarCharts/hooks/useSimpleRenderTooltip.d.ts +0 -3
- package/dist/stories/__internal__/components/GeoVebHorizontalBarCharts/index.d.ts +0 -4
- package/dist/stories/__internal__/components/GeoVebHorizontalBarCharts/styled.d.ts +0 -4
- package/dist/stories/__internal__/components/GeoYearsBarChart/index.d.ts +0 -2
- package/dist/stories/__internal__/components/GeoYearsBarChart/styled.d.ts +0 -4
- package/dist/stories/__internal__/components/MixedTableChart/Chart/index.d.ts +0 -3
- package/dist/stories/__internal__/components/MixedTableChart/Chart/styled.d.ts +0 -2
- package/dist/stories/__internal__/components/MixedTableChart/index.d.ts +0 -3
- package/dist/stories/__internal__/components/MixedTableChart/styled.d.ts +0 -5
- package/dist/stories/__internal__/components/MixedTableChart/types.d.ts +0 -21
- package/dist/stories/__internal__/components/MspDashboardChart/hooks/useAnimation.d.ts +0 -5
- package/dist/stories/__internal__/components/MspDashboardChart/index.d.ts +0 -3
- package/dist/stories/__internal__/components/MspDashboardChart/styled.d.ts +0 -5
- package/dist/stories/__internal__/components/MspPromSupplyBarChart/hooks/useAnimationAreas.d.ts +0 -6
- package/dist/stories/__internal__/components/MspPromSupplyBarChart/hooks/useAnimationBars.d.ts +0 -5
- package/dist/stories/__internal__/components/MspPromSupplyBarChart/hooks/useCustomize.d.ts +0 -4
- package/dist/stories/__internal__/components/MspPromSupplyBarChart/hooks/useData.d.ts +0 -8
- package/dist/stories/__internal__/components/MspPromSupplyBarChart/hooks/useMarshalledMap.d.ts +0 -1
- package/dist/stories/__internal__/components/MspPromSupplyBarChart/hooks/useRenderTooltip.d.ts +0 -2
- package/dist/stories/__internal__/components/MspPromSupplyBarChart/index.d.ts +0 -9
- package/dist/stories/__internal__/components/MspPromSupplyBarChart/styled.d.ts +0 -22
- package/dist/stories/__internal__/components/SankeyTriChart/Groups/getCSSProperties.d.ts +0 -4
- package/dist/stories/__internal__/components/SankeyTriChart/Groups/helpers.d.ts +0 -1
- package/dist/stories/__internal__/components/SankeyTriChart/Groups/index.d.ts +0 -5
- package/dist/stories/__internal__/components/SankeyTriChart/Groups/styled.d.ts +0 -1
- package/dist/stories/__internal__/components/SankeyTriChart/ItemContent/getCSSProperties.d.ts +0 -3
- package/dist/stories/__internal__/components/SankeyTriChart/ItemContent/index.d.ts +0 -5
- package/dist/stories/__internal__/components/SankeyTriChart/ItemContent/styled.d.ts +0 -8
- package/dist/stories/__internal__/components/SankeyTriChart/draw.d.ts +0 -2
- package/dist/stories/__internal__/components/SankeyTriChart/helpers.d.ts +0 -9
- package/dist/stories/__internal__/components/SankeyTriChart/index.d.ts +0 -10
- package/dist/stories/__internal__/components/SankeyTriChart/marshaling.d.ts +0 -6
- package/dist/stories/__internal__/components/SankeyTriChart/styled.d.ts +0 -1
- package/dist/stories/__internal__/components/SankeyTriChart/types.d.ts +0 -40
- package/dist/stories/__internal__/components/SberBarMixChart/colors.d.ts +0 -3
- package/dist/stories/__internal__/components/SberBarMixChart/data.d.ts +0 -8
- package/dist/stories/__internal__/components/SberBarMixChart/hooks/styled.d.ts +0 -3
- package/dist/stories/__internal__/components/SberBarMixChart/hooks/useRenderTooltip.d.ts +0 -2
- package/dist/stories/__internal__/components/SberBarMixChart/index.d.ts +0 -2
- package/dist/stories/__internal__/components/SberBarMixChart/styled.d.ts +0 -1
- package/dist/stories/__internal__/components/StatisticsBarCharts/NumbersStatistics.d.ts +0 -2
- package/dist/stories/__internal__/components/StatisticsBarCharts/StringsStatistics.d.ts +0 -2
- package/dist/stories/__internal__/components/StatisticsBarCharts/index.d.ts +0 -2
- package/dist/stories/__internal__/components/StatisticsBarCharts/styled.d.ts +0 -1
- package/dist/stories/__internal__/components/VebEstimationBarChart/data.d.ts +0 -38
- package/dist/stories/__internal__/components/VebEstimationBarChart/hooks/useCustomize.d.ts +0 -5
- package/dist/stories/__internal__/components/VebEstimationBarChart/hooks/useDrawBars.d.ts +0 -4
- package/dist/stories/__internal__/components/VebEstimationBarChart/hooks/useRenderLabel/index.d.ts +0 -9
- package/dist/stories/__internal__/components/VebEstimationBarChart/hooks/useRenderLabel/styled.d.ts +0 -1
- package/dist/stories/__internal__/components/VebEstimationBarChart/hooks/useRenderTooltip/index.d.ts +0 -8
- package/dist/stories/__internal__/components/VebEstimationBarChart/hooks/useRenderTooltip/styled.d.ts +0 -13
- package/dist/stories/__internal__/components/VebEstimationBarChart/index.d.ts +0 -3
- package/dist/stories/__internal__/components/VebEstimationBarChart/styled.d.ts +0 -2
- package/dist/stories/__internal__/components/VebFilterBarChart/index.d.ts +0 -2
- package/dist/stories/__internal__/components/VebGroupHorizontalBarChart/hooks/useRenderSum/index.d.ts +0 -3
- package/dist/stories/__internal__/components/VebGroupHorizontalBarChart/hooks/useRenderSum/styled.d.ts +0 -1
- package/dist/stories/__internal__/components/VebGroupHorizontalBarChart/hooks/useRenderTooltip/index.d.ts +0 -1
- package/dist/stories/__internal__/components/VebGroupHorizontalBarChart/hooks/useRenderTooltip/styled.d.ts +0 -5
- package/dist/stories/__internal__/components/VebGroupHorizontalBarChart/index.d.ts +0 -3
- package/dist/stories/__internal__/components/VebGroupHorizontalBarChart/styled.d.ts +0 -5
- package/dist/stories/__internal__/components/VebGroupHorizontalBarChart/types.d.ts +0 -11
- package/dist/stories/__internal__/curves.d.ts +0 -8
- package/dist/stories/__internal__/data/msp.d.ts +0 -14
- package/dist/stories/__internal__/data/mspDashboard.d.ts +0 -1
- package/dist/stories/__internal__/data/mspPromSupply.d.ts +0 -11
- package/dist/stories/__internal__/data/population.d.ts +0 -4
- package/dist/stories/__internal__/data/veb.d.ts +0 -31
- package/dist/stories/__internal__/helpers/Path.d.ts +0 -10
- package/dist/stories/__internal__/helpers/Vector.d.ts +0 -9
- package/dist/stories/__internal__/helpers/animation.d.ts +0 -15
- package/dist/stories/__internal__/helpers/hexToRGB.d.ts +0 -1
- package/dist/stories/__internal__/helpers/random.d.ts +0 -1
- package/dist/stories/__internal__/helpers/randomData.d.ts +0 -14
- package/dist/stories/__internal__/helpers/randomHorizontalBarData.d.ts +0 -5
- package/dist/stories/__internal__/helpers/randomIntervalData.d.ts +0 -11
- package/dist/stories/__internal__/helpers/randomLineData.d.ts +0 -8
- package/dist/stories/__internal__/helpers/randomText.d.ts +0 -1
- package/dist/stories/__internal__/helpers/roundedRect.d.ts +0 -10
- package/dist/stories/__internal__/helpers/shuffleArray.d.ts +0 -1
- package/dist/stories/__internal__/hooks/useBarData.d.ts +0 -10
- package/dist/stories/__internal__/hooks/useLegend.d.ts +0 -1
- package/dist/stories/__internal__/hooks/useMinMaxValue.d.ts +0 -4
- package/dist/stories/__internal__/interpolates.d.ts +0 -23
- package/dist/storybook-static/1.05dfd83c.iframe.bundle.d.ts +0 -0
- package/dist/storybook-static/189.8c077122866758d3cf20.manager.bundle.d.ts +0 -0
- package/dist/storybook-static/190.58050c9beb344d4cefd9.manager.bundle.d.ts +0 -2
- package/dist/storybook-static/191.b202c06c72968435b80b.manager.bundle.d.ts +0 -0
- package/dist/storybook-static/192.83987c5b15f8a80893c5.manager.bundle.d.ts +0 -0
- package/dist/storybook-static/193.8a12aa992b466e778018.manager.bundle.d.ts +0 -2
- package/dist/storybook-static/2.0231c7b6.iframe.bundle.d.ts +0 -0
- package/dist/storybook-static/6.6185fd0d.iframe.bundle.d.ts +0 -0
- package/dist/storybook-static/7.0ede09e9.iframe.bundle.d.ts +0 -0
- package/dist/storybook-static/8.6f0230ef.iframe.bundle.d.ts +0 -2
- package/dist/storybook-static/main.6b7543c14993fcfcab71.manager.bundle.d.ts +0 -2
- package/dist/storybook-static/main.724b5942.iframe.bundle.d.ts +0 -9
- package/dist/storybook-static/runtime~main.92273705.iframe.bundle.d.ts +0 -1
- package/dist/storybook-static/runtime~main.c89e55a461c11ef29193.manager.bundle.d.ts +0 -1
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2025 Everpoint
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @evergis/charts
|
|
2
2
|
|
|
3
|
+
Библиотека графиков.
|
|
4
|
+
|
|
5
|
+
В процессе разработки используем `Storybook`.
|
|
6
|
+
|
|
7
|
+
```shell
|
|
8
|
+
$ yarn storybook
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Создав новый компонент, обязательно добавляем примеры его использования в `stories`.
|
|
12
|
+
|
|
3
13
|
## Важно
|
|
4
14
|
|
|
5
15
|
- Стилизовать графики необходимо импортируя названия классов из библиотеки.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BarChartProps } from './types';
|
|
2
|
-
export declare const draw: (node: HTMLElement | null, props: BarChartProps) => void;
|
|
1
|
+
import { BarChartProps } from './types';
|
|
2
|
+
export declare const draw: (node: HTMLElement | null, props: BarChartProps) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DrawGridProps } from './types';
|
|
2
|
-
export declare const drawGrid: ({ svg, yScale, xScale, yTicksCount, drawGridX, drawGridY, }: DrawGridProps) => void;
|
|
1
|
+
import { DrawGridProps } from './types';
|
|
2
|
+
export declare const drawGrid: ({ svg, yScale, xScale, yTicksCount, drawGridX, drawGridY, }: DrawGridProps) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
export
|
|
4
|
-
svg: d3.Selection<SVGSVGElement, unknown, null, undefined>;
|
|
5
|
-
yScale: d3.ScaleLinear<number, number>;
|
|
6
|
-
xScale: d3.ScaleBand<string>;
|
|
7
|
-
yTicksCount: number;
|
|
8
|
-
} & Pick<BarChartProps, 'drawGridX' | 'drawGridY'>;
|
|
1
|
+
import { BarChartProps } from '../types';
|
|
2
|
+
import * as d3 from 'd3';
|
|
3
|
+
export type DrawGridProps = {
|
|
4
|
+
svg: d3.Selection<SVGSVGElement, unknown, null, undefined>;
|
|
5
|
+
yScale: d3.ScaleLinear<number, number>;
|
|
6
|
+
xScale: d3.ScaleBand<string>;
|
|
7
|
+
yTicksCount: number;
|
|
8
|
+
} & Pick<BarChartProps, 'drawGridX' | 'drawGridY'>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
export declare const barChartLinesClassNames: {
|
|
4
|
-
barChartLinesGlobal: string;
|
|
5
|
-
barChartLine: string;
|
|
6
|
-
barChartAreasGlobal: string;
|
|
7
|
-
barChartArea: string;
|
|
8
|
-
};
|
|
9
|
-
export declare const drawLines: ({ svg, lineData, min, yScale, xScale, curve, stackedLine, }: DrawLinesProps) => {
|
|
10
|
-
areasSelection: any;
|
|
11
|
-
linesSelection: any;
|
|
12
|
-
area: d3.Area<[number, number]>;
|
|
13
|
-
};
|
|
1
|
+
import { DrawLinesProps } from './types';
|
|
2
|
+
import * as d3 from 'd3';
|
|
3
|
+
export declare const barChartLinesClassNames: {
|
|
4
|
+
barChartLinesGlobal: string;
|
|
5
|
+
barChartLine: string;
|
|
6
|
+
barChartAreasGlobal: string;
|
|
7
|
+
barChartArea: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const drawLines: ({ svg, lineData, min, yScale, xScale, curve, stackedLine, }: DrawLinesProps) => {
|
|
10
|
+
areasSelection: any;
|
|
11
|
+
linesSelection: any;
|
|
12
|
+
area: d3.Area<[number, number]>;
|
|
13
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
export
|
|
4
|
-
min: number;
|
|
5
|
-
svg: d3.Selection<SVGSVGElement, unknown, null, undefined>;
|
|
6
|
-
yScale: d3.ScaleLinear<number, number>;
|
|
7
|
-
xScale: d3.ScaleBand<string>;
|
|
8
|
-
lineData: BarChartLineData[];
|
|
9
|
-
} & Pick<BarChartProps, 'stackedLine' | 'curve'>;
|
|
1
|
+
import { BarChartProps, BarChartLineData } from '../types';
|
|
2
|
+
import * as d3 from 'd3';
|
|
3
|
+
export type DrawLinesProps = {
|
|
4
|
+
min: number;
|
|
5
|
+
svg: d3.Selection<SVGSVGElement, unknown, null, undefined>;
|
|
6
|
+
yScale: d3.ScaleLinear<number, number>;
|
|
7
|
+
xScale: d3.ScaleBand<string>;
|
|
8
|
+
lineData: BarChartLineData[];
|
|
9
|
+
} & Pick<BarChartProps, 'stackedLine' | 'curve'>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BarChartLabelPosition } from '../types';
|
|
2
|
-
export declare const getLabel: (labelPosition: BarChartLabelPosition) => import(
|
|
1
|
+
import { BarChartLabelPosition } from '../types';
|
|
2
|
+
export declare const getLabel: (labelPosition: BarChartLabelPosition) => import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BarChartLabelPosition, BarChartMarshalledGroup } from '../types';
|
|
2
|
-
export declare const getLabelY: (labelPosition: BarChartLabelPosition, y2: number, item: BarChartMarshalledGroup) => number;
|
|
1
|
+
import { BarChartLabelPosition, BarChartMarshalledGroup } from '../types';
|
|
2
|
+
export declare const getLabelY: (labelPosition: BarChartLabelPosition, y2: number, item: BarChartMarshalledGroup) => number;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DrawTooltipProps } from './types';
|
|
2
|
-
export declare const drawTooltip: ({ svg, node, data, marshalledData, xScale, yScale, renderTooltip, labelPosition, marginTop, renderLabel, barWidth, barPadding, dynamicTooltipEnable, hideTooltipGroupName, tooltipY, tooltipBind, lineData, formatTooltipValue, formatTooltipName, tooltipYDomain, setTooltipPosition, onLabelItem, isBarTooltip, bars, tooltipRoot, tooltipClassName, onBarClick, onBarHover, }: DrawTooltipProps) => void;
|
|
1
|
+
import { DrawTooltipProps } from './types';
|
|
2
|
+
export declare const drawTooltip: ({ svg, node, data, marshalledData, xScale, yScale, renderTooltip, labelPosition, marginTop, renderLabel, barWidth, barPadding, dynamicTooltipEnable, hideTooltipGroupName, tooltipY, tooltipBind, lineData, formatTooltipValue, formatTooltipName, tooltipYDomain, setTooltipPosition, onLabelItem, isBarTooltip, bars, tooltipRoot, tooltipClassName, onBarClick, onBarHover, }: DrawTooltipProps) => void;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} & Pick<BarChartProps, 'renderTooltip' | 'labelPosition' | 'renderLabel' | 'dynamicTooltipEnable' | 'hideTooltipGroupName' | 'tooltipY' | 'tooltipBind' | 'lineData' | 'formatTooltipValue' | 'formatTooltipName' | 'tooltipYDomain' | 'data' | 'barPadding' | 'setTooltipPosition' | 'onLabelItem' | 'isBarTooltip' | 'tooltipRoot' | 'tooltipClassName' | 'onBarClick' | 'onBarHover'>;
|
|
1
|
+
import { BarChartMarshalledGroup, BarChartProps } from '../types';
|
|
2
|
+
import * as d3 from 'd3';
|
|
3
|
+
export type DrawTooltipProps = {
|
|
4
|
+
svg: d3.Selection<SVGSVGElement, unknown, null, undefined>;
|
|
5
|
+
node: HTMLElement;
|
|
6
|
+
yScale: d3.ScaleLinear<number, number>;
|
|
7
|
+
xScale: d3.ScaleBand<string>;
|
|
8
|
+
marshalledData: BarChartMarshalledGroup[][];
|
|
9
|
+
marginTop: number;
|
|
10
|
+
barWidth: number;
|
|
11
|
+
bars: d3.Selection<SVGGElement, BarChartMarshalledGroup[], SVGGElement, unknown>;
|
|
12
|
+
} & Pick<BarChartProps, 'renderTooltip' | 'labelPosition' | 'renderLabel' | 'dynamicTooltipEnable' | 'hideTooltipGroupName' | 'tooltipY' | 'tooltipBind' | 'lineData' | 'formatTooltipValue' | 'formatTooltipName' | 'tooltipYDomain' | 'data' | 'barPadding' | 'setTooltipPosition' | 'onLabelItem' | 'isBarTooltip' | 'tooltipRoot' | 'tooltipClassName' | 'onBarClick' | 'onBarHover'>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { BarChartMarshalledGroup } from '../types';
|
|
2
|
-
import { GetBarsProps } from './types';
|
|
3
|
-
export declare const getBars: ({ groups, barWidth }: GetBarsProps) => import(
|
|
1
|
+
import { BarChartMarshalledGroup } from '../types';
|
|
2
|
+
import { GetBarsProps } from './types';
|
|
3
|
+
export declare const getBars: ({ groups, barWidth }: GetBarsProps) => import('d3-selection').Selection<SVGRectElement | import('d3-selection').BaseType, BarChartMarshalledGroup, SVGGElement, BarChartMarshalledGroup[]>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
export
|
|
4
|
-
groups: d3.Selection<SVGGElement, BarChartMarshalledGroup[], SVGGElement, unknown>;
|
|
5
|
-
barWidth: number;
|
|
6
|
-
};
|
|
1
|
+
import { BarChartMarshalledGroup } from '../types';
|
|
2
|
+
import * as d3 from 'd3';
|
|
3
|
+
export type GetBarsProps = {
|
|
4
|
+
groups: d3.Selection<SVGGElement, BarChartMarshalledGroup[], SVGGElement, unknown>;
|
|
5
|
+
barWidth: number;
|
|
6
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BarChartProps } from './types';
|
|
2
|
-
export declare const getDomain: ({ data, minDomainValue, maxDomainValue, }: Pick<BarChartProps,
|
|
3
|
-
min: number;
|
|
4
|
-
max: number;
|
|
5
|
-
};
|
|
1
|
+
import { BarChartProps } from './types';
|
|
2
|
+
export declare const getDomain: ({ data, minDomainValue, maxDomainValue, }: Pick<BarChartProps, "data" | "minDomainValue" | "maxDomainValue">) => {
|
|
3
|
+
min: number;
|
|
4
|
+
max: number;
|
|
5
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BarChartProps } from
|
|
2
|
-
export declare const useSelection: (node: HTMLElement | null, props: BarChartProps) => void;
|
|
1
|
+
import { BarChartProps } from '../types';
|
|
2
|
+
export declare const useSelection: (node: HTMLElement | null, props: BarChartProps) => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FC } from
|
|
2
|
-
import { BarChartProps } from
|
|
3
|
-
export declare const BarChart: FC<BarChartProps>;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { BarChartProps } from './types';
|
|
3
|
+
export declare const BarChart: FC<BarChartProps>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BarChartMarshalledGroup, BarChartMarshaling } from './types';
|
|
2
|
-
export declare const marshaling: ({ data, yScale, xScale, barWidth, barPadding, colors, marginTop, }: BarChartMarshaling) => BarChartMarshalledGroup[][];
|
|
1
|
+
import { BarChartMarshalledGroup, BarChartMarshaling } from './types';
|
|
2
|
+
export declare const marshaling: ({ data, yScale, xScale, barWidth, barPadding, colors, marginTop, }: BarChartMarshaling) => BarChartMarshalledGroup[][];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ResizeBarWidthProps } from './types';
|
|
2
|
-
export declare const resizeBarWidth: ({ data, range, barWidth, barPadding, sectionPadding, }: ResizeBarWidthProps) => number;
|
|
1
|
+
import { ResizeBarWidthProps } from './types';
|
|
2
|
+
export declare const resizeBarWidth: ({ data, range, barWidth, barPadding, sectionPadding, }: ResizeBarWidthProps) => number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BarChartProps } from '../types';
|
|
2
|
-
export
|
|
3
|
-
range: number[];
|
|
4
|
-
barWidth: number;
|
|
5
|
-
} & Pick<BarChartProps, 'data' | 'barPadding' | 'sectionPadding'>;
|
|
1
|
+
import { BarChartProps } from '../types';
|
|
2
|
+
export type ResizeBarWidthProps = {
|
|
3
|
+
range: number[];
|
|
4
|
+
barWidth: number;
|
|
5
|
+
} & Pick<BarChartProps, 'data' | 'barPadding' | 'sectionPadding'>;
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { JSXElementConstructor } from
|
|
2
|
-
export declare const barChartClassNames: {
|
|
3
|
-
barChartLinesGlobal: string;
|
|
4
|
-
barChartLine: string;
|
|
5
|
-
barChartAreasGlobal: string;
|
|
6
|
-
barChartArea: string;
|
|
7
|
-
barChartLabelContainer: string;
|
|
8
|
-
barChartLabelFlex: string;
|
|
9
|
-
barChartLabel: string;
|
|
10
|
-
barChartMouseRect: string;
|
|
11
|
-
barChartMouseContainer: string;
|
|
12
|
-
barChartTooltipFlex: string;
|
|
13
|
-
barChartMouseTooltip: string;
|
|
14
|
-
barChartTooltip: string;
|
|
15
|
-
barChartTooltipItem: string;
|
|
16
|
-
barChartTooltipColFlex: string;
|
|
17
|
-
barChartTooltipGroupName: string;
|
|
18
|
-
barChartColorBox: string;
|
|
19
|
-
barChartColorLine: string;
|
|
20
|
-
barChartTooltipName: string;
|
|
21
|
-
barChartTooltipValue: string;
|
|
22
|
-
barChartBarGlobal: string;
|
|
23
|
-
barChartYScaleGlobal: string;
|
|
24
|
-
barChartYAxis: string;
|
|
25
|
-
barChartXAxis: string;
|
|
26
|
-
barChartYAxisZeroTick: string;
|
|
27
|
-
barChartGridGlobal: string;
|
|
28
|
-
barChartGridLineX: string;
|
|
29
|
-
barChartGridLineXZero: string;
|
|
30
|
-
barChartGridLineYZero: string;
|
|
31
|
-
barChartGridLineY: string;
|
|
32
|
-
barChartSelection: string;
|
|
33
|
-
};
|
|
34
|
-
export declare const SvgWrapper: import(
|
|
35
|
-
selectable?: boolean;
|
|
36
|
-
}, never>;
|
|
37
|
-
export declare const TooltipStyles: JSXElementConstructor<any>;
|
|
1
|
+
import { JSXElementConstructor } from 'react';
|
|
2
|
+
export declare const barChartClassNames: {
|
|
3
|
+
barChartLinesGlobal: string;
|
|
4
|
+
barChartLine: string;
|
|
5
|
+
barChartAreasGlobal: string;
|
|
6
|
+
barChartArea: string;
|
|
7
|
+
barChartLabelContainer: string;
|
|
8
|
+
barChartLabelFlex: string;
|
|
9
|
+
barChartLabel: string;
|
|
10
|
+
barChartMouseRect: string;
|
|
11
|
+
barChartMouseContainer: string;
|
|
12
|
+
barChartTooltipFlex: string;
|
|
13
|
+
barChartMouseTooltip: string;
|
|
14
|
+
barChartTooltip: string;
|
|
15
|
+
barChartTooltipItem: string;
|
|
16
|
+
barChartTooltipColFlex: string;
|
|
17
|
+
barChartTooltipGroupName: string;
|
|
18
|
+
barChartColorBox: string;
|
|
19
|
+
barChartColorLine: string;
|
|
20
|
+
barChartTooltipName: string;
|
|
21
|
+
barChartTooltipValue: string;
|
|
22
|
+
barChartBarGlobal: string;
|
|
23
|
+
barChartYScaleGlobal: string;
|
|
24
|
+
barChartYAxis: string;
|
|
25
|
+
barChartXAxis: string;
|
|
26
|
+
barChartYAxisZeroTick: string;
|
|
27
|
+
barChartGridGlobal: string;
|
|
28
|
+
barChartGridLineX: string;
|
|
29
|
+
barChartGridLineXZero: string;
|
|
30
|
+
barChartGridLineYZero: string;
|
|
31
|
+
barChartGridLineY: string;
|
|
32
|
+
barChartSelection: string;
|
|
33
|
+
};
|
|
34
|
+
export declare const SvgWrapper: import('styled-components').StyledComponent<"div", any, {
|
|
35
|
+
selectable?: boolean;
|
|
36
|
+
}, never>;
|
|
37
|
+
export declare const TooltipStyles: JSXElementConstructor<any>;
|
|
@@ -1,148 +1,148 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
export
|
|
5
|
-
groupName: string | number;
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
} | Record<string, {
|
|
8
|
-
[key: string]: number;
|
|
9
|
-
}>;
|
|
10
|
-
export
|
|
11
|
-
[key: string]: string;
|
|
12
|
-
};
|
|
13
|
-
export
|
|
14
|
-
[key: string]: string;
|
|
15
|
-
};
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
tooltip: d3.Selection<HTMLDivElement, unknown, null, undefined>;
|
|
19
|
-
left: number;
|
|
20
|
-
top: number;
|
|
21
|
-
svgWidth: number;
|
|
22
|
-
}) => void;
|
|
23
|
-
export interface BarChartMarker {
|
|
24
|
-
label: string;
|
|
25
|
-
value: number;
|
|
26
|
-
color?: string;
|
|
27
|
-
lineColor?: string;
|
|
28
|
-
className?: string;
|
|
29
|
-
horizontal?: boolean;
|
|
30
|
-
line?: boolean;
|
|
31
|
-
align?: "center" | "left" | "right";
|
|
32
|
-
}
|
|
33
|
-
export interface BarChartProps extends PropsWithChildren {
|
|
34
|
-
className?: string;
|
|
35
|
-
style?: CSSProperties;
|
|
36
|
-
data: BarChartData[];
|
|
37
|
-
markers?: BarChartMarker[];
|
|
38
|
-
lineData?: BarChartLineData[];
|
|
39
|
-
colors: BarChartColors;
|
|
40
|
-
margin?: Margin;
|
|
41
|
-
barWidth?: number;
|
|
42
|
-
barPadding?: number;
|
|
43
|
-
setTooltipPosition?: BarChartLabelSetTooltipPosition | boolean;
|
|
44
|
-
sectionPadding?: number | undefined;
|
|
45
|
-
width?: number;
|
|
46
|
-
height?: number;
|
|
47
|
-
yAxisPadding?: number;
|
|
48
|
-
xAxisPadding?: number;
|
|
49
|
-
drawGridY?: boolean;
|
|
50
|
-
drawGridX?: boolean;
|
|
51
|
-
customYScale?: (yScale: (value: number) => number) => void;
|
|
52
|
-
customXScale?: (xScale: d3.ScaleBand<string>) => void;
|
|
53
|
-
customYAxisLeft?: (yAxisLeft: d3.Axis<d3.NumberValue>) => void;
|
|
54
|
-
customXAxisBottom?: (xAxisBottom: d3.Axis<string>, props: {
|
|
55
|
-
node: HTMLElement;
|
|
56
|
-
labels: string[];
|
|
57
|
-
}) => void;
|
|
58
|
-
customYAxis?: (yAxis: d3.Selection<SVGGElement, unknown, null, undefined>) => void;
|
|
59
|
-
customXAxis?: (xAxis: d3.Selection<SVGGElement, unknown, null, undefined>) => void;
|
|
60
|
-
customBars?: (args: {
|
|
61
|
-
bars: d3.Selection<Element | d3.EnterElement | Document | Window | SVGRectElement | null, BarChartMarshalledGroup, SVGGElement, BarChartMarshalledGroup[]> | d3.Transition<Element | d3.EnterElement | Document | Window | SVGPathElement | null, BarChartMarshalledGroup, SVGGElement, BarChartMarshalledGroup[]>;
|
|
62
|
-
yScale: (value: number) => number;
|
|
63
|
-
lines: null | {
|
|
64
|
-
linesSelection: d3.Selection<Element | d3.EnterElement | Document | Window | SVGPathElement | null, BarChartLineData, SVGGElement, unknown> | null;
|
|
65
|
-
areasSelection: d3.Selection<Element | d3.EnterElement | Document | Window | SVGPathElement | null, BarChartLineData, SVGGElement, unknown> | null;
|
|
66
|
-
area: d3.Area<[number, number]> | null;
|
|
67
|
-
};
|
|
68
|
-
lineData?: BarChartLineData[];
|
|
69
|
-
marshalledData: BarChartMarshalledGroup[][];
|
|
70
|
-
}) => void;
|
|
71
|
-
minValue?: number;
|
|
72
|
-
maxValue?: number;
|
|
73
|
-
minDomainValue?: number | undefined;
|
|
74
|
-
maxDomainValue?: number | undefined;
|
|
75
|
-
minValuesLine?: number;
|
|
76
|
-
dynamicTooltipEnable?: boolean;
|
|
77
|
-
hideTooltipGroupName?: boolean;
|
|
78
|
-
renderTooltip?: (group: BarChartMergedData, position?: {
|
|
79
|
-
tooltip: d3.Selection<HTMLDivElement, unknown, null, undefined>;
|
|
80
|
-
left: number;
|
|
81
|
-
top: number;
|
|
82
|
-
svgWidth: number;
|
|
83
|
-
}, barWidth?: number) => ReactNode;
|
|
84
|
-
labelPosition?: BarChartLabelPosition;
|
|
85
|
-
renderLabel?: (item: BarChartMarshalledGroup & {
|
|
86
|
-
barWidth: number;
|
|
87
|
-
}) => ReactNode;
|
|
88
|
-
tooltipY?: number | undefined;
|
|
89
|
-
tooltipBind?: boolean;
|
|
90
|
-
stackedLine?: boolean;
|
|
91
|
-
curve?: d3.CurveFactory;
|
|
92
|
-
formatTooltipName?: (name: number | string) => number | string | ReactNode;
|
|
93
|
-
formatTooltipValue?: (value: number, name?: string) => number | string | ReactNode;
|
|
94
|
-
tooltipYDomain?: ((data: {
|
|
95
|
-
data: BarChartMarshalledGroup[][];
|
|
96
|
-
lineData?: BarChartLineData[];
|
|
97
|
-
yScale: (value: number) => number;
|
|
98
|
-
}) => number[]) | null;
|
|
99
|
-
marshalledMap?: (data: BarChartMarshalledGroup[][]) => BarChartMarshalledGroup[][];
|
|
100
|
-
drawBars?: (prop: {
|
|
101
|
-
groups: d3.Selection<SVGGElement, BarChartMarshalledGroup[], SVGGElement, unknown>;
|
|
102
|
-
yScale: (value: number) => number;
|
|
103
|
-
marshalledData: BarChartMarshalledGroup[][];
|
|
104
|
-
barWidth: number;
|
|
105
|
-
}) => d3.Selection<Element | d3.EnterElement | Document | Window | SVGRectElement | null, BarChartMarshalledGroup, SVGGElement, BarChartMarshalledGroup[]> | d3.Transition<Element | d3.EnterElement | Document | Window | SVGPathElement | null, BarChartMarshalledGroup, SVGGElement, BarChartMarshalledGroup[]>;
|
|
106
|
-
customize?: (args: {
|
|
107
|
-
svg: d3.Selection<SVGSVGElement, unknown, null, undefined>;
|
|
108
|
-
marshalledData: BarChartMarshalledGroup[][];
|
|
109
|
-
yScale: (value: number) => number;
|
|
110
|
-
xScale: d3.ScaleBand<string>;
|
|
111
|
-
lineData?: BarChartLineData[];
|
|
112
|
-
}) => void;
|
|
113
|
-
onLabelItem?: (data: BarChartMarshalledGroup[]) => BarChartMarshalledGroup[];
|
|
114
|
-
isBarTooltip?: boolean;
|
|
115
|
-
xScaleItemWidth?: number;
|
|
116
|
-
tooltipRoot?: Element;
|
|
117
|
-
tooltipClassName?: string;
|
|
118
|
-
selectable?: boolean;
|
|
119
|
-
onSelect?: (value: [number, number]) => void;
|
|
120
|
-
onBarClick?: (group: BarChartMarshalledGroup) => void;
|
|
121
|
-
onBarHover?: (group?: BarChartMarshalledGroup) => void;
|
|
122
|
-
}
|
|
123
|
-
export
|
|
124
|
-
groupName: string;
|
|
125
|
-
})[];
|
|
126
|
-
export
|
|
127
|
-
yScale: (value: number) => number;
|
|
128
|
-
xScale: d3.ScaleBand<string>;
|
|
129
|
-
marginTop?: number;
|
|
130
|
-
} & Pick<BarChartProps, "barPadding" | "barWidth" | "data" | "colors">;
|
|
131
|
-
export
|
|
132
|
-
x: number;
|
|
133
|
-
y: number;
|
|
134
|
-
height: number;
|
|
135
|
-
color: string;
|
|
136
|
-
value: number;
|
|
137
|
-
groupName?: string;
|
|
138
|
-
name: string;
|
|
139
|
-
stackIndex: number;
|
|
140
|
-
groupIndex: number;
|
|
141
|
-
};
|
|
142
|
-
export
|
|
143
|
-
lineType: "line" | "area";
|
|
144
|
-
name: string;
|
|
145
|
-
values: (number | null)[];
|
|
146
|
-
stroke?: string;
|
|
147
|
-
fill?: string;
|
|
148
|
-
};
|
|
1
|
+
import { CSSProperties, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
import { Margin } from '../../common/types/margin';
|
|
3
|
+
import * as d3 from "d3";
|
|
4
|
+
export type BarChartData = {
|
|
5
|
+
groupName: string | number;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
} | Record<string, {
|
|
8
|
+
[key: string]: number;
|
|
9
|
+
}>;
|
|
10
|
+
export type LegendItemsGroupedStackedBarChart = {
|
|
11
|
+
[key: string]: string;
|
|
12
|
+
};
|
|
13
|
+
export type BarChartColors = {
|
|
14
|
+
[key: string]: string;
|
|
15
|
+
};
|
|
16
|
+
export type BarChartLabelPosition = "top" | "center" | "bottom";
|
|
17
|
+
export type BarChartLabelSetTooltipPosition = (position: {
|
|
18
|
+
tooltip: d3.Selection<HTMLDivElement, unknown, null, undefined>;
|
|
19
|
+
left: number;
|
|
20
|
+
top: number;
|
|
21
|
+
svgWidth: number;
|
|
22
|
+
}) => void;
|
|
23
|
+
export interface BarChartMarker {
|
|
24
|
+
label: string;
|
|
25
|
+
value: number;
|
|
26
|
+
color?: string;
|
|
27
|
+
lineColor?: string;
|
|
28
|
+
className?: string;
|
|
29
|
+
horizontal?: boolean;
|
|
30
|
+
line?: boolean;
|
|
31
|
+
align?: "center" | "left" | "right";
|
|
32
|
+
}
|
|
33
|
+
export interface BarChartProps extends PropsWithChildren {
|
|
34
|
+
className?: string;
|
|
35
|
+
style?: CSSProperties;
|
|
36
|
+
data: BarChartData[];
|
|
37
|
+
markers?: BarChartMarker[];
|
|
38
|
+
lineData?: BarChartLineData[];
|
|
39
|
+
colors: BarChartColors;
|
|
40
|
+
margin?: Margin;
|
|
41
|
+
barWidth?: number;
|
|
42
|
+
barPadding?: number;
|
|
43
|
+
setTooltipPosition?: BarChartLabelSetTooltipPosition | boolean;
|
|
44
|
+
sectionPadding?: number | undefined;
|
|
45
|
+
width?: number;
|
|
46
|
+
height?: number;
|
|
47
|
+
yAxisPadding?: number;
|
|
48
|
+
xAxisPadding?: number;
|
|
49
|
+
drawGridY?: boolean;
|
|
50
|
+
drawGridX?: boolean;
|
|
51
|
+
customYScale?: (yScale: (value: number) => number) => void;
|
|
52
|
+
customXScale?: (xScale: d3.ScaleBand<string>) => void;
|
|
53
|
+
customYAxisLeft?: (yAxisLeft: d3.Axis<d3.NumberValue>) => void;
|
|
54
|
+
customXAxisBottom?: (xAxisBottom: d3.Axis<string>, props: {
|
|
55
|
+
node: HTMLElement;
|
|
56
|
+
labels: string[];
|
|
57
|
+
}) => void;
|
|
58
|
+
customYAxis?: (yAxis: d3.Selection<SVGGElement, unknown, null, undefined>) => void;
|
|
59
|
+
customXAxis?: (xAxis: d3.Selection<SVGGElement, unknown, null, undefined>) => void;
|
|
60
|
+
customBars?: (args: {
|
|
61
|
+
bars: d3.Selection<Element | d3.EnterElement | Document | Window | SVGRectElement | null, BarChartMarshalledGroup, SVGGElement, BarChartMarshalledGroup[]> | d3.Transition<Element | d3.EnterElement | Document | Window | SVGPathElement | null, BarChartMarshalledGroup, SVGGElement, BarChartMarshalledGroup[]>;
|
|
62
|
+
yScale: (value: number) => number;
|
|
63
|
+
lines: null | {
|
|
64
|
+
linesSelection: d3.Selection<Element | d3.EnterElement | Document | Window | SVGPathElement | null, BarChartLineData, SVGGElement, unknown> | null;
|
|
65
|
+
areasSelection: d3.Selection<Element | d3.EnterElement | Document | Window | SVGPathElement | null, BarChartLineData, SVGGElement, unknown> | null;
|
|
66
|
+
area: d3.Area<[number, number]> | null;
|
|
67
|
+
};
|
|
68
|
+
lineData?: BarChartLineData[];
|
|
69
|
+
marshalledData: BarChartMarshalledGroup[][];
|
|
70
|
+
}) => void;
|
|
71
|
+
minValue?: number;
|
|
72
|
+
maxValue?: number;
|
|
73
|
+
minDomainValue?: number | undefined;
|
|
74
|
+
maxDomainValue?: number | undefined;
|
|
75
|
+
minValuesLine?: number;
|
|
76
|
+
dynamicTooltipEnable?: boolean;
|
|
77
|
+
hideTooltipGroupName?: boolean;
|
|
78
|
+
renderTooltip?: (group: BarChartMergedData, position?: {
|
|
79
|
+
tooltip: d3.Selection<HTMLDivElement, unknown, null, undefined>;
|
|
80
|
+
left: number;
|
|
81
|
+
top: number;
|
|
82
|
+
svgWidth: number;
|
|
83
|
+
}, barWidth?: number) => ReactNode;
|
|
84
|
+
labelPosition?: BarChartLabelPosition;
|
|
85
|
+
renderLabel?: (item: BarChartMarshalledGroup & {
|
|
86
|
+
barWidth: number;
|
|
87
|
+
}) => ReactNode;
|
|
88
|
+
tooltipY?: number | undefined;
|
|
89
|
+
tooltipBind?: boolean;
|
|
90
|
+
stackedLine?: boolean;
|
|
91
|
+
curve?: d3.CurveFactory;
|
|
92
|
+
formatTooltipName?: (name: number | string) => number | string | ReactNode;
|
|
93
|
+
formatTooltipValue?: (value: number, name?: string) => number | string | ReactNode;
|
|
94
|
+
tooltipYDomain?: ((data: {
|
|
95
|
+
data: BarChartMarshalledGroup[][];
|
|
96
|
+
lineData?: BarChartLineData[];
|
|
97
|
+
yScale: (value: number) => number;
|
|
98
|
+
}) => number[]) | null;
|
|
99
|
+
marshalledMap?: (data: BarChartMarshalledGroup[][]) => BarChartMarshalledGroup[][];
|
|
100
|
+
drawBars?: (prop: {
|
|
101
|
+
groups: d3.Selection<SVGGElement, BarChartMarshalledGroup[], SVGGElement, unknown>;
|
|
102
|
+
yScale: (value: number) => number;
|
|
103
|
+
marshalledData: BarChartMarshalledGroup[][];
|
|
104
|
+
barWidth: number;
|
|
105
|
+
}) => d3.Selection<Element | d3.EnterElement | Document | Window | SVGRectElement | null, BarChartMarshalledGroup, SVGGElement, BarChartMarshalledGroup[]> | d3.Transition<Element | d3.EnterElement | Document | Window | SVGPathElement | null, BarChartMarshalledGroup, SVGGElement, BarChartMarshalledGroup[]>;
|
|
106
|
+
customize?: (args: {
|
|
107
|
+
svg: d3.Selection<SVGSVGElement, unknown, null, undefined>;
|
|
108
|
+
marshalledData: BarChartMarshalledGroup[][];
|
|
109
|
+
yScale: (value: number) => number;
|
|
110
|
+
xScale: d3.ScaleBand<string>;
|
|
111
|
+
lineData?: BarChartLineData[];
|
|
112
|
+
}) => void;
|
|
113
|
+
onLabelItem?: (data: BarChartMarshalledGroup[]) => BarChartMarshalledGroup[];
|
|
114
|
+
isBarTooltip?: boolean;
|
|
115
|
+
xScaleItemWidth?: number;
|
|
116
|
+
tooltipRoot?: Element;
|
|
117
|
+
tooltipClassName?: string;
|
|
118
|
+
selectable?: boolean;
|
|
119
|
+
onSelect?: (value: [number, number]) => void;
|
|
120
|
+
onBarClick?: (group: BarChartMarshalledGroup) => void;
|
|
121
|
+
onBarHover?: (group?: BarChartMarshalledGroup) => void;
|
|
122
|
+
}
|
|
123
|
+
export type BarChartMergedData = (BarChartMarshalledGroup & BarChartLineData & {
|
|
124
|
+
groupName: string;
|
|
125
|
+
})[];
|
|
126
|
+
export type BarChartMarshaling = {
|
|
127
|
+
yScale: (value: number) => number;
|
|
128
|
+
xScale: d3.ScaleBand<string>;
|
|
129
|
+
marginTop?: number;
|
|
130
|
+
} & Pick<BarChartProps, "barPadding" | "barWidth" | "data" | "colors">;
|
|
131
|
+
export type BarChartMarshalledGroup = {
|
|
132
|
+
x: number;
|
|
133
|
+
y: number;
|
|
134
|
+
height: number;
|
|
135
|
+
color: string;
|
|
136
|
+
value: number;
|
|
137
|
+
groupName?: string;
|
|
138
|
+
name: string;
|
|
139
|
+
stackIndex: number;
|
|
140
|
+
groupIndex: number;
|
|
141
|
+
};
|
|
142
|
+
export type BarChartLineData = {
|
|
143
|
+
lineType: "line" | "area";
|
|
144
|
+
name: string;
|
|
145
|
+
values: (number | null)[];
|
|
146
|
+
stroke?: string;
|
|
147
|
+
fill?: string;
|
|
148
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export declare const bubbleChartDefaultProps: {
|
|
2
|
-
height: number;
|
|
3
|
-
minSize: number;
|
|
4
|
-
maxSize: number;
|
|
5
|
-
margin: {
|
|
6
|
-
top: number;
|
|
7
|
-
right: number;
|
|
8
|
-
bottom: number;
|
|
9
|
-
left: number;
|
|
10
|
-
};
|
|
11
|
-
yAxisPadding: number;
|
|
12
|
-
xAxisPadding: number;
|
|
13
|
-
yScaleLabelPadding: number;
|
|
14
|
-
};
|
|
1
|
+
export declare const bubbleChartDefaultProps: {
|
|
2
|
+
height: number;
|
|
3
|
+
minSize: number;
|
|
4
|
+
maxSize: number;
|
|
5
|
+
margin: {
|
|
6
|
+
top: number;
|
|
7
|
+
right: number;
|
|
8
|
+
bottom: number;
|
|
9
|
+
left: number;
|
|
10
|
+
};
|
|
11
|
+
yAxisPadding: number;
|
|
12
|
+
xAxisPadding: number;
|
|
13
|
+
yScaleLabelPadding: number;
|
|
14
|
+
};
|