MCPcopy
hub / github.com/timqian/chart.xkcd

github.com/timqian/chart.xkcd @v2.0.12 sqlite

repository ↗ · DeepWiki ↗ · release v2.0.12 ↗
57 symbols 141 edges 19 files 1 documented · 2%
README

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

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

Core symbols most depended-on inside this repo

show
called by 7
src/components/Tooltip.js
hide
called by 7
src/components/Tooltip.js
update
called by 7
src/components/Tooltip.js
addFont
called by 7
src/utils/addFont.js
addFilter
called by 7
src/utils/addFilter.js
addLegend
called by 6
src/utils/addLegend.js
_getBackgroundHeight
called by 3
src/components/Tooltip.js
_generateTipItem
called by 2
src/components/Tooltip.js

Shape

Method 32
Class 16
Function 9

Languages

TypeScript100%

Modules by API surface

src/components/Tooltip.js11 symbols
src/Radar.js7 symbols
src/Combined.js6 symbols
src/XY.js5 symbols
src/StackedBar.js5 symbols
src/Pie.js5 symbols
src/Line.js5 symbols
src/Bar.js5 symbols
src/utils/addLabels.js3 symbols
src/utils/addAxis.js2 symbols
src/utils/addLegend.js1 symbols
src/utils/addFont.js1 symbols

Dependencies from manifests, versioned

@eslint/js9.0.0 · 1×
d3-axis1.0.12 · 1×
d3-scale3.3.0 · 1×
d3-selection1.4.1 · 1×
d3-shape1.3.7 · 1×
dayjs1.8.17 · 1×
eslint10.5.0 · 1×
gh-pages6.3.0 · 1×
globals15.0.0 · 1×
terser5.36.0 · 1×
vite8.0.0 · 1×

For agents

$ claude mcp add chart.xkcd \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact