{"id":13701334,"url":"https://github.com/pubnub/eon-chart","last_synced_at":"2025-12-12T03:22:28.766Z","repository":{"id":27136719,"uuid":"30605358","full_name":"pubnub/eon-chart","owner":"pubnub","description":"Realtime animated graphs with PubNub and C3.","archived":false,"fork":false,"pushed_at":"2022-12-06T09:15:27.000Z","size":3009,"stargazers_count":124,"open_issues_count":10,"forks_count":44,"subscribers_count":35,"default_branch":"master","last_synced_at":"2025-10-08T23:17:06.727Z","etag":null,"topics":["bar-graphs","bower","c3","d3","d3js","donut","eon-chart","graph","javascript","meter","pubnub","realtime-animated-graphs","spline","time-series"],"latest_commit_sha":null,"homepage":"https://www.pubnub.com/developers/eon/","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/pubnub.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-10T17:48:22.000Z","updated_at":"2024-11-02T14:44:43.000Z","dependencies_parsed_at":"2022-08-24T11:00:39.687Z","dependency_job_id":null,"html_url":"https://github.com/pubnub/eon-chart","commit_stats":null,"previous_names":["pubnub/pubnub-c3"],"tags_count":75,"template":false,"template_full_name":null,"purl":"pkg:github/pubnub/eon-chart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pubnub%2Feon-chart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pubnub%2Feon-chart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pubnub%2Feon-chart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pubnub%2Feon-chart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pubnub","download_url":"https://codeload.github.com/pubnub/eon-chart/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pubnub%2Feon-chart/sbom","scorecard":{"id":749120,"data":{"date":"2024-05-20","repo":{"name":"github.com/pubnub/eon-chart","commit":"712a61cdd782458a639a058ef357e3b83eb486c5"},"scorecard":{"version":"v5.0.0-rc2-23-g98ec491a","commit":"98ec491a888a8a0db9d83a3c7d379ae1f46321de"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/98ec491a888a8a0db9d83a3c7d379ae1f46321de/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/98ec491a888a8a0db9d83a3c7d379ae1f46321de/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/98ec491a888a8a0db9d83a3c7d379ae1f46321de/docs/checks.md#cii-best-practices"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: license.md:0","Info: FSF or OSI recognized license: MIT License: license.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/98ec491a888a8a0db9d83a3c7d379ae1f46321de/docs/checks.md#license"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/98ec491a888a8a0db9d83a3c7d379ae1f46321de/docs/checks.md#branch-protection"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/98ec491a888a8a0db9d83a3c7d379ae1f46321de/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/98ec491a888a8a0db9d83a3c7d379ae1f46321de/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/98ec491a888a8a0db9d83a3c7d379ae1f46321de/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/98ec491a888a8a0db9d83a3c7d379ae1f46321de/docs/checks.md#binary-artifacts"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 1.3.1 not signed: https://api.github.com/repos/pubnub/eon-chart/releases/43087913","Warn: release artifact 1.3.1 does not have provenance: https://api.github.com/repos/pubnub/eon-chart/releases/43087913"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/98ec491a888a8a0db9d83a3c7d379ae1f46321de/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/98ec491a888a8a0db9d83a3c7d379ae1f46321de/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/98ec491a888a8a0db9d83a3c7d379ae1f46321de/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/98ec491a888a8a0db9d83a3c7d379ae1f46321de/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/98ec491a888a8a0db9d83a3c7d379ae1f46321de/docs/checks.md#fuzzing"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/98ec491a888a8a0db9d83a3c7d379ae1f46321de/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T19:44:03.837Z","repository_id":27136719,"created_at":"2025-08-22T19:44:03.837Z","updated_at":"2025-08-22T19:44:03.837Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27627807,"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","status":"online","status_checked_at":"2025-12-09T02:00:09.185Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bar-graphs","bower","c3","d3","d3js","donut","eon-chart","graph","javascript","meter","pubnub","realtime-animated-graphs","spline","time-series"],"created_at":"2024-08-02T20:01:30.033Z","updated_at":"2025-12-12T03:22:28.731Z","avatar_url":"https://github.com/pubnub.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"## Please note that this project is no longer actively maintained or accepting Pull Requests.  The EON library remains available on npm, bower, or through hotlink.\n\n--------------------------------\n\n# EON Charts\n\nRealtime animated graphs with [PubNub](http://pubnub.com) and [C3](http://c3js.org/).\n\n![](http://i.imgur.com/MRK20Kb.gif)\n\n# Examples\n\n* [Spline Chart](http://pubnub.com/developers/eon/chart/spline/)\n* [Bar Chart](http://pubnub.com/developers/eon/chart/bar/)\n* [Donut Chart](http://pubnub.com/developers/eon/chart/donut/)\n* [Gauge Chart](http://pubnub.com/developers/eon/chart/gauge/)\n\n## Installing\n\n### Hotlink\n\n```html\n\u003cscript type=\"text/javascript\" src=\"https://pubnub.github.io/eon/v/eon/1.0.0/eon.js\"\u003e\u003c/script\u003e\n\u003clink type=\"text/css\" rel=\"stylesheet\" href=\"https://pubnub.github.io/eon/v/eon/1.0.0/eon.css\"/\u003e\n```\n\n### Bower\n\n```sh\nbower install eon-chart --save\n```\n\nCheck out our [bower example](https://github.com/pubnub/eon-chart/examples/bower.html).\n\n### NPM\n\n```sh\nnpm install eon-chart --save\n```\n\nCheck out our [webpack example](https://github.com/pubnub/eon-chart-webpack).\n\n\n## Quick Start\n\nPlug your normal C3 config into the ```generate``` param. Supply an array of PubNub channel in ```channels``` param. ```eon.chart``` returns the normal C3 chart object.\n\n```html\n\u003cdiv id=\"chart\"\u003e\u003c/div\u003e\n\u003cscript\u003e\n  var pubnub = new PubNub({\n    publishKey:   'demo', // replace with your own pub-key\n    subscribeKey: 'demo' // replace with your own sub-key\n  });\n\n  eon.chart({\n    pubnub: pubnub,\n    channels: [\"c3-spline\"],\n    generate: {\n      bindto: '#chart',\n      data: {\n        labels: true\n      }\n    }\n  });\n\u003c/script\u003e\n```\n\nThat's it! Now you can publish messages to the same ```channel``` and they'll render in the graph.\n\n```js\nvar pubnub = new PubNub({\n  publishKey:   'demo', // replace with your own pub-key\n  subscribeKey: 'demo' // replace with your own sub-key\n});\n\nsetInterval(function(){\n  pubnub.publish({\n    channel: 'c3-spline',\n    message: {\n      eon: {\n        'Austin': Math.floor(Math.random() * 99),\n        'New York': Math.floor(Math.random() * 99),\n        'San Francisco': Math.floor(Math.random() * 99),\n        'Portland': Math.floor(Math.random() * 99)\n      }\n    }\n  });\n\n}, 1000);\n```\n\nAll chart data must exist within an object called ```eon```. Also notice how the ```channel``` and ```channels``` matches in both examples.\n\n# Configuration\n\nParameter | Value | Default\n| :------------ |:---------------| -----:|\n| channels | An array of PubNub channels to subscribe to. Either ```channels``` or ```channelGroups``` must be supplied. | ```false```\n| channelGroups | An array of PubNub channel groups to subscribe to. Either ```channels``` or ```channelGroups``` must be supplied. | ```false```\n| generate | Your [C3 chart generation config](http://c3js.org/gettingstarted.html#generate). | ```undefined```\n| flow | Used to update spline charts over time series. | ```false```\n| limit | The size of your buffer. How many values to display on the chart before shifting the first value off and appending a new value. This is not native to C3. | ```10```\n| rate | Interval at which new datapoints are drawn on the chart in milliseconds. | ```1000```\n| history | Fill the buffer by using PubNub history call to retrieve last ```limit``` messages. Requires [PubNub storage](http://www.pubnub.com/how-it-works/storage-and-playback/) to be enabled. | ```false```\n| xType | Your x axis configuration. Can be ```\"auto\"```, ```\"custom\"```, ```\"category\"```, or ```false```. Read more about ```xType``` below. | ```\"auto\"```\n| xId | Your x axis source if ```xType == \"custom\"``` | ```\"x\"```\n| message | A function to call everytime a PubNub message is recieved. See [PubNub subscribe](http://www.pubnub.com/docs/javascript/api/reference.html#subscribe) | ```function(message, env, channel){}``` |\n| transform | Method for changing the payload format of your stream. See [example](https://github.com/pubnub/eon-chart/blob/master/examples/transform.html)| ```function(m){return m}```\n| connect | A function to call when PubNub makes a connection. See [PubNub subscribe](http://www.pubnub.com/docs/javascript/api/reference.html#subscribe) | ```function(){}``` |\n| pubnub | An instance of the PUBNUB javascript global. This is required when using your own keys. See the ```subscribeKey``` example. | ```false```\n| debug | Log EON events to console as they happen | ```false```\n\n## More on Publishing Messages\n\nThis uses the included PubNub library to pubnub.publish()\npackets to the pubnub.subscribe() call waiting inside the\nC3 framework.\n\nYou probably want to publish data from the back-end instead.\nCheck out our docs for more info:\n\n[http://www.pubnub.com/documentation/](http://www.pubnub.com/documentation/)\n\n## Customize Your Graph\n\neon-chart works will all supported graph types in C3. Just check out the examples above.\n\nYou can learn more about customizing your graph from [the official C3 docs](http://c3js.org/gettingstarted.html#customize).\n\n## X Axis Configuration\n\n### Automatic\n\neon-chart will automatically use the PubNub message timestamp for chart x values. This timestamp is recorded when a message is published to the PubNub data stream network. This is the case when ```xType``` is set to ```\"auto\"```.\n\n### Custom\n\nIf you'd like to supply your own Javascript timestamp, set ```xType``` to ```custom```. Then, set ```xId``` to the x value that appears within your published messages. Any custom ```x``` must be a microtime date like ```1465417017340```.\n\n```js\nvar pubnub = new PubNub({\n  publishKey:   'demo', // replace with your own pub-key\n  subscribeKey: 'demo' // replace with your own sub-key\n});\n\neon.chart({\n  pubnub: pubnub,\n  channels: [\"c3-spline\"], // the pubnub channel for real time data\n  generate: {           // c3 chart object\n    bindto: '#chart'\n  },\n  xType: 'custom',\n  xId: 'x'\n});\n```\n\nNotice how the code below publishes a key value pair called ```x``` with every message.\n\n```js\npubnub.publish({\n  channels: 'c3-spline',\n  message: {\n    eon: {\n      'x': new Date().getTime(),\n      'Austin': Math.floor(Math.random() * 99)\n    }\n  }\n});\n```\n\n### Category\n\nEon charts supports both time series bar charts and point of time bar charts. If you'd like to represent a bar chart in a single point of time, supply ```xType: \"category\"``` and only the latest data will appear in the chart categorized by key. See ```examples/bar.html``` for an example.\n\n## Multiple Points Per Payload\n\nIt is possible to publish multiple plot points per payload. Rather than using the object name ```eon``` use the name ```eons``` and supply an ```Array```. Because you use the ```eons``` property name, the library will know to loop through the array and plot each point.\n\nNote that if publishing multiple points per payload, **you must use ```xType: \"custom\"``` and supply an ```xId```**.\n\n```js\neons: [\n  {\n    x: new Date().getTime(),\n    value: 1\n  },\n  {\n    x: new Date().getTime(),\n    value: 2\n  }\n]\n```\n\nHere's an example of data collected at 100ms increments, but only publishes every 1,000ms. Every payload includes 10 points with 100ms resolution. [See a full example here](https://github.com/pubnub/eon-chart/blob/master/examples/eons.html).\n\n```js\nsetInterval(function(){\n  var data = [];\n  var date = new Date().getTime();\n\n  for(var i = 0; i \u003c 10; i++) {\n      data.push({\n          'pub_time': date + (100 * i),\n          'Austin': Math.floor(Math.random() * 99)\n      });\n  }\n\n  pubnub.publish({\n    channels: [channel],\n    message: {\n      eons: data\n    }\n  });\n\n}, 1000);\n```\n\n### Disable\n\nYou can disable eon-chart modifications by setting ```xType``` to ```false```. By default C3 will use an incremental x axis (1,2,3,4...).\n\n## Distributed Systems\n\nYou can publish from multiple sources into one chart. For example, you can graph the individual memory usage from 3 servers by supplying the same channel to your PubNub publish requests.\n\nCheck out our [distributed chart example](https://github.com/pubnub/EON-distributed-chart).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpubnub%2Feon-chart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpubnub%2Feon-chart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpubnub%2Feon-chart/lists"}