← Gallery

Donut

Findings by category

Explore the example, download the output or use the C# source in your own project.

Preview
Findings by categoryChart with 1 data series: Findings.Findings by categoryOne prepared scene for SVG and native PNGDay 718.7%38Day 617.2%35Day 515.8%32Day 414.3%29Day 312.8%26Other21.2%43203Findings
Findings by category
Findings by categoryChart with 1 data series: Findings.Findings by categoryOne prepared scene for SVG and native PNGDay 718.7%38Day 617.2%35Day 515.8%32Day 414.3%29Day 312.8%26Other21.2%43203Findings
Findings by category
360 × 360 pixels

Create this example

Register the included Carlito font files to reproduce the exported typography.

using ChartForgeX.Core;
using ChartForgeX.Primitives;
using ChartForgeX.Rendering;
using ChartForgeX.Themes;
using ChartForgeX.Typography;

// The generated gallery includes these licensed font fixtures beside the outputs.
FontRegistry.Register("CFX Proof Carlito", "fonts/Carlito-Regular.ttf", 400);
FontRegistry.Register("CFX Proof Carlito", "fonts/Carlito-Bold.ttf", 700);
var chart = Chart.Create();
chart.WithXLabels("Day 1", "Day 2", "Day 3", "Day 4", "Day 5", "Day 6", "Day 7");
chart.AddDonut("Findings", new ChartPoint[] { new ChartPoint(1, 20), new ChartPoint(2, 23), new ChartPoint(3, 26), new ChartPoint(4, 29), new ChartPoint(5, 32), new ChartPoint(6, 35), new ChartPoint(7, 38) });
var context = new VisualRenderContext(new VisualLayoutOptions(new VisualSize(360, 360)), VisualTheme.Graphite(), VisualThemeMode.Light,
    new VisualFrame("Findings by category", "One prepared scene for SVG and native PNG", showSurface: false), FontSpec.FromFamily("CFX Proof Carlito"));
var prepared = chart.Prepare(context);
System.IO.File.WriteAllText("chart.svg", prepared.ToSvg());
System.IO.File.WriteAllBytes("chart.png", prepared.ToPng());
using ChartForgeX.Core;
using ChartForgeX.Primitives;
using ChartForgeX.Rendering;
using ChartForgeX.Themes;
using ChartForgeX.Typography;

// The generated gallery includes these licensed font fixtures beside the outputs.
FontRegistry.Register("CFX Proof Carlito", "fonts/Carlito-Regular.ttf", 400);
FontRegistry.Register("CFX Proof Carlito", "fonts/Carlito-Bold.ttf", 700);
var chart = Chart.Create();
chart.WithXLabels("Day 1", "Day 2", "Day 3", "Day 4", "Day 5", "Day 6", "Day 7");
chart.AddDonut("Findings", new ChartPoint[] { new ChartPoint(1, 20), new ChartPoint(2, 23), new ChartPoint(3, 26), new ChartPoint(4, 29), new ChartPoint(5, 32), new ChartPoint(6, 35), new ChartPoint(7, 38) });
var context = new VisualRenderContext(new VisualLayoutOptions(new VisualSize(360, 360)), VisualTheme.Graphite(), VisualThemeMode.Dark,
    new VisualFrame("Findings by category", "One prepared scene for SVG and native PNG", showSurface: false), FontSpec.FromFamily("CFX Proof Carlito"));
var prepared = chart.Prepare(context);
System.IO.File.WriteAllText("chart.svg", prepared.ToSvg());
System.IO.File.WriteAllBytes("chart.png", prepared.ToPng());