• Stars
    star
    7,544
  • Rank 4,835 (Top 0.1 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 5 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

xkcd styled chart lib

Who is using chart.xkcd?

About

Chart.xkcd is a chart library that plots “sketchy”, “cartoony” or “hand-drawn” styled charts.

Check out the documentation for more instructions and links, or try out the examples, or chat with us in Slack

Sponsors

琚致远 | Bytebase | Madao | SecondState

Become a sponsor

Quick start

It’s easy to get started with chart.xkcd. All that’s required is the script included in your page along with a single <svg> node to render the chart.

In the following example we create a line chart.

Preview and edit on codepen

<svg class="line-chart"></svg>
<script src="https://cdn.jsdelivr.net/npm/chart.xkcd@1/dist/chart.xkcd.min.js"></script>
<script>
  const svg = document.querySelector('.line-chart')

  new chartXkcd.Line(svg, {
    title: 'Monthly income of an indie developer',
    xLabel: 'Month',
    yLabel: '$ Dollars',
    data: {
      labels:['1', '2', '3', '4', '5', '6','7', '8', '9', '10'],
      datasets: [{
        label: 'Plan',
        data: [30, 70, 200, 300, 500 ,800, 1500, 2900, 5000, 8000],
      }, {
        label: 'Reality',
        data: [0, 1, 30, 70, 80, 100, 50, 80, 40, 150],
      }]
    },
    options: {}
  });
</script>

Contributing

  • Code: read the contributing.md file
  • Financial:
    • Become a patron - chart.xkcd is an MIT-licensed open source project with its ongoing development made possible entirely by the support of my patrons. If you like this tool, please consider supporting my work by becoming a patron.
    • Fund issues on issuehunt - Issues on chart.xkcd can be funded by anyone and the money will be distributed to contributors.

Star History

Star History Chart

More Repositories

1

chinese-independent-blogs

中文独立博客列表
JavaScript
18,087
star
2

openprompt.co

Create. Use. Share. ChatGPT prompts
JavaScript
1,133
star
3

hacker-job-trends

Play with hackernews' "who is hiring"
JavaScript
745
star
4

sideproject.guide

Notes on how to build side projects
JavaScript
468
star
5

resumd

Write resume with markdown
JavaScript
418
star
6

gql-generator

Generate queries from graphql schema, used for writing api test.
JavaScript
361
star
7

star-history-plugin

[Deprecated] project moved to https://github.com/timqian/star-history as a mono repo
CSS
265
star
8

js-code-structure

Analyse the structure of your js project (relations between js files)
HTML
166
star
9

my-headline

Deprecated, visit https://github.com/headllines
JavaScript
98
star
10

one-goal

A macOS menu bar APP helps you stay focused
Swift
89
star
11

auth-api

Auth part of your RESTful API
JavaScript
51
star
12

weekly-report

weekly report from git commits
JavaScript
49
star
13

scientific-computation-libs-in-javascript

Feel free to PR
40
star
14

my-headline-crawler

Crawler for my-headline
HTML
37
star
15

mathlab

Aimed to be the best matrix lab in javascript
JavaScript
34
star
16

modsoul

🔨🔨莫得灵魂乐团
C++
27
star
17

v2ex-online-number

V2EX 的心电图(在线人数随时间的变化)
HTML
17
star
18

dapp-possiblities

Explore possible usage of dapp
Solidity
16
star
19

letcode.ai

JavaScript
16
star
20

music-lab

JavaScript
13
star
21

sponsor.cat

🔨 A decentralized funding platform. Powered by NFTs.
JavaScript
12
star
22

follows-you

Adds a tag indicating whether a user follows you on GitHub
JavaScript
11
star
23

Online_Snake_Battle

一个HTML5 实时对战小游戏,使用了socket.io
HTML
10
star
24

hackernotes

Record news/ideas/thoughts interests me, update daily(hopefully)
8
star
25

my-notes

7
star
26

viti

A 100 line shadowsocks like tunneling proxy in nodejs.
JavaScript
7
star
27

anahub

open-source / serverless / self-hostable google-analytics alternative 🔨🔨comming soon...
JavaScript
7
star
28

invoice-automation

JavaScript
7
star
29

GiG

Content Management System using github as its backend
JavaScript
6
star
30

0daydown_get_baidu_pan

get baidu pan link and password from feeds of www.0daydown.com
HTML
6
star
31

express-rate-limit-redis

An express rate-limiting middleware using redis as its storage
TypeScript
5
star
32

acl-matrix

Use matrix to describe your application's access control list (ACL)
JavaScript
5
star
33

timqian.github.io

HTML
4
star
34

v2.run

3
star
35

murmur

🔨WIP🔨 A serverless, customizable comment system
JavaScript
3
star
36

things-to-build

3
star
37

SSNN

Simple Spiking Neural Networks
JavaScript
2
star
38

issue-blog-view

Writing blog using github issue? Then this chrome extension is for you
JavaScript
2
star
39

comment-chain

comment on every webpage
2
star
40

tplayer

JavaScript
2
star
41

json2landing

Generate landing page from json
JavaScript
2
star
42

serverless-component-http

WIP 🔨 Deploy any Node.js http server serverlessly. Use any framework you like - Vanilla HTTP server, express, koa, apollo-server...
JavaScript
2
star
43

zip-performance-comparsion

JavaScript
2
star
44

OpenPrice

TypeScript
2
star
45

2019nCoV-map

2019 nCoV 数据市级可视化
2
star
46

timqian

1
star
47

es6-backend-starter

backend starter for myself
1
star
48

make-a-cpu

数电学习笔记
1
star
49

reg-match-arr

JavaScript
1
star
50

sls-action

JavaScript
1
star
51

cos-global-acceleration-speed-tests

JavaScript
1
star
52

blog

My personal blog (in English)
CSS
1
star
53

get-unique-name

Generate a unique name used for creating tmp folder/file/simpleId; with no dependency, using Date and Math.random
JavaScript
1
star
54

stocks

试图对股票市场做一点分析
HTML
1
star
55

buildAComputer

My implementation of the project: [From NAND to Tetris](http://nand2tetris.org/)
Assembly
1
star
56

folder-ponder

Get details of a folder(info of each file) quickly
JavaScript
1
star
57

images

hosting my images, using picGo
1
star
58

test-permission

JavaScript
1
star
59

.vim

1
star
60

npm-package-template

A dead-simple template to write and publish npm packages
JavaScript
1
star
61

HackEngine-offline-7-openprompt-copilot-for-prompts

TypeScript
1
star
62

adm-zip-test

JavaScript
1
star
63

rgba-to-img-to-rgba

Transform img to rgba data && transform rgba data array to img
JavaScript
1
star