ChartPNG

v0.2.0
dev.chartpng/chartpng Checked 21 hours ago Published 29 days ago

Draw Chart.js charts as PNG images: a shareable image URL or the PNG itself.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

chart_url Chart image URL

Get a public PNG URL for a chart. Use it when the chart goes into an email, a Slack or chat message, a PDF or a Markdown document (as ![title](url)). The data travels in the URL: anyone with the URL can see the chart and its data, so for confidential data use render_chart.

ParameterTypeDescription
config *objectA Chart.js v4 configuration as plain JSON (no functions), e.g. {"type":"bar","data":{"labels":[...],"datasets":[{"label":"...","data":[...]}]}}
backgroundstringCSS color, default white
heightintegerPixels, default 360
widthintegerPixels, default 600

render_chart Render chart image

Render a chart and return the PNG image itself, to look at it or save it as a file. Takes configs up to 16 KB of JSON, larger than a URL allows.

ParameterTypeDescription
config *objectA Chart.js v4 configuration as plain JSON (no functions), e.g. {"type":"bar","data":{"labels":[...],"datasets":[{"label":"...","data":[...]}]}}
backgroundstringCSS color, default white
heightintegerPixels, default 360
widthintegerPixels, default 600