Skip to content
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

Feature: expand crosshair on edges #304

Merged
merged 2 commits into from
Jul 25, 2024

Conversation

dan12411
Copy link
Contributor

@dan12411 dan12411 commented Jul 25, 2024

Description

When we like to join two chart with crosshair move together, the join side padding must be zero, otherwise crosshair will be cut like image below:

cutted_crosshair

ps. By adding 50 px bottom padding on top chart.

Solution

By adding List<bool> expandEdges, we can decide crosshair expand on left, top, right and bottom directions respectively. Default value is [false, false, false, false]. And only work on RectCoord. - de0a30b

if we add line like this in top chart, we get no-cut crosshair:

  crosshair: CrosshairGuide(
     ...
     expandEdges: [false, false, false, true],
  ),

expanded_crosshair

Additional fix for show LabelBackgroundMapper - 1857d18

@dan12411 dan12411 force-pushed the change/expand_crosshair_to_edges branch from 95a6cd4 to 1857d18 Compare July 25, 2024 06:32
@entronad entronad merged commit adfe987 into entronad:main Jul 25, 2024
1 check passed
@dan12411 dan12411 deleted the change/expand_crosshair_to_edges branch July 26, 2024 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants