-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: tooltip improvement and line draw #1655
Conversation
feat(web): tooltip-improvement-and-line-draw
WalkthroughThis update enhances the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Chart
participant Tooltip
User->>Chart: Interacts with chart
Chart->>Tooltip: Calculates custom position
Tooltip->>Chart: Displays tooltip at custom position
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? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
✅ Deploy Preview for kleros-v2 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for kleros-v2-neo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for kleros-v2-university ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for kleros-v2 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for kleros-v2-university ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for kleros-v2-neo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- web/global.d.ts (1 hunks)
- web/src/pages/Home/CourtOverview/Chart.tsx (2 hunks)
- web/src/pages/Home/CourtOverview/TimeSeriesChart.tsx (3 hunks)
Additional context used
Biome
web/src/pages/Home/CourtOverview/Chart.tsx
[error] 107-107: This aliasing of this is unnecessary.
Arrow functions inherits
this
from their enclosing scope.
Safe fix: Use this instead of an alias.(lint/complexity/noUselessThisAlias)
Additional comments not posted (4)
web/global.d.ts (1)
21-24
: Add a custom tooltip positioner to theTooltipPositionerMap
interface.The new
custom
property is correctly defined as aTooltipPositionerFunction<ChartType>
, adding flexibility for custom tooltip positioning in charts.web/src/pages/Home/CourtOverview/TimeSeriesChart.tsx (3)
63-63
: Ensure custom tooltip positioner is correctly implemented.The
position: "custom"
setting for the tooltip is correctly applied, enabling the use of the custom tooltip positioner defined inChart.tsx
.
87-96
: Implement gradient-based border color for chart lines.The dynamic
borderColor
function generates a linear gradient fromtheme.primaryBlue
totheme.secondaryPurple
, enhancing the visual appeal of the chart lines.
102-124
: Add plugin for drawing dashed line from tooltip to x-axis.The
line-draw
plugin correctly draws a dashed line from the tooltip's active point to the x-axis, improving data readability.
Code Climate has analyzed commit f988e09 and detected 1 issue on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
|
PR-Codex overview
The focus of this PR is to customize tooltip positioning and line color gradients in Chart.js components.
Detailed summary
Summary by CodeRabbit
New Features
TimeSeriesChart
with gradient-based border colors and a new line-draw plugin for better data point visualization.Improvements
Visual Enhancements