Giter Club home page Giter Club logo

Comments (3)

techniq avatar techniq commented on August 25, 2024

@mhkeller gathering some changes I've made (or plan to) within LayerChart, some of which might be worth pushing upstream to LayerCake (such as full width Canvas). Integration with LayerChart contexts like TransformContext, GeoContext, and TooltipContext makes some of these changes impractical to move ATM.

from layerchart.

mhkeller avatar mhkeller commented on August 25, 2024

Thanks I'll keep an eye on it. What does full width Canvas do?

from layerchart.

techniq avatar techniq commented on August 25, 2024

If you applied a padding (such as <Chart padding={{ top: 60 }}>) and zoom or translate the canvas, the chart would be "clipped" since the <canvas> is absolute positioned and inset based on the padding. The change uses context.translate() and the full container size (which aligns the results with <svg transform="...">)

The Choropleth example demonstrated this (compare to an older commit preview).

Before After
image image

You have to scale/zoom or drag/translate to see the issue (not really an issue with most static charts). This would be a problem with more chart types, but I've mostly only focused on Canvas support for geo (since it typically benefits the most with complex geojson). Also hoping to find a fix for the infinite loop issue before I expand out too much (might wait til Svelte 5).

from layerchart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.