Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
Chart Export

How to Capture Highcharts with Custom Text and CSS (PNG, SVG, JPG, and PDF)

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Highcharts options for chart text, styled mode for CSS-driven design, and the Export module for downloads. In a normal (non-styled) chart, set typography with options such as title.style, axis-label style, and legend-item styles. For a CSS-led design, enable chart.styledMode: true, load the matching highcharts.css, and override Highcharts’ documented classes. Then verify the exported file in the browser and Highcharts version you actually support: the on-screen SVG and exported output use related, but not identical, rendering paths.

Choose the capture route first

There are two practical ways to turn a styled Highcharts chart into an image or PDF:

Route Best for What leaves the browser Requirements and trade-offs
Client-side export Interactive applications, privacy-sensitive data, and simple deployment Nothing needs to be sent to Highsoft’s service PNG, JPEG, and SVG are local by default from Highcharts 12.3; PDF needs extra libraries and browser support varies
Self-hosted or public export server Unsupported browsers, centralized rendering, or server-controlled output Your chart configuration or SVG goes to the server you choose Operational responsibility, dependency management, and (for the public service) terms and fair-use limits

Highcharts recommends considering client-side export first. A self-hosted Node.js server using Puppeteer is the documented fallback when local support does not meet your requirements. The public export service requires Referer and User-Agent headers and may restrict excessive usage; read its terms and fair-use guidance before automating it.

Style custom text with Highcharts options

Keep three concerns separate: the words, their typography, and their position. Set the words with text; set appearance with a text style; position titles, legends, and axes with Highcharts layout options rather than CSS margins or padding.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Title and subtitle

Highcharts.chart('container', {
  title: {
    text: 'Monthly revenue',
    style: {
      fontFamily: 'Inter, Arial, sans-serif',
      fontSize: '24px',
      fontWeight: '700',
      color: '#172033'
    }
  },
  subtitle: {
    text: 'USD, trailing twelve months',
    style: {
      fontFamily: 'Inter, Arial, sans-serif',
      fontSize: '14px',
      color: '#5b6475'
    }
  },
  chart: { spacingTop: 28 }
});

Highcharts style properties use JavaScript camel case such as fontFamily, not CSS spelling such as font-family. Text can also contain inline spans when you need a small, local variation; keep layout changes in options.

Axis labels and legend items

Highcharts.chart('container', {
  xAxis: {
    labels: {
      style: {
        fontFamily: 'Inter, Arial, sans-serif',
        fontSize: '12px',
        color: '#4b5565'
      }
    }
  },
  yAxis: {
    title: {
      text: 'Orders',
      style: { fontFamily: 'Inter, Arial, sans-serif', color: '#172033' }
    },
    labels: {
      style: { fontFamily: 'Inter, Arial, sans-serif', color: '#4b5565' }
    }
  },
  legend: {
    itemStyle: {
      fontFamily: 'Inter, Arial, sans-serif',
      fontSize: '13px',
      fontWeight: '600',
      color: '#172033'
    },
    itemHoverStyle: { color: '#0b63ce' }
  }
});

Use the corresponding option for each text owner. A global page rule will not reliably override SVG text that Highcharts has styled through options.

Use styled mode for a CSS-first design

Set chart.styledMode: true to move presentational attributes such as fills, strokes, and font styles out of the SVG and into CSS. Load the version-matched stylesheet, then override its classes. The official Style by CSS guide documents the class names and recommends version-specific stylesheet URLs in production.

