Giter Club home page Giter Club logo

Comments (10)

plouc avatar plouc commented on July 25, 2024 2

Started some tests with canvas

from nivo.

plouc avatar plouc commented on July 25, 2024 2

Now both BarCanvas and HeatMapCanvas support tooltips.

from nivo.

jfsiii avatar jfsiii commented on July 25, 2024

Rendering to <canvas> becomes very important as the data points and SVG/DOM nodes increase.

from nivo.

jfsiii avatar jfsiii commented on July 25, 2024

These look great. Will they also, eventually, be interactive and supported by the API? I know this is still really early. I'm just curious how you see them progressing.

Let me know if you'd like some help with canvas in nivo-api. I did some work a few years ago using node-canvas to return JPEGs, PNGs and data URIs.

Also, I noticed the images are a blurry on my retina display. I suspect the code needs to scale based on window.devicePixelRatio. This article gives more info about the required changes.

from nivo.

plouc avatar plouc commented on July 25, 2024

I think for basic shapes, interactivity will not be a problem but for things like line charts, stream graphs or sankey (links), that's another story :/

I though of something like node-canvas for the API, even considered headless chrome (the tooling around it seems quite active), but the problem with both is it requires a more complex setup (cario or chrome install), but it could be an opt-in. If you want to try something, you're more than welcome :)

On my retina display it's also blurry, thank you for the link, already used it when playing with pixi.js.

from nivo.

plouc avatar plouc commented on July 25, 2024

Added property pixelRatio which fallback on window.devicePixelRatio, all those changes are available in [email protected] and available on the demo.

from nivo.

jfsiii avatar jfsiii commented on July 25, 2024

@plouc Awesome! This looks great. Nice, quick, work

from nivo.

plouc avatar plouc commented on July 25, 2024

New chart supported:

from nivo.

plouc avatar plouc commented on July 25, 2024

http://nivo.rocks/#/components?q=canvas

from nivo.

plouc avatar plouc commented on July 25, 2024

I'm closing this issue as there is now canvas support for few charts => http://nivo/rocks/#/components?filter=Canvas

from nivo.

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.