Closed Harman-singh-waraich closed 3 months ago
Recent updates to the chart functionalities include the addition of a custom tooltip positioner and enhancements to the TimeSeriesChart component. The custom tooltip positioner dynamically adjusts tooltip placement based on chart dimensions and the hovered element. Additionally, the TimeSeriesChart now boasts gradient borders for datasets and a new plugin for customizing line drawing after datasets are rendered, enhancing the visual appeal and interactivity of charts.
File | Summary of Changes |
---|---|
web/global.d.ts |
Declared a new custom positioner in the "chart.js" module for TooltipPositionerMap with TooltipPositionerFunction<ChartType> . |
web/src/pages/Home/CourtOverview/Chart.tsx |
Added a custom tooltip positioner to dynamically calculate tooltip positioning based on the chart's size and hovered element's position. |
web/src/pages/Home/CourtOverview/TimeSeriesChart.tsx |
Expanded imports from "chart.js" , modified tooltip plugin's position and background color, added gradient border color function, and added a new plugin for line drawing behavior. |
In charts, a dance of data and light,
Tooltips now align just right,
With gradients that glow and lines anew,
A visual feast, for me and you.
Code and art in harmony blend,
Charting tales, from start to end.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Issues
1 New issue
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
PR-Codex overview
The focus of this PR is to add custom tooltip positioning and gradient border color to charts using
chart.js
.Detailed summary
Chart.tsx
andTimeSeriesChart.tsx
TimeSeriesChart.tsx
TimeSeriesChart.tsx
Summary by CodeRabbit