Repository navigation
[NoQA][Insights Polish] Update line chart's line, points and hover #103050
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
Merged
cristipaval
merged 9 commits into
Expensify:main
from
software-mansion-labs:olgierd/insights-line-chart-polish
Oct 6, 2026
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d81bac4
Adjust line chart
OlGierd03 af20f0d
Move line chart constants to VictoryTheme
OlGierd03 b4f2208
Fix failing tests
OlGierd03 48d1c1f
Merge main and resolve conflict
OlGierd03 0f7aa18
Visual improvements in line with the design
OlGierd03 4438a24
Revert unrelated fix
OlGierd03 6d37515
Read single-point band width from the x scale range instead of plotAr…
OlGierd03 5906e30
Merge main and resolve conflict
OlGierd03 074b691
Limit line chart hover area
OlGierd03 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| import type {DerivedValue, SharedValue} from 'react-native-reanimated'; | ||
|
|
||
| import {Circle, Group, Line} from '@shopify/react-native-skia'; | ||
| import React from 'react'; | ||
| import {useDerivedValue} from 'react-native-reanimated'; | ||
|
|
||
| type ActivePointIndicatorProps = { | ||
| /** Canvas position of the active data point */ | ||
| position: DerivedValue<{x: number; y: number}>; | ||
|
|
||
| isActive: SharedValue<boolean>; | ||
|
|
||
| /** Top boundary of the plot area, where the guideline starts */ | ||
| top: number; | ||
|
|
||
| /** Bottom boundary of the plot area, where the guideline ends */ | ||
| bottom: number; | ||
|
|
||
| dotRadius: number; | ||
| dotColor: string; | ||
| guidelineColor: string; | ||
| guidelineOpacity: number; | ||
| }; | ||
|
|
||
| const GUIDELINE_WIDTH = 2; | ||
|
|
||
| function ActivePointIndicator({position, isActive, top, bottom, dotRadius, dotColor, guidelineColor, guidelineOpacity}: ActivePointIndicatorProps) { | ||
| const opacity = useDerivedValue(() => (isActive.get() ? 1 : 0)); | ||
| const guidelineStart = useDerivedValue(() => ({x: position.get().x, y: top})); | ||
| const guidelineEnd = useDerivedValue(() => ({x: position.get().x, y: bottom})); | ||
| const cx = useDerivedValue(() => position.get().x); | ||
| const cy = useDerivedValue(() => position.get().y); | ||
|
|
||
| return ( | ||
| <Group opacity={opacity}> | ||
| <Line | ||
| p1={guidelineStart} | ||
| p2={guidelineEnd} | ||
| color={guidelineColor} | ||
| opacity={guidelineOpacity} | ||
| strokeWidth={GUIDELINE_WIDTH} | ||
| strokeCap="round" | ||
| /> | ||
| <Circle | ||
| cx={cx} | ||
| cy={cy} | ||
| r={dotRadius} | ||
| color={dotColor} | ||
| /> | ||
| </Group> | ||
| ); | ||
| } | ||
|
|
||
| export default ActivePointIndicator; | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.