Add a sketchy, hand-drawn bar or line chart to a web page with a single script tag and a few lines of JavaScript.
Embed roughViz charts in a React or Vue project using the official wrapper packages.
Create a roughViz chart in a Python data notebook using the Python wrapper package.
roughViz.js is a JavaScript library for making charts that look like they were hand-drawn in pencil. Instead of clean, precise lines and fills, every chart has a slightly wobbly, sketched appearance. The library is built on top of D3 and rough.js, and is aimed at situations where you want to communicate a general trend or idea rather than exact numbers, or simply want a more informal, casual visual style. The library supports seven chart types: bar, horizontal bar, donut, line, pie, scatter, and stacked bar. You create a chart by selecting a container element in your HTML and passing in a configuration object that includes your data and any visual options you want to customize. Data can come from a plain JavaScript object with labels and values arrays, or from a URL pointing to a CSV or TSV file. Most visual properties can be tuned. The roughness setting controls how wobbly the lines are. The fill style controls how the interior of shapes is filled, with options like hatching, cross-hatching, and solid fills. You can also adjust fill weight, stroke color, stroke width, colors, fonts, padding, and margins for each chart type individually. Adding it to a project is straightforward: include it via a CDN script tag for quick use, or install it as an npm package for a build-tool workflow. Wrapper packages exist for React, Vue, and Python if you prefer to use roughViz within those ecosystems. The library is described by its author as useful for charts that show intent or generality rather than precision, or for charts that are meant to be fun or visually distinctive.
← jwilber on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.