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

Cannot properly fill mesh hexagons #33

Closed
MocanuMarius opened this issue Sep 5, 2022 · 3 comments
Closed

Cannot properly fill mesh hexagons #33

MocanuMarius opened this issue Sep 5, 2022 · 3 comments

Comments

@MocanuMarius
Copy link

MocanuMarius commented Sep 5, 2022

All the hexagons generated by the associated hexbin.mesh function are basically half-hexagons, which makes filling via a svg "fill" quite impossible. The use-case is to have them look just like any other hexbin.hexagon in a lot of use-cases where they need a specific color.

I removed this .slice(0,4) from the library and it seems to work properly now ,even if i'm still missing one top left side of the hexagon.

It would be great to have some support to disable this half-hexagon optimization, not only it's useful for coloring the mesh but also hexes are not cut at the edges anymore.

Here's how it looks like:
image

And notice how the mesh gets cut at the top left corners
image

@Fil
Copy link
Member

Fil commented Sep 5, 2022

The mesh is optimized to allow a stroke to be added just once on each edge. In the use case you are describing, it is recommended to create a background (with rect?) below the mesh.

@Fil Fil closed this as not planned Won't fix, can't repro, duplicate, stale Sep 5, 2022
@MocanuMarius
Copy link
Author

Is there such a thing as a hexagonal background ?

@Fil
Copy link
Member

Fil commented Sep 5, 2022

No, you'd have to fill a whole rect beneath.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants