{"id":13481153,"url":"https://github.com/koudelka/d3-message-sequence","last_synced_at":"2025-04-10T00:43:46.176Z","repository":{"id":66703401,"uuid":"46888046","full_name":"koudelka/d3-message-sequence","owner":"koudelka","description":"Dynamic message sequence charts for d3.","archived":false,"fork":false,"pushed_at":"2018-06-21T08:00:14.000Z","size":1085,"stargazers_count":101,"open_issues_count":2,"forks_count":12,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-10T00:43:42.670Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"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/koudelka.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-11-25T21:28:34.000Z","updated_at":"2024-11-27T17:25:55.000Z","dependencies_parsed_at":"2023-09-08T01:01:59.414Z","dependency_job_id":null,"html_url":"https://github.com/koudelka/d3-message-sequence","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koudelka%2Fd3-message-sequence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koudelka%2Fd3-message-sequence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koudelka%2Fd3-message-sequence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koudelka%2Fd3-message-sequence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koudelka","download_url":"https://codeload.github.com/koudelka/d3-message-sequence/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137998,"owners_count":21053775,"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":[],"created_at":"2024-07-31T17:00:49.216Z","updated_at":"2025-04-10T00:43:46.146Z","avatar_url":"https://github.com/koudelka.png","language":null,"funding_links":[],"categories":["Charts"],"sub_categories":[],"readme":"# Message Sequence Charting for D3\n\nA simple dynamic/static [message sequence chart](https://en.wikipedia.org/wiki/Message_sequence_chart) for [d3](http://d3js.org).\n\n### Dynamic\n![Dynamic Demo Image](https://raw.githubusercontent.com/koudelka/d3-message-sequence/master/doc/example.gif)\n\n### Static\n![Static Demo Image](https://raw.githubusercontent.com/koudelka/d3-message-sequence/master/doc/example_static.png)\n\n\n## Quick Start\n\nCheck out the [example](https://raw.githubusercontent.com/koudelka/d3-message-sequence/master/doc/example.html).\n\nIf you just want to generate a static chart, set the `fade` property to `0`.\n\n## Less Quick Start\n\nSet up a message sequence chart:\n\n```js\nvar msg_seq = d3.messageSequence().fade(5000); // fade time is in msecs\n```\n\nthen call the chart on your svg element selection.\n\n```js\nd3.select('#container')\n  .append(\"svg\")\n  .attr(\"width\", \"100%\")\n  .attr(\"height\", \"100%\")\n  .call(msg_seq)\n```\n\nYou can then add messages to your chart like so:\n\n```js\nvar msg = {from: \"customer\", to: \"barrista1\", msg: \"place order\"};\nmsg_seq.addMessage(msg);\n```\n\nYou'll also need to set up some styles, so the chart appears properly, for example:\n\n```css\ng.actor line {\n  stroke: lightgray;\n  stroke-width: 1px;\n}\n\ng.message text {\n  font-family: monospace;\n}\n\ng.message line {\n  stroke: black;\n  stroke-width: 2px;\n}\n\ng.message path {\n  stroke: black;\n  stroke-width: 2px;\n}\n```\n\n## Caveats\nI didn't include default styles, since I believe you'd need to use `!important` to override them, which seems janky.\n\nA declarative `data` method might be a better approach than the imperative `addMessage` function.\n\nThis is a first stab, it's pretty rough. PR's are gladly accepted! 💕.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoudelka%2Fd3-message-sequence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoudelka%2Fd3-message-sequence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoudelka%2Fd3-message-sequence/lists"}