{"id":30663305,"url":"https://github.com/informal061/csharpdonutslicewinforms","last_synced_at":"2025-08-31T17:04:58.325Z","repository":{"id":307298429,"uuid":"1028983204","full_name":"Informal061/CSharpDonutSliceWinForms","owner":"Informal061","description":"A customizable WinForms Donut Chart (Pie Chart with center hole) control for .NET applications.","archived":false,"fork":false,"pushed_at":"2025-07-30T13:43:54.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-30T15:25:13.944Z","etag":null,"topics":["chart","csharp","custom-control","donut-chart","ui-component","visual-studio","visualization","winforms"],"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/Informal061.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-30T10:51:24.000Z","updated_at":"2025-07-30T13:43:57.000Z","dependencies_parsed_at":"2025-07-30T15:25:19.389Z","dependency_job_id":"3717e6ae-fe7d-4937-972c-3f342c05a80d","html_url":"https://github.com/Informal061/CSharpDonutSliceWinForms","commit_stats":null,"previous_names":["informal061/csharpdonutslicewinforms"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Informal061/CSharpDonutSliceWinForms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Informal061%2FCSharpDonutSliceWinForms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Informal061%2FCSharpDonutSliceWinForms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Informal061%2FCSharpDonutSliceWinForms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Informal061%2FCSharpDonutSliceWinForms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Informal061","download_url":"https://codeload.github.com/Informal061/CSharpDonutSliceWinForms/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Informal061%2FCSharpDonutSliceWinForms/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273010994,"owners_count":25030369,"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-08-31T02:00:09.071Z","response_time":79,"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":["chart","csharp","custom-control","donut-chart","ui-component","visual-studio","visualization","winforms"],"created_at":"2025-08-31T17:04:49.705Z","updated_at":"2025-08-31T17:04:58.311Z","avatar_url":"https://github.com/Informal061.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# CSharpDonutSliceWinForms\nA customizable and visually enhanced **Donut Chart (Pie Chart with center hole)** control for Windows Forms (.NET).  \nIdeal for modern UI dashboards or statistical visualizations where a clean circular chart with percentage labels is needed.\n\n---\n\n## 📌 Features\n\n- 🎨 Each slice has its own color, label, and value\n- 📐 Configurable inner radius (`DonutThicknessRatio`)\n- 🔲 Transparent background support for seamless integration\n- 📊 Auto-calculated percentages for each slice\n- 🖼️ Optional legend on the right showing labels + values\n- 🔁 Design-time editable via property grid (`List\u003cDonutSlice\u003e`)\n- 🧠 Compatible with **C# 6.0 and later**\n- 💻 Supports **.NET Framework 4.6+** and **.NET Core / .NET 5+**\n\n---\n\n\n## DonutChart.cs\n\n![Donut Chart Example](docs/Donut.png)\n\nA custom UserControl that draws the donut chart with all visual elements and properties like:\n\n* Data: List\u003cDonutSlice\u003e\n\n* DonutThicknessRatio\n\n* OverlayControl (for transparency effect to show background.)\n\n\n# 🚀 How to Use\n\n\n### Step 1: Add to your Form \n\n---\n\n```\nDonutChart donutChart1 = new DonutChart();\nthis.Controls.Add(donutChart1);\n```\n\n\nAlternatively, use the toolbox to drag the control onto your form.\n\n---\n\n### Step 2: Add Data\n\n---\n\n```\ndonutChart1.Data.Add(new DonutSlice { Label = \"Red\", Value = 40f, Color = Color.Red });\ndonutChart1.Data.Add(new DonutSlice { Label = \"Blue\", Value = 30f, Color = Color.Blue });\ndonutChart1.Data.Add(new DonutSlice { Label = \"Green\", Value = 30f, Color = Color.Green }); \n```\n\n🔧 Alternatively, donut slices can be added and edited at **design time** via the **Properties panel** in Visual Studio, using the built-in collection editor for the `Data` property.\n\n\n---\n\n### Step 3: Customize Appearance (Optional)\n\n---\n\n```\ndonutChart1.DonutThicknessRatio = 0.35f;\ndonutChart1.BackColor = Color.Transparent;\ndonutChart1.Dock = DockStyle.Fill;\n```\n\n---\n\n# ADVANCED\n\n### Transparent Background Handling:\nUses OverlayControl or Parent to draw background under the donut.\n\n### Legend Rendering:\nAutomatically placed to the right of the chart with label + value + percentage.\n\n### Auto Percentage Calculation:\nEach slice's percentage is dynamically calculated based on total value.\n\n# 🛠️ Installation\n\nEither create a class from visual studio and paste the code into your own created class or clone the repository by\n\n```\ngit clone https://github.com/Informal061/CSharpDonutSliceWinForms.git \n```\n\nAnd open the solution or copy DonutChart.cs into your WinForms project.\n\n\n# 📄 License\n\nThis project is licensed under the MIT License.\n\n\n# 🙋‍♂️ Author\nDeveloped by Informal061\nFeel free to fork, use, and contribute!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finformal061%2Fcsharpdonutslicewinforms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finformal061%2Fcsharpdonutslicewinforms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finformal061%2Fcsharpdonutslicewinforms/lists"}