Share a Highcharts chart

People choose Highcharts for the things a static image cannot do: click a column to drill into its components, drag the range selector across two years of stock data, toggle six series down to the two under discussion.

Then the chart gets shared as a PNG from the export server, and every one of those things is gone. The recipient sees the top level of the drilldown and a window somebody else picked.

Publish the page

Drag the HTML into the app, or POST it:

curl -fsS -X POST "https://commareports.com/api/v1/reports" \
  -H "Authorization: Bearer $COMMA_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d "$(jq -n --rawfile html chart.html \
        --arg t "Revenue by region — FY26 drilldown" '{title: $t, html: $html}')"

Report HTML renders with scripts enabled inside a sandboxed iframe (allow-scripts, no allow-same-origin), so Highcharts boots normally. The drilldown drills, the range selector selects, the tooltips follow the cursor, and the legend toggles series — for whoever opens the link, not just for you.

Load the modules you actually use

A Highcharts page is usually several scripts:

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/drilldown.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>

Two things worth checking before you publish:

  • Protocol. An http:// script inside an https:// page is blocked as mixed content with no visible error. Always https://.
  • Version pinning. code.highcharts.com/highcharts.js is whatever is current. For a report attached to a decision, pin (code.highcharts.com/11.4.8/highcharts.js) or inline the library, so the chart renders the same way after the next major release changes a default.

Fetch or embed the data — but pick deliberately

If the page pulls its series at runtime:

Highcharts.getJSON("data.json", function (data) { … });

publish the folder rather than the single file, so data.json uploads as an asset and the relative reference is rewritten to the uploaded copy. From a file:// origin that fetch is blocked outright, which is why the same page can work for you and render empty for a colleague.

If the dataset is small, embedding it in the page is simpler and makes the report a single self-contained file.

Refreshing data, one URL

# regenerate chart.html from the warehouse, then:
curl -fsS -X PATCH "https://commareports.com/api/v1/reports/$REPORT_ID" \
  -H "Authorization: Bearer $COMMA_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d "$(jq -n --rawfile html chart.html \
        --arg t "Revenue by region — week $(date +%V)" '{title: $t, html: $html}')"

The link in the channel keeps showing current numbers and the revision list is the history — see scheduled HTML reports. This is also how you avoid the "final_v3_FINAL.html" problem for a chart that gets regenerated every Monday.

What review adds

  • Anchored threads on the series under discussion — see commenting on HTML.
  • Revisions, so a number that changed between two readings is explainable.
  • Access per report — revenue charts are usually not public. Private, team, domain-gated or named reviewers; see the sharing model.

Limits

  • Entry HTML: 5 MB. Assets: 25 MB per file, 250 MB and 500 files total.
  • 60 requests/minute per token.

Try it

Comma is free — unlimited reports, unlimited commenters, unlimited revision history.

Publish a chart →

Related