{"id":29215337,"url":"https://github.com/mbejda/plotlychartexport","last_synced_at":"2025-07-03T00:09:21.125Z","repository":{"id":57325996,"uuid":"114179824","full_name":"mbejda/plotlychartexport","owner":"mbejda","description":"Export Plot.ly charts on the server","archived":false,"fork":false,"pushed_at":"2017-12-15T11:40:50.000Z","size":775,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-11T11:16:19.966Z","etag":null,"topics":["chart","charts","nodejs","plotly","plotlyjs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/plotlychartexport","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mbejda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-13T23:33:54.000Z","updated_at":"2021-04-06T12:46:39.000Z","dependencies_parsed_at":"2022-09-21T01:52:42.337Z","dependency_job_id":null,"html_url":"https://github.com/mbejda/plotlychartexport","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mbejda/plotlychartexport","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbejda%2Fplotlychartexport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbejda%2Fplotlychartexport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbejda%2Fplotlychartexport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbejda%2Fplotlychartexport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbejda","download_url":"https://codeload.github.com/mbejda/plotlychartexport/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbejda%2Fplotlychartexport/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259997876,"owners_count":22943699,"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":["chart","charts","nodejs","plotly","plotlyjs"],"created_at":"2025-07-03T00:09:20.382Z","updated_at":"2025-07-03T00:09:21.046Z","avatar_url":"https://github.com/mbejda.png","language":"JavaScript","readme":"![](https://www.mbejda.com/content/images/2017/12/Copy-of-oh-javascript--4-.png)\n# Plot.ly Chart Export\n*PlotlyChartExport* uses Phantom.js to render plot.ly charts on the server. It crops the chart, base64 encodes it and returns the encoded chart in a resolving promise.\nIt does not rely on the filesystem nor does it rely on graphics libraries like `Cairo` making it an effective chart rendering solution for serverless environments.\n\n\n- Only 1 Dependency\n- Works in Serverless Environments\n- Size \u003c 10MB\n\n\n### Installation\n```\nnpm install plotlychartexport --save\n```\n\n### Usage\n```javascript\n/// include library\nconst exp = require('plotlychartexport');\n\n/// define plot.ly data properties\nlet trace1 = {\n    x: [1, 2, 3, 4],\n    y: [10, 15, 13, 17],\n    type: 'scatter'\n};\nlet trace2 = {\n    x: [1, 2, 3, 4],\n    y: [16, 5, 11, 9],\n    type: 'scatter'\n};\n\n/// define plot.ly layout\nlet layout = {\n    title: 'Line and Scatter Plot'\n};\n\n/// run render command\nexp.render([trace1, trace2], layout).then((base) =\u003e {\n    console.log(base); /// base64\n}, (error) =\u003e {\n    console.error(error);\n})\n\n```\n\n## Create a Serverless Chart Export\nCheckout this tutorial I made on how to create serverless chart exports on AWS to see the module in action.\n[https://www.mbejda.com/creating-serverless-plotly-chart-exports](https://www.mbejda.com/creating-serverless-plotly-chart-exports/)\n\n\n\n\nIf you are experiencing any issues with this module open up a ticket and send me a tweet.\n[@notMiloBejda](https://twitter.com/notMiloBejda)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbejda%2Fplotlychartexport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbejda%2Fplotlychartexport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbejda%2Fplotlychartexport/lists"}