techniq / techniq/layerchart

[HitCanvas] Find way to fully remove anti-aliasing of shapes

Open
#180 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.3k
Forks
41
Avg merge
2d 19h
Merged PRs (30d)
16

Description

This causes tooltip hiding (flickering) as the aliased color on the edges is not in the map. Might be able to set some kind of threshold to match, but that will slow down the lookup a good bit.

image

Sadly, image-rendering: pixelated (or any other value) is not the solution. https://developer.mozilla.org/en-US/docs/Web/CSS/image-rendering

There is also the r-tree approach to investigate, but I liked the simplicity of easy to debug nature of the HitCanvas approach.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at packages/layerchart/src/lib/components/HitCanvas.svelte around line 81 and inspect how aliased edge colors are looked up in the map. Investigate whether anti-aliasing can be removed without relying on image-rendering, and compare that path with the r-tree approach in issue 153. Done means shape edges no longer cause tooltip flickering while the hit-testing approach remains workable.

Written by the indexing model from the issue text.

Assessment

Tech stack
d3, typescript
Domain
data-visualization, frontend, performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.