Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@ _Fixes:_
- Fixed an issue where the chart constructor was sometimes incorrectly set, causing the export to fail
- Added referrers to CDN cache fetches on first startup/install.
- Fixed an issue that would sometimes cause cause a crash due to fail due to `Accept-Ranges` headers
- Corrected the `Node.js Module` example in the README.
- Fixed the warning message when the the default `resources.json` file is not found.
- Fixed the problem with the lack of the `instr` value, when the `options` is set instead

_New Features:_

- Added proxy authentication [(#631)](https://github.com/highcharts/node-export-server/issues/631).

_New features:_

- Made the temporary Puppeteer directory (`PUPPETEER_TEMP_DIR`) (till now, `'./tmp'`) configurable by the user [(#567)](https://github.com/highcharts/node-export-server/issues/567).


# 4.0.2

_Hotfix_:
Expand Down
31 changes: 17 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -584,20 +584,23 @@ const options = {
}
};

// Initialize export settings with your chart's config
const exportSettings = exporter.setOptions(options);

// Must initialize exporting before being able to export charts
await exporter.initExport(exportSettings);

// Perform an export
await exporter.startExport(exportSettings, async (error, info) => {
// The export result is now in info
// It will be base64 encoded (info.data)

// Kill the pool when we are done with it
await exporter.killPool();
});
// Logic must be triggered in an asynchronous function
(async () => {
// Initialize export settings with your chart's config
const exportSettings = exporter.setOptions(options);

// Must initialize exporting before being able to export charts
await exporter.initExport(exportSettings);

// Perform an export
await exporter.startExport(exportSettings, async (error, info) => {
// The export result is now in info
// It will be base64 encoded (info.result)

// Kill the pool when we are done with it
await exporter.killPool();
});
})();
```

## CommonJS support
Expand Down
4 changes: 2 additions & 2 deletions dist/index.cjs

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion dist/index.esm.js

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions dist/index.esm.js.map

Large diffs are not rendered by default.

Loading