{"id":26576493,"url":"https://github.com/getsentry/chartcuterie","last_synced_at":"2025-06-21T08:06:47.612Z","repository":{"id":37852690,"uuid":"341726247","full_name":"getsentry/chartcuterie","owner":"getsentry","description":"NodeJS service to render charts as images. Uses node-canvas + echarts","archived":false,"fork":false,"pushed_at":"2025-06-20T20:55:46.000Z","size":1115,"stargazers_count":26,"open_issues_count":3,"forks_count":4,"subscribers_count":45,"default_branch":"master","last_synced_at":"2025-06-20T21:46:08.104Z","etag":null,"topics":["tag-production"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getsentry.png","metadata":{"funding":{"custom":["https://sentry.io/pricing/","https://sentry.io/"]},"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-02-24T00:06:12.000Z","updated_at":"2025-06-20T20:37:09.000Z","dependencies_parsed_at":"2024-04-23T10:06:42.999Z","dependency_job_id":"0deffd39-c299-4b9f-84d4-4fe67cee1898","html_url":"https://github.com/getsentry/chartcuterie","commit_stats":{"total_commits":135,"total_committers":21,"mean_commits":6.428571428571429,"dds":0.6296296296296297,"last_synced_commit":"d8ad5307725bf1cf783e4b1dc5e99f3933e56c42"},"previous_names":["getsentry/chart-renderer"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/getsentry/chartcuterie","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsentry%2Fchartcuterie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsentry%2Fchartcuterie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsentry%2Fchartcuterie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsentry%2Fchartcuterie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getsentry","download_url":"https://codeload.github.com/getsentry/chartcuterie/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsentry%2Fchartcuterie/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261025342,"owners_count":23099077,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["tag-production"],"created_at":"2025-03-23T03:21:19.411Z","updated_at":"2025-06-21T08:06:42.591Z","avatar_url":"https://github.com/getsentry.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/getsentry/chartcuterie/master/assets/logo.svg\" alt=\"Chartcuterie\" width=\"200\" /\u003e\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003e\n\tChartcuterie offers fresh slices and dices of absolutely delectable graphs.\n\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"https://github.com/getsentry/chartcuterie/workflows/build/badge.svg\" alt=\"build\" /\u003e\n\t\u003ca href=\"https://www.npmjs.com/package/@sentry/chartcuterie\"\u003e\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/@sentry/chartcuterie\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nSentry's _Chartcuterie_ generates charts as images, specifically designed to\naid in unfurling Sentry links with charts into slack, displaying useful charts\nin emails, and anywhere else outside of a browser environment where charts add\nvaluable context.\n\n`echarts` + `node-canvas` is used internally to produce the charts.\n\n_Looking for information on running Chartcuterie with Sentry? [Check the\ndevelop docs](https://develop.sentry.dev/services/chartcuterie/)._\n\n## Documentation\n\nChartcuterie can be run in two different modes\n\n * **`chartcuterie render`** - Accepts JSON data on stdin and writes out the\n   produced image to stdout.\n\n * **`chartcuterie server`** - Runs the service as an HTTP API.\n   It will accept a JSON body at `POST /render` and will respond with the image\n   when successful.\n\n### Configuration\n\nA configuration module is required to start Chartcuterie in any rendering mode.\nThis module is used to specify how to transform data received to a valid\n[`EChart.Option`](https://echarts.apache.org/en/option.html#title) object\nstructure.\n\nA simple configuration module might look like this:\n\n```tsx\nimport world from 'echarts/map/json/world.json';\n\nconst renderConfig = {\n  /**\n   * Each key in the configuration objects represents a rendering style\n   * configurtion. When passing your render data to chartcuterie you'll use\n   * this key to indicate what rendering config to use to produce your chart.\n   */\n  'myStyle:example': {\n    key: 'myStyle:example',\n\n    /**\n     * The height and width of the produced image is specified as part of the\n     * render configuration.\n     */\n    height: 200,\n    width: 600,\n\n    /**\n     * This function is used to transform the `data` passed in your rendering\n     * data JSON into a valid `EChart.Option`.\n     */\n    getOption: data =\u003e {\n      return {series: data};\n    },\n  },\n\n  // More rendering styles specified in this object.\n}\n\nconst config = {\n  renderConfig,\n  /**\n   * A version should be provided, which may be useful for observability\n   * purposes.\n   */\n  version: '1.0.0-example.0',\n  init: echarts =\u003e {\n    echarts.registerMap('world', world);\n  },\n}\n\nmodule.exports = config;\n```\n\n#### Configuration resolution\n\nThe configuration module may be specified as either a filepath or alternatively\na HTTP URL. Specifying the file as a HTTP URL may be useful when your\nconfiguration file is produced by a different service, such is the case for\nSentry, where the configuration is co-located with Sentry's frontend chart\nrendering modules.\n\n\u003e **IMPORTANT**: When resolving the configuration over HTTP be **ABSOLUTELY\n\u003e SURE** that the configuration file can be trusted and will not contain any\n\u003e malicious JavaScript. The configuration file is evaluated with the same\n\u003e privileges the running instance of chartcuterie has!\n\n### Rendering charts\n\nTo render a chart in any rendering mode, you will need to supply some\n\"rendering data\". That is a JSON object that looks like this:\n\n```js\n{\n  /**\n   * The request ID can be useful for tracing your render request\n   */\n  \"requestId\": \"\u003csome unique request identifier\u003e\",\n\n  /**\n   * The rendering style as specified in your configuration\n   */\n  \"style\": \"myStyle:example\",\n\n  /**\n   * The data object is totally arbitrary and is up to your configuration's\n   * `getOption` function to translate it into a valid echarts series.\n   */\n  \"data\": \"\u003canything you want here\u003e\"\n}\n```\n\n## Development\n\nThis project uses [`volta`](https://volta.sh/) to manage the node toolchain, be\nsure to have Volta installed and configured. The Dockerfile specifies the\nsystem dependencies. If you want to run locally on macOS you'll need to install\nthem yourself:\n\n```bash\nbrew install cairo pango\n```\n\n * `yarn lint` - Check for Typescript and Eslint errors / warnings.\n * `yarn test` - Run full test suite\n * `yarn build` - Builds the application\n * `yarn watch` - Watches source files for changes and recompiles using `tsc` on changes.\n\nTo start the service you will need to specify a `config` file. See the\ndocumentation above for examples of simple configuration you can use for\ntesting.\n\nGenerally running like this is sufficient\n\n```\nnode lib/index.js --config=exampleConfig.js render \u003c example-data.json \u003e example.png\n```\n\n## License\n\nChartcuterie is licensed under the Apache License 2.0.\n","funding_links":["https://sentry.io/pricing/","https://sentry.io/"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetsentry%2Fchartcuterie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetsentry%2Fchartcuterie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetsentry%2Fchartcuterie/lists"}