@shohojdhara/atomix 0.2.4 → 0.2.6
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/README.md +19 -0
- package/dist/atomix.css +1300 -1418
- package/dist/atomix.min.css +3 -3
- package/dist/index.d.ts +1259 -874
- package/dist/index.esm.js +16256 -26366
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +15691 -22295
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/themes/applemix.css +15036 -0
- package/dist/themes/applemix.min.css +72 -0
- package/dist/themes/boomdevs.css +1300 -1419
- package/dist/themes/boomdevs.min.css +3 -3
- package/dist/themes/esrar.css +1301 -1419
- package/dist/themes/esrar.min.css +3 -3
- package/dist/themes/flashtrade.css +15187 -0
- package/dist/themes/flashtrade.min.css +86 -0
- package/dist/themes/mashroom.css +1299 -1417
- package/dist/themes/mashroom.min.css +5 -5
- package/dist/themes/shaj-default.css +1300 -1418
- package/dist/themes/shaj-default.min.css +3 -3
- package/package.json +6 -17
- package/src/components/Accordion/Accordion.stories.tsx +4 -26
- package/src/components/Accordion/Accordion.tsx +21 -12
- package/src/components/AtomixGlass/AtomixGlass.test.tsx +106 -72
- package/src/components/AtomixGlass/AtomixGlass.tsx +485 -1215
- package/src/components/AtomixGlass/AtomixGlassContainer.tsx +399 -0
- package/src/components/AtomixGlass/GlassFilter.tsx +156 -0
- package/src/components/AtomixGlass/README.md +124 -2
- package/src/components/AtomixGlass/atomixGLass.old.tsx +1266 -0
- package/src/components/AtomixGlass/glass-utils.ts +263 -0
- package/src/components/AtomixGlass/shader-utils.ts +404 -236
- package/src/components/AtomixGlass/{AtomixGlass.stories.tsx → stories/AtomixGlass.stories.tsx} +55 -35
- package/src/components/AtomixGlass/stories/Examples.stories.tsx +57 -89
- package/src/components/AtomixGlass/stories/Modes.stories.tsx +149 -149
- package/src/components/AtomixGlass/stories/Playground.stories.tsx +95 -32
- package/src/components/AtomixGlass/stories/ShaderVariants.stories.tsx +0 -2
- package/src/components/AtomixGlass/stories/shared-components.tsx +9 -18
- package/src/components/AtomixGlass/utils.ts +3 -3
- package/src/components/Avatar/Avatar.tsx +3 -0
- package/src/components/Avatar/AvatarGroup.tsx +2 -1
- package/src/components/Badge/Badge.stories.tsx +74 -54
- package/src/components/Badge/Badge.tsx +8 -12
- package/src/components/Breadcrumb/Breadcrumb.tsx +23 -4
- package/src/components/Button/Button.tsx +3 -5
- package/src/components/Callout/Callout.stories.tsx +86 -35
- package/src/components/Callout/Callout.tsx +4 -0
- package/src/components/Card/Card.stories.tsx +89 -85
- package/src/components/Card/Card.tsx +15 -4
- package/src/components/Card/ElevationCard.tsx +2 -0
- package/src/components/Chart/AnimatedChart.tsx +179 -156
- package/src/components/Chart/AreaChart.tsx +123 -12
- package/src/components/Chart/BarChart.tsx +91 -100
- package/src/components/Chart/BaseChart.tsx +80 -0
- package/src/components/Chart/BubbleChart.tsx +114 -290
- package/src/components/Chart/CandlestickChart.tsx +282 -622
- package/src/components/Chart/Chart.stories.tsx +576 -179
- package/src/components/Chart/Chart.tsx +374 -75
- package/src/components/Chart/ChartRenderer.tsx +371 -220
- package/src/components/Chart/ChartToolbar.tsx +372 -61
- package/src/components/Chart/ChartTooltip.tsx +33 -18
- package/src/components/Chart/DonutChart.tsx +172 -254
- package/src/components/Chart/FunnelChart.tsx +169 -240
- package/src/components/Chart/GaugeChart.tsx +224 -392
- package/src/components/Chart/HeatmapChart.tsx +302 -440
- package/src/components/Chart/LineChart.tsx +148 -103
- package/src/components/Chart/MultiAxisChart.tsx +267 -395
- package/src/components/Chart/PieChart.tsx +114 -64
- package/src/components/Chart/RadarChart.tsx +202 -218
- package/src/components/Chart/ScatterChart.tsx +111 -97
- package/src/components/Chart/TreemapChart.tsx +147 -222
- package/src/components/Chart/WaterfallChart.tsx +253 -291
- package/src/components/Chart/index.ts +11 -9
- package/src/components/Chart/types.ts +85 -9
- package/src/components/Chart/utils.ts +66 -0
- package/src/components/ColorModeToggle/ColorModeToggle.stories.tsx +121 -11
- package/src/components/ColorModeToggle/ColorModeToggle.tsx +149 -45
- package/src/components/ColorModeToggle/index.ts +1 -1
- package/src/components/Countdown/Countdown.tsx +4 -0
- package/src/components/DataTable/DataTable.tsx +2 -1
- package/src/components/DatePicker/DatePicker.stories.tsx +0 -11
- package/src/components/DatePicker/DatePicker.tsx +3 -9
- package/src/components/DatePicker/types.ts +5 -0
- package/src/components/Dropdown/Dropdown.stories.tsx +32 -25
- package/src/components/Dropdown/Dropdown.tsx +26 -28
- package/src/components/EdgePanel/EdgePanel.stories.tsx +13 -15
- package/src/components/EdgePanel/EdgePanel.tsx +20 -5
- package/src/components/Footer/Footer.stories.tsx +187 -60
- package/src/components/Footer/Footer.test.tsx +134 -0
- package/src/components/Footer/Footer.tsx +133 -34
- package/src/components/Footer/FooterLink.tsx +1 -1
- package/src/components/Footer/FooterSection.tsx +53 -36
- package/src/components/Footer/FooterSocialLink.tsx +32 -29
- package/src/components/Footer/README.md +82 -3
- package/src/components/Footer/index.ts +1 -1
- package/src/components/Form/Checkbox.stories.tsx +13 -5
- package/src/components/Form/Checkbox.tsx +3 -6
- package/src/components/Form/Form.stories.tsx +10 -3
- package/src/components/Form/Form.tsx +2 -0
- package/src/components/Form/FormGroup.tsx +2 -1
- package/src/components/Form/Input.stories.tsx +12 -11
- package/src/components/Form/Input.tsx +97 -95
- package/src/components/Form/Radio.stories.tsx +22 -7
- package/src/components/Form/Radio.tsx +3 -6
- package/src/components/Form/Select.stories.tsx +21 -6
- package/src/components/Form/Select.tsx +3 -5
- package/src/components/Form/Textarea.stories.tsx +13 -11
- package/src/components/Form/Textarea.tsx +88 -86
- package/src/components/Hero/Hero.stories.tsx +2 -3
- package/src/components/Hero/Hero.tsx +5 -6
- package/src/components/Icon/Icon.tsx +12 -1
- package/src/components/List/List.tsx +2 -1
- package/src/components/List/ListGroup.tsx +2 -1
- package/src/components/Messages/Messages.tsx +3 -2
- package/src/components/Modal/Modal.stories.tsx +48 -34
- package/src/components/Modal/Modal.tsx +19 -23
- package/src/components/Navigation/Menu/MegaMenu.tsx +2 -2
- package/src/components/Navigation/Menu/Menu.tsx +2 -2
- package/src/components/Navigation/Nav/Nav.tsx +6 -1
- package/src/components/Navigation/Nav/NavDropdown.tsx +10 -1
- package/src/components/Navigation/Navbar/Navbar.tsx +4 -1
- package/src/components/Navigation/SideMenu/SideMenu.tsx +3 -2
- package/src/components/Pagination/Pagination.stories.tsx +13 -6
- package/src/components/Pagination/Pagination.tsx +7 -6
- package/src/components/PhotoViewer/PhotoViewer.tsx +2 -1
- package/src/components/Popover/Popover.stories.tsx +32 -24
- package/src/components/Popover/Popover.tsx +4 -1
- package/src/components/ProductReview/ProductReview.tsx +8 -2
- package/src/components/Progress/Progress.tsx +2 -1
- package/src/components/Rating/Rating.stories.tsx +11 -6
- package/src/components/Rating/Rating.tsx +3 -5
- package/src/components/River/River.tsx +5 -5
- package/src/components/SectionIntro/SectionIntro.tsx +8 -2
- package/src/components/Slider/Slider.stories.tsx +4 -4
- package/src/components/Slider/Slider.tsx +4 -3
- package/src/components/Spinner/Spinner.tsx +2 -1
- package/src/components/Steps/Steps.stories.tsx +5 -4
- package/src/components/Steps/Steps.tsx +8 -5
- package/src/components/Tab/Tab.stories.tsx +4 -3
- package/src/components/Tab/Tab.tsx +8 -6
- package/src/components/Testimonial/Testimonial.tsx +8 -2
- package/src/components/Todo/Todo.tsx +2 -1
- package/src/components/Toggle/Toggle.stories.tsx +5 -4
- package/src/components/Toggle/Toggle.tsx +8 -5
- package/src/components/Tooltip/Tooltip.stories.tsx +40 -30
- package/src/components/Tooltip/Tooltip.tsx +9 -2
- package/src/components/Upload/Upload.stories.tsx +252 -0
- package/src/components/Upload/Upload.tsx +92 -53
- package/src/components/VideoPlayer/VideoPlayer.tsx +3 -1
- package/src/components/index.ts +0 -4
- package/src/layouts/Grid/Grid.stories.tsx +10 -23
- package/src/layouts/Grid/Grid.tsx +20 -1
- package/src/layouts/Grid/GridCol.tsx +76 -48
- package/src/lib/composables/useAtomixGlass.ts +861 -44
- package/src/lib/composables/useBarChart.ts +13 -6
- package/src/lib/composables/useChart.ts +17 -13
- package/src/lib/composables/useChartExport.ts +19 -78
- package/src/lib/composables/useChartToolbar.ts +0 -1
- package/src/lib/composables/useEdgePanel.ts +111 -103
- package/src/lib/composables/useFooter.ts +3 -3
- package/src/lib/composables/useGlassContainer.ts +16 -7
- package/src/lib/composables/useLineChart.ts +8 -1
- package/src/lib/composables/useRiver.ts +5 -0
- package/src/lib/composables/useSlider.ts +62 -24
- package/src/lib/composables/useVideoPlayer.ts +60 -63
- package/src/lib/constants/components.ts +146 -32
- package/src/lib/types/components.ts +258 -10
- package/src/lib/utils/displacement-generator.ts +55 -49
- package/src/lib/utils/icons.ts +1 -1
- package/src/lib/utils/index.ts +16 -10
- package/src/styles/01-settings/_settings.accordion.scss +19 -19
- package/src/styles/01-settings/_settings.animations.scss +5 -5
- package/src/styles/01-settings/_settings.avatar-group.scss +1 -1
- package/src/styles/01-settings/_settings.avatar.scss +17 -17
- package/src/styles/01-settings/_settings.background.scss +1 -4
- package/src/styles/01-settings/_settings.badge.scss +1 -1
- package/src/styles/01-settings/_settings.breadcrumb.scss +1 -1
- package/src/styles/01-settings/_settings.card.scss +1 -1
- package/src/styles/01-settings/_settings.chart.scss +65 -2
- package/src/styles/01-settings/_settings.dropdown.scss +1 -1
- package/src/styles/01-settings/_settings.footer.scss +35 -42
- package/src/styles/01-settings/_settings.input.scss +1 -1
- package/src/styles/01-settings/_settings.list.scss +1 -1
- package/src/styles/01-settings/_settings.rating.scss +1 -1
- package/src/styles/01-settings/_settings.tabs.scss +1 -1
- package/src/styles/01-settings/_settings.upload.scss +6 -5
- package/src/styles/02-tools/_tools.animations.scss +4 -5
- package/src/styles/02-tools/_tools.background.scss +1 -13
- package/src/styles/02-tools/_tools.glass.scss +0 -1
- package/src/styles/02-tools/_tools.utility-api.scss +42 -34
- package/src/styles/03-generic/_generic.root.scss +1 -4
- package/src/styles/04-elements/_elements.body.scss +0 -1
- package/src/styles/06-components/_components.atomix-glass.scss +217 -39
- package/src/styles/06-components/_components.badge.scss +6 -8
- package/src/styles/06-components/_components.button.scss +8 -3
- package/src/styles/06-components/_components.card.scss +2 -14
- package/src/styles/06-components/_components.chart.scss +969 -1449
- package/src/styles/06-components/_components.color-mode-toggle.scss +43 -6
- package/src/styles/06-components/_components.dropdown.scss +19 -7
- package/src/styles/06-components/_components.edge-panel.scss +4 -2
- package/src/styles/06-components/_components.footer.scss +166 -85
- package/src/styles/06-components/_components.input.scss +8 -9
- package/src/styles/06-components/_components.list.scss +1 -0
- package/src/styles/06-components/_components.modal.scss +5 -3
- package/src/styles/06-components/_components.skeleton.scss +8 -6
- package/src/styles/06-components/_components.upload.scss +219 -4
- package/src/styles/06-components/old.chart.styles.scss +1 -30
- package/src/styles/99-utilities/_utilities.opacity.scss +1 -1
- package/src/styles/99-utilities/_utilities.scss +1 -1
- package/src/components/Chart/AdvancedChart.tsx +0 -624
- package/src/components/Chart/LineChartNew.tsx +0 -167
- package/src/components/Chart/RealTimeChart.tsx +0 -436
- package/src/components/DatePicker/DatePicker copy.tsx +0 -551
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { forwardRef, memo,
|
|
1
|
+
import { forwardRef, memo, useState } from 'react';
|
|
2
2
|
import { LineChartOptions, useLineChart } from '../../lib/composables/useLineChart';
|
|
3
|
-
import
|
|
4
|
-
import ChartRenderer from './ChartRenderer';
|
|
3
|
+
import BaseChart from './BaseChart';
|
|
5
4
|
import ChartTooltip from './ChartTooltip';
|
|
6
|
-
import { ChartProps } from './types';
|
|
5
|
+
import { ChartProps, ChartRenderContentParams, ChartDataset, ChartDataPoint } from './types';
|
|
7
6
|
|
|
8
7
|
interface LineChartProps extends Omit<ChartProps, 'type'> {
|
|
9
8
|
/**
|
|
@@ -48,6 +47,19 @@ const LineChart = memo(
|
|
|
48
47
|
},
|
|
49
48
|
ref
|
|
50
49
|
) => {
|
|
50
|
+
// Merge default options with provided options
|
|
51
|
+
const mergedLineOptions: LineChartOptions = {
|
|
52
|
+
showDataPoints: true,
|
|
53
|
+
lineWidth: 2,
|
|
54
|
+
pointRadius: 4,
|
|
55
|
+
smooth: false,
|
|
56
|
+
tension: 0.4,
|
|
57
|
+
showArea: false,
|
|
58
|
+
fillOpacity: 0.3,
|
|
59
|
+
showPointLabels: false,
|
|
60
|
+
...lineOptions,
|
|
61
|
+
};
|
|
62
|
+
|
|
51
63
|
const {
|
|
52
64
|
processedDatasets,
|
|
53
65
|
generateSmoothPath,
|
|
@@ -55,113 +67,146 @@ const LineChart = memo(
|
|
|
55
67
|
handlePointHover,
|
|
56
68
|
handlePointLeave,
|
|
57
69
|
hoveredPoint,
|
|
58
|
-
} = useLineChart(datasets,
|
|
59
|
-
|
|
60
|
-
const renderContent =
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
70
|
+
} = useLineChart(datasets, mergedLineOptions);
|
|
71
|
+
|
|
72
|
+
const renderContent = ({
|
|
73
|
+
scales,
|
|
74
|
+
colors,
|
|
75
|
+
datasets: renderedDatasets,
|
|
76
|
+
handlers,
|
|
77
|
+
hoveredPoint,
|
|
78
|
+
toolbarState,
|
|
79
|
+
config: renderConfig,
|
|
80
|
+
}: ChartRenderContentParams) => {
|
|
81
|
+
if (!renderedDatasets.length) return null;
|
|
82
|
+
|
|
83
|
+
// Use toolbar state if available, fallback to config for backward compatibility
|
|
84
|
+
const showTooltips = toolbarState?.showTooltips ?? renderConfig?.showTooltips ?? true;
|
|
85
|
+
const shouldAnimate = toolbarState?.animationsEnabled ?? renderConfig?.animate ?? mergedLineOptions.smooth;
|
|
86
|
+
|
|
87
|
+
return (
|
|
88
|
+
<>
|
|
89
|
+
{renderedDatasets.map((dataset: ChartDataset, datasetIndex: number) => {
|
|
90
|
+
const color = dataset.color || colors[datasetIndex];
|
|
91
|
+
const dataLength = dataset.data?.length || 0;
|
|
92
|
+
|
|
93
|
+
if (dataLength === 0) return null;
|
|
94
|
+
|
|
95
|
+
// Generate points with proper coordinates
|
|
96
|
+
const points =
|
|
97
|
+
dataset.data?.map((point: ChartDataPoint, i: number) => ({
|
|
98
|
+
x: scales.xScale(i, dataLength),
|
|
99
|
+
y: scales.yScale(point.value),
|
|
100
|
+
})) || [];
|
|
101
|
+
|
|
102
|
+
// Generate line path - ensure proper SVG path format
|
|
103
|
+
const path = mergedLineOptions.smooth
|
|
104
|
+
? generateSmoothPath(points)
|
|
105
|
+
: `M ${points.map((p) => `${p.x},${p.y}`).join(' L ')}`;
|
|
106
|
+
|
|
107
|
+
return (
|
|
108
|
+
<g key={`dataset-${datasetIndex}`}>
|
|
109
|
+
{mergedLineOptions.showArea && (
|
|
110
|
+
<path
|
|
111
|
+
d={`${path} L ${points[points.length - 1]?.x || 0},${scales.yScale(0)} L ${points[0]?.x || 0},${scales.yScale(0)} Z`}
|
|
112
|
+
fill={color}
|
|
113
|
+
fillOpacity={mergedLineOptions.fillOpacity || 0.3}
|
|
114
|
+
className="c-chart__area-path"
|
|
115
|
+
/>
|
|
116
|
+
)}
|
|
89
117
|
<path
|
|
90
|
-
d={
|
|
91
|
-
|
|
92
|
-
|
|
118
|
+
d={path}
|
|
119
|
+
stroke={color}
|
|
120
|
+
strokeWidth={mergedLineOptions.lineWidth || 2}
|
|
121
|
+
fill="none"
|
|
122
|
+
strokeLinecap="round"
|
|
123
|
+
strokeLinejoin="round"
|
|
124
|
+
className="c-chart__line-path"
|
|
93
125
|
/>
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
{mergedLineOptions.showDataPoints &&
|
|
127
|
+
dataset.data?.map((point: any, i: number) => {
|
|
128
|
+
const x = scales.xScale(i, dataLength);
|
|
129
|
+
const y = scales.yScale(point.value);
|
|
130
|
+
const isHovered =
|
|
131
|
+
hoveredPoint?.datasetIndex === datasetIndex &&
|
|
132
|
+
hoveredPoint?.pointIndex === i;
|
|
133
|
+
|
|
134
|
+
return (
|
|
135
|
+
<g key={`point-${i}`}>
|
|
136
|
+
<circle
|
|
137
|
+
cx={x}
|
|
138
|
+
cy={y}
|
|
139
|
+
r={
|
|
140
|
+
isHovered
|
|
141
|
+
? mergedLineOptions.pointRadius! * 1.5
|
|
142
|
+
: mergedLineOptions.pointRadius
|
|
143
|
+
}
|
|
144
|
+
fill={color}
|
|
145
|
+
stroke="white"
|
|
146
|
+
strokeWidth={isHovered ? 2 : 1}
|
|
147
|
+
className={`c-chart__data-point ${isHovered ? 'c-chart__data-point--hovered' : ''}`}
|
|
148
|
+
onMouseEnter={e => {
|
|
149
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
150
|
+
handlers.onPointHover(
|
|
151
|
+
datasetIndex,
|
|
152
|
+
i,
|
|
153
|
+
x,
|
|
154
|
+
y,
|
|
155
|
+
rect.left + rect.width / 2,
|
|
156
|
+
rect.top + rect.height / 2
|
|
157
|
+
);
|
|
158
|
+
}}
|
|
159
|
+
onMouseLeave={handlers.onPointLeave}
|
|
160
|
+
onClick={() => handlers.onDataPointClick?.(point, datasetIndex, i)}
|
|
161
|
+
style={{ cursor: 'pointer' }}
|
|
162
|
+
/>
|
|
163
|
+
{mergedLineOptions.showPointLabels && (
|
|
164
|
+
<text
|
|
165
|
+
x={x}
|
|
166
|
+
y={y - 15}
|
|
167
|
+
textAnchor="middle"
|
|
168
|
+
fontSize="12"
|
|
169
|
+
fill={color}
|
|
170
|
+
className="c-chart__point-label"
|
|
171
|
+
>
|
|
172
|
+
{point.value}
|
|
173
|
+
</text>
|
|
174
|
+
)}
|
|
175
|
+
</g>
|
|
176
|
+
);
|
|
177
|
+
})}
|
|
178
|
+
</g>
|
|
179
|
+
);
|
|
180
|
+
})}
|
|
181
|
+
{showTooltips &&
|
|
182
|
+
hoveredPoint &&
|
|
183
|
+
renderedDatasets[hoveredPoint.datasetIndex]?.data?.[hoveredPoint.pointIndex] && (
|
|
184
|
+
<ChartTooltip
|
|
185
|
+
dataPoint={
|
|
186
|
+
renderedDatasets[hoveredPoint.datasetIndex]!.data![hoveredPoint.pointIndex]!
|
|
187
|
+
}
|
|
188
|
+
datasetLabel={renderedDatasets[hoveredPoint.datasetIndex]?.label}
|
|
189
|
+
datasetColor={renderedDatasets[hoveredPoint.datasetIndex]?.color}
|
|
190
|
+
position={{ x: hoveredPoint.clientX, y: hoveredPoint.clientY }}
|
|
191
|
+
visible={true}
|
|
192
|
+
/>
|
|
193
|
+
)}
|
|
194
|
+
</>
|
|
195
|
+
);
|
|
196
|
+
};
|
|
128
197
|
|
|
129
198
|
return (
|
|
130
|
-
<
|
|
199
|
+
<BaseChart
|
|
131
200
|
ref={ref}
|
|
132
201
|
type="line"
|
|
133
|
-
datasets={
|
|
202
|
+
datasets={processedDatasets}
|
|
134
203
|
config={config}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
reset: true,
|
|
140
|
-
grid: true,
|
|
141
|
-
tooltips: true,
|
|
142
|
-
},
|
|
143
|
-
}}
|
|
204
|
+
renderContent={renderContent}
|
|
205
|
+
onDataPointClick={onDataPointClick}
|
|
206
|
+
interactive={true}
|
|
207
|
+
enableAccessibility={true}
|
|
144
208
|
{...props}
|
|
145
|
-
|
|
146
|
-
<ChartRenderer
|
|
147
|
-
datasets={processedDatasets}
|
|
148
|
-
config={config}
|
|
149
|
-
onDataPointClick={onDataPointClick}
|
|
150
|
-
renderContent={renderContent}
|
|
151
|
-
/>
|
|
152
|
-
{hoveredPoint &&
|
|
153
|
-
processedDatasets[hoveredPoint.datasetIndex]?.data?.[hoveredPoint.pointIndex] && (
|
|
154
|
-
<ChartTooltip
|
|
155
|
-
dataPoint={
|
|
156
|
-
processedDatasets[hoveredPoint.datasetIndex]!.data![hoveredPoint.pointIndex]!
|
|
157
|
-
}
|
|
158
|
-
datasetLabel={processedDatasets[hoveredPoint.datasetIndex]?.label}
|
|
159
|
-
datasetColor={processedDatasets[hoveredPoint.datasetIndex]?.color}
|
|
160
|
-
position={{ x: hoveredPoint.x, y: hoveredPoint.y }}
|
|
161
|
-
visible={true}
|
|
162
|
-
/>
|
|
163
|
-
)}
|
|
164
|
-
</Chart>
|
|
209
|
+
/>
|
|
165
210
|
);
|
|
166
211
|
}
|
|
167
212
|
)
|