{"id":16086616,"url":"https://github.com/emaringolo/seaside-plotlyjs","last_synced_at":"2025-06-19T20:40:04.628Z","repository":{"id":43183168,"uuid":"423293938","full_name":"eMaringolo/seaside-plotlyjs","owner":"eMaringolo","description":"Seaside wrappers for Plotly.js","archived":false,"fork":false,"pushed_at":"2022-12-11T00:13:28.000Z","size":70,"stargazers_count":7,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-02T12:52:13.855Z","etag":null,"topics":["charts","pharo","plotlyjs","plotting","seaside","smalltalk","vastplatform","web"],"latest_commit_sha":null,"homepage":"","language":"Smalltalk","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/eMaringolo.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":"2021-11-01T00:38:31.000Z","updated_at":"2022-11-29T18:31:42.000Z","dependencies_parsed_at":"2023-01-26T11:25:26.371Z","dependency_job_id":null,"html_url":"https://github.com/eMaringolo/seaside-plotlyjs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eMaringolo/seaside-plotlyjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eMaringolo%2Fseaside-plotlyjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eMaringolo%2Fseaside-plotlyjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eMaringolo%2Fseaside-plotlyjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eMaringolo%2Fseaside-plotlyjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eMaringolo","download_url":"https://codeload.github.com/eMaringolo/seaside-plotlyjs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eMaringolo%2Fseaside-plotlyjs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260827343,"owners_count":23068946,"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":["charts","pharo","plotlyjs","plotting","seaside","smalltalk","vastplatform","web"],"created_at":"2024-10-09T13:24:35.536Z","updated_at":"2025-06-19T20:39:59.619Z","avatar_url":"https://github.com/eMaringolo.png","language":"Smalltalk","readme":"\u003cimg src=\"https://avatars.githubusercontent.com/u/8545049?s=200\u0026v=4\" height=\"70\"\u003e \u003ca href=\"https://plotly.com/javascript/\"\u003e\u003cimg src=\"https://images.plot.ly/logo/plotlyjs-logo@2x.png\" height=\"70\"\u003e\u003c/a\u003e\n\n# seaside-plotlyjs\nThis library provides a wrapper, including a builder class and specific abstractions, to create [Plotly.js](https://plotly.com/javascript/) plots from your [Seaside](https://github.com/SeasideSt/Seaside) canvas classes.\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://plotly.com/javascript/\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/cldougl/plot_images/add_r_img/plotly_2017.png\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\n\n## Sample code\n\n\n```smalltalk\nrenderContentOn: html\n  | plotly |\n  html div id: 'plotContainer'.\n  plotly := html plotly: 'plotContainer'.\n  plotly\n    data:\n      {(PlotlyTrace scatter\n        name: 'Scatter series';\n        showlegend: true;\n        mode: 'markers';\n        x: (1 to: 10);\n        y: ((1 to: 10) collect: [ :each | 10 atRandom / 2 ]);\n        yourself).\n      (PlotlyTrace scatter\n        name: 'Line series';\n        showlegend: true;\n        x: (1 to: 10);\n        y: ((1 to: 10) collect: [ :each | 10 atRandom / 2 ]);\n        yourself)};\n    layout:\n      (PlotlyLayout new\n        title: (PlotlyText text: 'Simple plot');\n        width: 500 height: 300;\n        yourself).\n  plotly config beResponsive.\n  html document addLoadScript: plotly\n``` \n\n\n```smalltalk\nrenderContentOn: html\n  | plotly |\n  html div id: 'plotContainer'.\n  plotly := html plotly: 'plotContainer'.\n  plotly\n    data:\n      {(PlotlyTrace pie\n        hole: 0.4;\n        values: #(19 , 26 , 55);\n        labels: #('Residential' , 'Non-Residential' , 'Utility'))};\n    layout:\n      (PlotlyLayout new\n        title: (PlotlyText text: 'Donut Chart');\n        width: 500 height: 300;\n        yourself).\n  plotly config beResponsive.\n  html document addLoadScript: plotly\n```\n\n## Installation\n\n### Pharo 8.0 or newer\n\n```smalltalk\nMetacello new\n\trepository: 'github://emaringolo/seaside-plotlyjs/src';\n\tbaseline: 'Plotly';\n\tload.\n```\n\n### VAST Platform (VA Smalltalk) 10.0.02 or newer\n\n* Load `ENVY/Image Tonel support` feature\n* Load `ST: Server Smalltalk (SST) - Seaside` feature\n* Clone this repository to a local drive\n\n```smalltalk\n| loader path |\npath := (CfsPath named: 'path\\to\\repository'). \"Path to the cloned repository\"\nloader := TonelLoader readFromPath: path.\nloader\n\tcreatesHookMethods: true;\n\tbeUnattended;\n\tuseGitVersion;\n\tloadApplicationsForPackagesNamed: #('Seaside-Plotly-Core' 'Seaside-Plotly-Examples').\n```\n\n\n## Plotly.js library\n\nGiven that the full Plotly.js library is heavy (~3.5MB mimized) and it is common to [build a custom bundle](https://github.com/plotly/plotly.js/blob/master/CUSTOM_BUNDLE.md) with only the plots used, this wrapper doesn't provide a [FileLibrary](https://github.com/SeasideSt/Seaside/wiki/FileLibrary), and instead you have to link to the library, either by using a [CDN](https://plotly.com/javascript/getting-started/#plotlyjs-cdn) or downloading it and linking to the file location.\n\n\n```smalltalk\nupdateRoot: anHtmlRoot\n\tsuper updateRoot: anHtmlRoot.\n\tanHtmlRoot script url: 'https://cdn.plot.ly/plotly-2.4.2.min.js'.\n        \"...\"\n```\n\n## Examples\n\nAfter installing the default group, you can access `http://localhost:8080/plotly` to access an example component showing the different kind of plots, and the smalltalk code to produce them.\n\n## Future steps\nAdd more examples about how to create other kind of plots (Surface, Mesh), and multiple plots, axis sharing, etc.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femaringolo%2Fseaside-plotlyjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femaringolo%2Fseaside-plotlyjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femaringolo%2Fseaside-plotlyjs/lists"}