← Gallery

Word Cloud

Topics in service observations

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

Preview
Topics in service observationsChart with 1 data series: Mentions.Availability: 96Identity: 81Latency: 74Network: 69Storage: 61Recovery: 57Capacity: 52Backups: 47Certificates: 44Patching: 41Monitoring: 38Access reviews: 35DNS: 33Licensing: 30Firewall: 28Replication: 26Alerts: 24Onboarding: 22Encryption: 20Audit: 19Change control: 18Escalation: 16Runbooks: 15MFA: 14Retention: 13Cost: 12Vendors: 11Training: 10Load balancing: 9Failover: 9Inventory: 8Tickets: 8Compliance: 7Endpoints: 7Mail flow: 6Quotas: 6Availability: 96Identity: 81Latency: 74Network: 69Storage: 61Recovery: 57Capacity: 52Backups: 47Certificates: 44Patching: 41Monitoring: 38Access reviews: 35DNS: 33Licensing: 30Firewall: 28Replication: 26Alerts: 24Onboarding: 22Encryption: 20Audit: 19Change control: 18Escalation: 16Runbooks: 15MFA: 14Retention: 13Cost: 12Vendors: 11Training: 10Load balancing: 9Failover: 9Inventory: 8Tickets: 8Compliance: 7Endpoints: 7Mail flow: 6Quotas: 6
Topics in service observations
Topics in service observationsChart with 1 data series: Mentions.Availability: 96Identity: 81Latency: 74Network: 69Storage: 61Recovery: 57Capacity: 52Backups: 47Certificates: 44Patching: 41Monitoring: 38Access reviews: 35DNS: 33Licensing: 30Firewall: 28Replication: 26Alerts: 24Onboarding: 22Encryption: 20Audit: 19Change control: 18Escalation: 16Runbooks: 15MFA: 14Retention: 13Cost: 12Vendors: 11Training: 10Load balancing: 9Failover: 9Inventory: 8Tickets: 8Compliance: 7Endpoints: 7Mail flow: 6Quotas: 6Availability: 96Identity: 81Latency: 74Network: 69Storage: 61Recovery: 57Capacity: 52Backups: 47Certificates: 44Patching: 41Monitoring: 38Access reviews: 35DNS: 33Licensing: 30Firewall: 28Replication: 26Alerts: 24Onboarding: 22Encryption: 20Audit: 19Change control: 18Escalation: 16Runbooks: 15MFA: 14Retention: 13Cost: 12Vendors: 11Training: 10Load balancing: 9Failover: 9Inventory: 8Tickets: 8Compliance: 7Endpoints: 7Mail flow: 6Quotas: 6
Topics in service observations
800 × 440 pixels

Create this example

Create a console project, add the ChartForgeX and ChartForgeX.Interactivity.Html packages, and replace Program.cs with this source. Run it to write SVG, PNG and HTML with the default system fonts.

For the same typography as the gallery, download the gallery-font recipe and copy the gallery’s fonts directory beside your program.

#region Setup
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using ChartForgeX;
using ChartForgeX.Core;
using ChartForgeX.Primitives;
using ChartForgeX.Rendering;
using ChartForgeX.Themes;
using ChartForgeX.Topology;
using ChartForgeX.Typography;
using ChartForgeX.VisualArtifacts;
using ChartForgeX.VisualBlocks;

var mode = ThemeMode.Light;
var theme = VisualTheme.Graphite();
var model = WordCloudRecipe.Create("wide", mode);
var context = new VisualRenderContext(
    new VisualLayoutOptions(new VisualSize(800, 440)), theme, mode,
    new VisualFrame("Topics in service observations", "", showLegend: null, showSurface: false));
var prepared = model.Prepare(context);
File.WriteAllText("visual.svg", prepared.ToSvg());
File.WriteAllBytes("visual.png", prepared.ToPng());
File.WriteAllText("visual.html", prepared.ToArtifact("example", VisualArtifactKind.Chart).ToHtmlPage());
#endregion

