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

Add tooltip shadow to line chart #1

Closed
wants to merge 4 commits into from

Conversation

Sosssen
Copy link
Collaborator

@Sosssen Sosssen commented Nov 5, 2024

hi:)

this PR resolves imaNNeo#1767

i've added 3 params to LineTouchTooltipData for tooltip shadow:

  • shadowColor - color of the shadow
  • shadowBlur - sigma value of mask filter blur (how much will shadow be blurred)
  • shadowOffset - offset of the shadow (related to tooltip)

please check the image below to see example of changes:)

image

and the code code of LineTouchTooltipData from example image:

LineTouchData get lineTouchData => LineTouchData(
        touchTooltipData: LineTouchTooltipData(
          getTooltipColor: (touchedSpot) => Colors.black,
          shadowColor: Colors.white.withOpacity(0.25),
          shadowBlur: 4,
          shadowOffset: const Offset(0, 4),
        ),
      );

@Sosssen Sosssen requested a review from pdenert November 5, 2024 17:53
@Sosssen Sosssen self-assigned this Nov 5, 2024
@Sosssen Sosssen force-pushed the feature/line-chart-tooltip-shadow branch from d5a0b94 to 7af14da Compare November 5, 2024 18:05
@Sosssen Sosssen marked this pull request as ready for review November 5, 2024 22:50
@Sosssen Sosssen closed this Nov 6, 2024
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.

Add shadow to line chart's tooltip
1 participant