Guide

Embed a chart anywhere

Every chart is a URL that returns a PNG, so embedding is just an image tag.

1. Build the URL

Put your key, a type, and JSON data into the query string (URL-encode the JSON):

<img alt="Revenue"
  src="https://yakcharts.com/api/chart.png?apiKey=YOUR_API_KEY&type=line&title=Revenue&data=[[-1,1],[0,-5],[1,3],[2,10]]"/>

2. Email & Markdown

The same URL works in an HTML email or Markdown: ![Revenue](https://yakcharts.com/api/chart.png?...). For email, keep keys server-side or use a signed (hmac) URL.

3. Remove the watermark

Sign the request with an hmac of the query string (keyed by your account secret) to get an unwatermarked image. See the docs for details.