/// <summary>Deterministic placement of weighted service-observation terms.</summary>
public static class WordCloudRecipe {
    public static Chart Create(string variant = "wide", ThemeMode mode = ThemeMode.Light) {
        // How often each topic appeared in a quarter of service review notes.
        var terms = new (string Text, double Mentions)[] {
            ("Availability", 96), ("Identity", 81), ("Latency", 74), ("Network", 69), ("Storage", 61), ("Recovery", 57),
            ("Capacity", 52), ("Backups", 47), ("Certificates", 44), ("Patching", 41), ("Monitoring", 38), ("Access reviews", 35),
            ("DNS", 33), ("Licensing", 30), ("Firewall", 28), ("Replication", 26), ("Alerts", 24), ("Onboarding", 22),
            ("Encryption", 20), ("Audit", 19), ("Change control", 18), ("Escalation", 16), ("Runbooks", 15), ("MFA", 14),
            ("Retention", 13), ("Cost", 12), ("Vendors", 11), ("Training", 10), ("Load balancing", 9), ("Failover", 9),
            ("Inventory", 8), ("Tickets", 8), ("Compliance", 7), ("Endpoints", 7), ("Mail flow", 6), ("Quotas", 6)
        };
        var count = variant == "compact" ? 20 : terms.Length;
        return Chart.Create().AddWordCloud("Mentions", terms.Take(count).Select(term => new ChartWordCloudItem(term.Text, term.Mentions)).ToArray());
    }
}
#region Setup
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using ChartForgeX;
using ChartForgeX.Core;
using ChartForgeX.Primitives;
using ChartForgeX.Rendering;
using ChartForgeX.Themes;
using ChartForgeX.Topology;
using ChartForgeX.Typography;
using ChartForgeX.VisualArtifacts;
using ChartForgeX.VisualBlocks;

var mode = ThemeMode.Dark;
var theme = VisualTheme.Graphite();
var model = WordCloudRecipe.Create("wide", mode);
var context = new VisualRenderContext(
    new VisualLayoutOptions(new VisualSize(800, 440)), theme, mode,
    new VisualFrame("Topics in service observations", "", showLegend: null, showSurface: false));
var prepared = model.Prepare(context);
File.WriteAllText("visual.svg", prepared.ToSvg());
File.WriteAllBytes("visual.png", prepared.ToPng());
File.WriteAllText("visual.html", prepared.ToArtifact("example", VisualArtifactKind.Chart).ToHtmlPage());
#endregion

/// <summary>Deterministic placement of weighted service-observation terms.</summary>
public static class WordCloudRecipe {
    public static Chart Create(string variant = "wide", ThemeMode mode = ThemeMode.Light) {
        // How often each topic appeared in a quarter of service review notes.
        var terms = new (string Text, double Mentions)[] {
            ("Availability", 96), ("Identity", 81), ("Latency", 74), ("Network", 69), ("Storage", 61), ("Recovery", 57),
            ("Capacity", 52), ("Backups", 47), ("Certificates", 44), ("Patching", 41), ("Monitoring", 38), ("Access reviews", 35),
            ("DNS", 33), ("Licensing", 30), ("Firewall", 28), ("Replication", 26), ("Alerts", 24), ("Onboarding", 22),
            ("Encryption", 20), ("Audit", 19), ("Change control", 18), ("Escalation", 16), ("Runbooks", 15), ("MFA", 14),
            ("Retention", 13), ("Cost", 12), ("Vendors", 11), ("Training", 10), ("Load balancing", 9), ("Failover", 9),
            ("Inventory", 8), ("Tickets", 8), ("Compliance", 7), ("Endpoints", 7), ("Mail flow", 6), ("Quotas", 6)
        };
        var count = variant == "compact" ? 20 : terms.Length;
        return Chart.Create().AddWordCloud("Mentions", terms.Take(count).Select(term => new ChartWordCloudItem(term.Text, term.Mentions)).ToArray());
    }
}