{"id":13605363,"url":"https://github.com/rexmortus/choo-chartist","last_synced_at":"2025-04-30T07:05:09.677Z","repository":{"id":147341820,"uuid":"65710169","full_name":"rexmortus/choo-chartist","owner":"rexmortus","description":"A little component for using Chartist with the choo framework!","archived":false,"fork":false,"pushed_at":"2018-01-09T00:19:35.000Z","size":3,"stargazers_count":8,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-30T07:04:45.391Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/rexmortus.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":"2016-08-15T06:34:52.000Z","updated_at":"2020-12-29T22:31:31.000Z","dependencies_parsed_at":"2023-07-02T16:00:54.183Z","dependency_job_id":null,"html_url":"https://github.com/rexmortus/choo-chartist","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/rexmortus%2Fchoo-chartist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexmortus%2Fchoo-chartist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexmortus%2Fchoo-chartist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexmortus%2Fchoo-chartist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rexmortus","download_url":"https://codeload.github.com/rexmortus/choo-chartist/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251658200,"owners_count":21622819,"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-08-01T19:00:57.834Z","updated_at":"2025-04-30T07:05:09.647Z","avatar_url":"https://github.com/rexmortus.png","language":"JavaScript","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# choo-chartist\n\nA little component for using Chartist with the `choo` framework!\n\n### features\n\n- works with the `choo` framework\n- quickly puts fully sick SVG charts within reach\n\n## Installation\n\n`$ npm install choo-chartist`\n\n## Usage\n\n```javascript\nconst html = require('choo/html')\nconst chartist = require('choo-chartist')\n\nconst chartType = 'Line'\n\nmodule.exports = (state, prev, send) =\u003e html`\n  \u003cmain\u003e\n    ${ chartist(chartType, state.chart.data, state.chart.options) }\n  \u003c/main\u003e\n`\n```\n\n## Styles\n\nThe stylesheets for `Chartist` are distributed with the `Chartist` npm package (a dependency of **this** package) and can be imported, for example, with `sheetify`:\n\n```javascript\nconst sf = require('sheetify')\nsf('chartist', { global: true })\n```\n## Internals\n\nAs per the design of `Chartist`, `choo-chartist` creates a \"container\" element (a `\u003cdiv\u003e`) with an `onload` event that initializes `Chartist` (and some other stuff).\n\nThe new `Chartist` object is then attached to the \"container\" element.\n\nThe component then caches the `Chartist` object and the \"container\" element.\n\nSubsequent changes in state are passed through to the cached `Chartist` object, in particular to [Chartist.update()](https://gionkunz.github.io/chartist-js/api-documentation.html#chartistbase-function-update), which constrains us to updating only the `data` and `options`, e.g. you cannot subsequently change the chart type.\n\nAfter `update()` has been called and the SVG has been updated, the component returns the cached \"container\" element and what you see is the updated chart! :boom:\n\n## Known Issues\n\n- At this point, the only known issue is that there are an indeteminate amount of *unknown unknown* issues.\n\n## FAQ\n\n- Are charts awesome?\n\nYes, correct.\n\n- Is choo awesome?\n\nOh hells yeah!\n\n## See Also\n\n- [Charist](https://gionkunz.github.io/chartist-js/)\n- [Choo](https://github.com/yoshuawuyts/choo)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frexmortus%2Fchoo-chartist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frexmortus%2Fchoo-chartist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frexmortus%2Fchoo-chartist/lists"}