Transparent Background
transparent_backgroundTrueGenerate charts and graphs using Highcharts.js

Interactive example
Example code
Choose a language and copy a complete request using this example's HTML, CSS, and API options.
// dotnet add package HtmlCssToImage
using HtmlCssToImage;
using HtmlCssToImage.Models;
using HtmlCssToImage.Models.Requests;
using System.Collections.Generic;
using System.Text.Json.Nodes;
// In an application, use IHttpClientFactory through dependency injection:
// https://www.nuget.org/packages/HtmlCssToImage.DependencyInjection
using var httpClient = new HttpClient();
var client = new HtmlCssToImageClient(
httpClient,
new HtmlCssToImageOptions(
Environment.GetEnvironmentVariable("HCTI_API_ID")!,
Environment.GetEnvironmentVariable("HCTI_API_KEY")!));
var request = new CreateHtmlCssImageRequest
{
Html = """
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/series-label.js"></script>
<div id="container"></div>
<script>
Highcharts.chart('container', {
chart: {
animation: false
},
title: {
text: 'Solar Employment Growth by Sector, 2010-2016'
},
subtitle: {
text: 'Source: thesolarfoundation.com'
},
yAxis: {
title: {
text: 'Number of Employees'
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'middle'
},
plotOptions: {
series: {
animation: false,
label: {
connectorAllowed: false
},
pointStart: 2010
}
},
series: [{
name: 'Installation',
data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
}, {
name: 'Manufacturing',
data: [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434]
}, {
name: 'Sales & Distribution',
data: [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387]
}, {
name: 'Project Development',
data: [null, null, 7988, 12169, 15112, 22452, 34400, 34227]
}, {
name: 'Other',
data: [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111]
}],
responsive: {
rules: [{
condition: {
maxWidth: 500
},
chartOptions: {
legend: {
layout: 'horizontal',
align: 'center',
verticalAlign: 'bottom'
}
}
}]
}
});
</script>
""",
MsDelay = 200,
TransparentBackground = true,
};
using var result = await client.CreateImageAsync(request);
if (result.Success && result.Response is not null)
{
Console.WriteLine(result.Response.Url);
}
Request configuration
These values are sent with the HTML and CSS to control how HCTI loads the page and captures the final screenshot. You can change each one in the editor above.
transparent_backgroundTruems_delay200From code to screenshot
HTML/CSS to Image renders HTML and CSS in hosted Chrome, then captures the result as an image or PDF. Each example combines real source code with the API options used for the render, so it is both a working demo and a starting point for your own request.
Edit the source and options above to test changes in the browser, then render through the API to see the production result.
Yes. Open an example to inspect and edit its complete HTML, CSS, and render options. Use it as a starting point, then send the resulting request from your application.
Examples are complete API requests built from HTML and CSS. Templates are saved, reusable designs created in the visual editor and rendered repeatedly with different variable values.
Yes. HCTI can render HTML and CSS or capture a public webpage as an image, and it can generate PDFs when you need document output instead of a screenshot.
Send the example’s HTML, CSS, and request options from your application.
Use HCTI with MCP-enabled AI tools, Zapier, Make, and other automation platforms.
Start with a visual preset, customize it in the template editor, and render it repeatedly with dynamic values.
Keep exploring
Social card with a fun SVG background and highlighted text.
Explore example