I stored operating into the identical downside whereas constructing studies and automation instruments: the chart regarded fantastic in a browser, however the true vacation spot was an e mail, a PDF, a generated doc, or perhaps a desktop background. Bringing a browser runtime alongside simply to attract the ultimate picture felt just like the improper tradeoff.
That’s the reason I constructed ChartForgeX. You describe the visible with typed .NET objects and render it domestically. The identical mannequin can produce SVG, static HTML, PNG, GIF, JPEG, BMP, PPM, or TIFF output, so I can use it from an internet web page and from a scheduled report with out sustaining two chart definitions.
The title says “chart,” however the challenge has grown into a number of associated rendering surfaces:
- statistical and enterprise chart collection
- chart grids and small multiples
- exact-value blocks akin to KPI playing cards, tables, lists, and timelines
- fixed-size layered canvases
- topology, group hierarchies, maps, and relationship diagrams
- elective interactive HTML for charts and graph exploration
- Markdown and Mermaid-oriented authoring packages
I hold them separate on function. A KPI card isn’t a tiny bar chart, and a service dependency map shouldn’t must fake it’s a chart collection.
One mannequin, a number of supply codecs
Add the ChartForgeX NuGet package deal to a .NET console challenge (dotnet add package deal ChartForgeX --version 1.7.0). A primary chart stays small:
utilizing ChartForgeX;
utilizing ChartForgeX.Core;
utilizing ChartForgeX.Primitives;
utilizing System.Collections.Generic;
var chart = Chart.Create()
.WithTitle("Deployment well being")
.WithXAxis("Run")
.WithYAxis("Checks")
.WithSize(1180, 640)
.WithXLabels("Mon", "Tue", "Wed", "Thu", "Fri")
.AddSmoothArea("Handed", Factors(820, 940, 980, 1040, 1120))
.AddSmoothLine(
"Failed",
Factors(22, 30, 28, 21, 18),
ChartColor.FromRgb(248, 113, 113));
chart.SaveSvg("deployment-health.svg");
chart.SaveHtml("deployment-health.html");
chart.SavePng("deployment-health.png");
static IEnumerable<ChartPoint> Factors(params double[] values) {
for (var index = 0; index < values.Size; index++) {
yield return new ChartPoint(index + 1, values[index]);
}
}
The output strategies observe one easy sample: To* returns content material, Save* writes a file, and Write* streams bytes. I usually hold SVG for web sites and different locations the place sharp textual content issues. PNG is the sensible alternative for e mail, Workplace paperwork, and methods that anticipate a traditional picture file. The HTML output wraps the SVG for direct browser supply.
Select the suitable floor
Earlier than selecting colours, I resolve what the reader is meant to be taught from the visible.
For a pattern, comparability, distribution, or statistical view, I begin with Chart. ChartGrid retains a number of associated charts aligned. When the precise values matter greater than an axis, ChartForgeX.VisualBlocks provides me playing cards, tables, lists, and timelines. For a fixed-size report cowl, social card, or wallpaper, I take advantage of VisualCanvas or ImageComposition.
Relationships want a special mannequin. TopologyChart works properly for companies, possession, routes, maps, and group knowledge. When the graph is massive sufficient to want navigation, choice, modifying, or exploration, I transfer to GraphScene.
Hierarchy with out pretending each department is similar
Group charts are instance of why one format rule isn’t sufficient. A small demo seems fantastic, then actual knowledge arrives and one supervisor has fifteen direct studies. The department turns into wider than the web page, or wrapped playing cards begin trying like one other stage within the hierarchy.
ChartForgeX lets me select a coverage for a single department. Many of the tree can stay automated, one busy department can use a compact format, and a slim department can run vertically. The coverage is inherited, so I solely describe the exceptions.
There are 4 decisions:
Autoselects a deterministic coverage from department densityCustomarymakes use of a traditional row of direct studiesCompactwraps a dense department with out inventing hierarchyVerticalretains a slim department in a single column
Topology is a reusable rendering concern
I’ve constructed service maps, Lively Listing web site diagrams, possession views, and infrastructure graphs in numerous merchandise. The supply knowledge modifications, however the drawing downside doesn’t: nodes, teams, edges, labels, standing, routing, and format all must agree.
ChartForgeX owns that drawing mannequin. The appliance maps its knowledge into TopologyChart or GraphScene; ChartForgeX doesn’t question Lively Listing, calculate well being, or resolve what a crimson node means.
This retains the helpful half reusable. A reporting product nonetheless owns its filters and well being guidelines. A listing instrument nonetheless owns discovery. They merely hand the completed relationship mannequin to the identical renderer.
Dependency-free core, elective browser conduct
The core ChartForgeX package deal has no runtime package deal dependencies, and static output doesn’t want JavaScript. I wished the fundamental consequence to work in studies, e mail, documentation, construct jobs, and locked-down hosts.
Browser interplay lives in separate packages:
ChartForgeX.Interactivityholds host-neutral interplay contractsChartForgeX.Interactivity.Htmlprovides browser conduct
I add the HTML adapter when the reader truly wants search, choice, zoom, hierarchy navigation, situations, or export controls. A static chart embedded in an HTML report can keep static.
The place ChartForgeX stops
ChartForgeX doesn’t construct the dashboard shell, gather knowledge, calculate Lively Listing well being, or outline product-specific filters. These choices stick with the appliance utilizing it.
For PowerShell customers, ImagePlayground wraps the engine in instructions and examples. PowerBGInfo makes use of the identical rendering code to compose Home windows desktop backgrounds. I can enhance the renderer as soon as with out turning both product right into a thinly disguised chart library.
Discover the complete API
The ChartForgeX challenge hub collects the fabric that was once scattered between repositories and examples:
- documentation explains packages, rendering surfaces, topology, and interactivity
- .NET API lists public varieties throughout the ChartForgeX packages
- examples present quick beginning factors and maintained gallery hyperlinks
- the generated gallery reveals the breadth of actual output
In case you are constructing a .NET software and wish to personal the information mannequin whereas reusing the rendering work, begin with the examples and the generated gallery. That’s the job I need ChartForgeX to do: take a mannequin your software understands and switch it into an output folks can truly learn.