<link rel="stylesheet" href="https://code.highcharts.com/12.3.0/css/highcharts.css">
<style>
  .highcharts-root {
    font-family: Inter, Arial, sans-serif;
  }
  .highcharts-title {
    fill: #172033;
    font-size: 24px;
    font-weight: 700;
  }
  .highcharts-subtitle,
  .highcharts-axis-labels text {
    fill: #5b6475;
  }
  .highcharts-legend-item text {
    fill: #172033;
    font-size: 13px;
    font-weight: 600;
  }
  .highcharts-grid-line { stroke: #e5e7eb; }
</style>
Highcharts.chart('container', {
  chart: { styledMode: true },
  title: { text: 'Monthly revenue' },
  subtitle: { text: 'USD, trailing twelve months' },
  series: [{ name: 'Revenue', data: [12, 18, 15, 23, 28] }]
});

.highcharts-root is useful for inherited font settings. More specific series, axis, and legend classes let you target individual elements. If you mix styled mode with option-level presentation, make the precedence deliberate and test both the page and the export.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Export a styled chart in the browser

Load the required modules

Include Highcharts, the Exporting module, and (for the context menu and download buttons) the export-data or accessibility modules you use. A minimal page looks like this:

Rank #2
Sale
HTML and CSS: Design and Build Websites
  • HTML CSS Design and Build Web Sites
  • Comes with secure packaging
  • It can be a gift option
<script src="https://code.highcharts.com/12.3.0/highcharts.js"></script>
<script src="https://code.highcharts.com/12.3.0/modules/exporting.js"></script>
<div id="container" style="height:400px"></div>
<script>
const chart = Highcharts.chart('container', {
  chart: { styledMode: true },
  title: { text: 'Monthly revenue' },
  xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May'] },
  series: [{ name: 'Revenue', data: [12, 18, 15, 23, 28] }],
  exporting: {
    applyStyleSheets: true,
    scale: 2
  }
});
</script>

The exporting.applyStyleSheets API reference says this option retains user-applied CSS and is enabled by default in styled mode. Setting it explicitly makes intent clear, especially when a theme or wrapper changes defaults.

Trigger a download or print

// PNG, JPEG, SVG, or PDF (subject to the modules and browser support below)
chart.exportChart({ type: 'image/png' }, {
  title: { text: 'Monthly revenue — May' }
});

// Open the print dialog
chart.print();

The first argument selects the MIME type; the second supplies temporary export-only options. This is useful for a longer title or a larger font without changing the live chart. You can also use the built-in context menu configured by the Exporting module.

Understand scale, fonts, and PDF requirements

Highcharts’ Export module documents a default scale of 2: a 600×400 chart produces a 1200×800 raster image. Set exporting.scale to control this multiplier, or set explicit sourceWidth and sourceHeight when a fixed output size matters. The overview also notes that, from v12.3, external fonts supplied through CSS @font-face rules are included in exported images; explicitly setting fontFamily in export options disables that automatic font inclusion. Test your chosen font rather than assuming every browser and font format behaves identically.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

According to the client-side export guide, PNG, JPEG, and SVG export locally through exporting.js from v12.3.0 by default. Local PDF is different: it requires offline-exporting.js and its supporting libraries. Older or unsupported browsers may fall back to the export server unless you disable fallback. Check Highcharts’ supported-browser table for your audience before promising an entirely offline workflow.

Make CSS survive export reliably

  1. Pin matching versions. Use the same Highcharts version for JavaScript and highcharts.css; avoid an unversioned production stylesheet.
  2. Keep rules reachable. Export code can only reproduce styles it can read. Put critical rules in a loaded stylesheet, not in a component scope that is absent from the export document.
  3. Set applyStyleSheets. Leave it enabled in styled mode and verify the generated SVG or raster output.
  4. Wait for fonts. Create or export the chart after document.fonts.ready resolves when a web font is essential.
  5. Check contrast and clipping. Long custom titles, rotated labels, and dark-mode colors can fit on screen but clip at export dimensions. Increase chart spacing or set export dimensions.
await document.fonts.ready;
const chart = Highcharts.chart('container', options);
chart.exportChart({
  type: 'image/png',
  sourceWidth: 1200,
  sourceHeight: 800,
  scale: 1
});

When a server export is the better fit

Use a dedicated server when client-side browser support is insufficient, when rendering must be centralized, or when a private network must control the export environment. Highcharts’ server setup documentation describes a Node.js export server using Puppeteer that accepts chart configurations or SVG plus additional resources and renders PNG, JPG, PDF, or SVG. You own its browser version, fonts, concurrency, storage, and security posture.

A public server is simpler operationally, but your configuration or SVG leaves the browser. Include the required Referer and User-Agent headers, and follow the service’s fair-use rules. For confidential data, prefer local export or a self-hosted service.

Troubleshooting custom text and CSS

The title looks right on screen but wrong in PNG

Confirm that the export is using the same stylesheet and Highcharts version, and that exporting.applyStyleSheets is true. In styled mode, inspect the generated SVG for the expected class and computed style. If the title is clipped, increase spacingTop, margin, or the export width rather than adding CSS padding.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The custom web font disappears

Wait for document.fonts.ready, verify the font’s CORS and format configuration, and test the v12.3 font behavior. An explicit export fontFamily disables automatic inclusion of CSS @font-face fonts, so remove that override if you need Highcharts to include the loaded font.

PDF export fails while PNG works

Load offline-exporting.js and its supporting libraries for local PDF, or use a compatible export server. PNG, JPEG, and SVG being local does not imply that PDF has the same dependency set.

Labels or legend items overlap

Use Highcharts layout controls: adjust chart spacing, title and legend positions, label rotation, or explicit export dimensions. CSS margins and padding do not control the chart’s internal layout reliably.

Rank #4
Sale
Web Design with HTML, CSS, JavaScript and jQuery Set
  • Brand: Wiley
  • Set of 2 Volumes
  • A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers

The browser sends data to an unexpected service

Check whether your browser fell back to the public export server because of an unsupported browser or disabled local export. Disable fallback where appropriate, or configure a self-hosted server and inspect network requests.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo captures a rendered Highcharts page through one GET request. Cookie banners, newsletter popups, and chat widgets are removed before the shot; bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing result. Its MCP server gives Claude, Cursor, and other MCP clients take_screenshot, get_page_info, and capture_pdf tools.

For the API parameters and all 63 capture options, see the ScreenshotNeo documentation. This call saves a WebP image:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Equivalent Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Equivalent Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

You can request full-page or element captures, a viewport or device preset, retina scale, dark mode, custom CSS and JavaScript, selector waits, network-idle waits, hidden selectors, custom headers and cookies, geolocation, timezone, transparent backgrounds, resizing, caching TTLs, signed image links, asynchronous webhooks, bulk capture, PDFs, and HTML/CSS-to-image. ScreenshotNeo includes 1,000 screenshots per month free with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.

FAQ

Can I export only one series or annotation?

Yes. Temporarily hide unwanted series or elements with their Highcharts visibility and export options, then restore the live chart after the download completes.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Is an SVG always the most editable output?

Usually. SVG preserves vector geometry and text structure, but its appearance still depends on the CSS and fonts captured at export time. Validate it in the design or publishing tool that will consume it.

Should I use PNG or PDF for print?

Use PDF when the recipient needs a page-oriented document and your local PDF dependencies are available; use a sufficiently scaled PNG when a raster image is the required interchange format.

Frequently Asked Questions

Can I export only one series or annotation?

Yes. Temporarily hide unwanted series or elements with their Highcharts visibility and export options, then restore the live chart after the download completes.

Is an SVG always the most editable output?

Usually. SVG preserves vector geometry and text structure, but its appearance still depends on the CSS and fonts captured at export time. Validate it in the design or publishing tool that will consume it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Should I use PNG or PDF for print?

Use PDF when the recipient needs a page-oriented document and your local PDF dependencies are available; use a sufficiently scaled PNG when a raster image is the required interchange format.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.