Code Monkey home page Code Monkey logo

Comments (4)

g3o2 avatar g3o2 commented on May 22, 2024 1

BTW I am not even sure that you need to write your own renderer, there is already a svg, canvas and webgl renderer. Maybe some CSS or other middle solution is already sufficient...

Edit: According to feedback from one of the vega core developers, implementing xkcd kind of style while preserving the benefits from the vega ecosystem would probably require to:

  • write a post-processor on the vega-scenegraph to implement the sketchy effect on the marks (e.g. lines, axes, gridlines, bars, etc.). For completeness, here is an article on how vega works internally;

  • create a customised tooltip. For this purpose, one can tap into the vega-tooltip API for inserting a custom tooltip handler. There is also the possibility of theming the already existing tooltip via CSS;

  • the rest (e.g. font, font-size, etc.) can be implemented by a vega config specification, which sets the visualization’s theme. The guide to vega guides may be useful for experimenting.

from chart.xkcd.

timqian avatar timqian commented on May 22, 2024

Thanks for the suggestion, I will look into it to see if it easy to do so when I have time

from chart.xkcd.

g3o2 avatar g3o2 commented on May 22, 2024

To save you even more time, please check this link ;)

from chart.xkcd.

jgehrcke avatar jgehrcke commented on May 22, 2024

Long-term matplotlib user here. Used mpl's xkcd style quite a bit, too.
I'm digging into https://github.com/altair-viz/altair right now which is based on Vega. Would love to be able to use an xkcd style in that eco system, too!

Thanks for expressing all these thoughts @g3o2.

from chart.xkcd.

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.