{"id":13426828,"url":"https://github.com/zurb/pizza","last_synced_at":"2025-04-06T09:08:14.195Z","repository":{"id":52469813,"uuid":"13313291","full_name":"zurb/pizza","owner":"zurb","description":"Better pie, donut, line, and bar graphs.","archived":false,"fork":false,"pushed_at":"2017-04-16T19:40:05.000Z","size":1236,"stargazers_count":412,"open_issues_count":22,"forks_count":62,"subscribers_count":55,"default_branch":"master","last_synced_at":"2025-03-30T08:07:57.241Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://zurb.com/playground/pizza-amore-charts-and-graphs","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/zurb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-04T00:32:52.000Z","updated_at":"2025-03-03T08:22:30.000Z","dependencies_parsed_at":"2022-08-25T22:41:26.742Z","dependency_job_id":null,"html_url":"https://github.com/zurb/pizza","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurb%2Fpizza","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurb%2Fpizza/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurb%2Fpizza/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurb%2Fpizza/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zurb","download_url":"https://codeload.github.com/zurb/pizza/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247457801,"owners_count":20941906,"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-31T00:01:45.933Z","updated_at":"2025-04-06T09:08:14.177Z","avatar_url":"https://github.com/zurb.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"##Pizza Pie Charts\n\nPizza is a responsive pie, donut, bar, and line graph charting library based on the Snap SVG framework from Adobe. It focuses on easy integration via HTML markup and CSS instead of JavaScript objects, although you can pass JavaScript objects to Pizza as well.\n\n### Implementation\n\nThe first step is to create a key with a `ul` and list elements that represent each piece of the pie with a `data-pie-id` attribute pointing to the ID of your chart container.\n```\n\u003cul data-pie-id=\"svg\"\u003e\n  \u003cli data-value=\"60\"\u003eWater Buffalo (60)\u003c/li\u003e\n  \u003cli data-value=\"20\"\u003eBison (20)\u003c/li\u003e\n  \u003cli data-value=\"12\"\u003eSheep (12)\u003c/li\u003e\n  \u003cli data-value=\"32\"\u003eGoat (32)\u003c/li\u003e\n  \u003cli data-value=\"50\"\u003eShetland Pony (50)\u003c/li\u003e\n\u003c/ul\u003e\n```\n\nAfter you have created your legend, you can include your chart container anywhere on the page.\n\n```\n\u003cdiv id=\"svg\"\u003e\u003c/div\u003e\n```\n\nYou can then style your chart with CSS or SCSS.\n\nTo initialize your charts, you can call `Pizza.init();` at the end of the body of your page.\n\n### Data Options\n\nYou can pass options to the chart by using the `data-options` attribute on your legend:\n\n```\n\u003cul data-pie-id=\"svg\" data-options='{\"donut\":\"true\"}'\u003e\n```\n\nOr on initialization:\n\n```\nPizza.init('#myChart', {\n  data: [23, 44, 1, 29, 90]\n});\n```\n\n### Custom Text\n\nSetting `data-text` on your `li` allows you to override the default percent for pie piece labels. You have access to `value` and `percent` as variables. All variables are wrapped in handlebar.js style double brackets.\n\n```\n\u003cli data-value=\"32\" data-text=\"Goats {{percent}} ({{value}} total)\"\u003eGoat (32)\u003c/li\u003e\n```\n\nWill render out `Goats 19% (32 total)` for example.\n\n### Contributing\n\nTo contribute you must have Node and Grunt installed on your system.\n\nCompiling:\n\n```\nnpm install\nbower install\ngrunt\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzurb%2Fpizza","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzurb%2Fpizza","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzurb%2Fpizza/lists"}