Skip to content
ChartForgeX
Class

ChartDescriptionFacts

ChartForgeX.Core

Namespace
ChartForgeX.Core
Assembly
ChartForgeX
Modifiers
sealed

The facts behind one automatic accessible sentence: the chart description (the SVG desc element), the accessible name of a calendar or map group, or the description of a topology diagram. ChartLabels.AccessibleTextFormatter and TopologyLabels.AccessibleTextFormatter receive them so hosts can write the sentence in their own language, including its plural forms.

Inheritance

  • object
  • ChartDescriptionFacts

Usage

Explore 6 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 4

Constructors

public ChartDescriptionFacts(ChartDescriptionKind kind, string? title, IEnumerable<string> seriesNames, int count, int missingCount = 0, DateTime? firstDate = null, DateTime? lastDate = null, string? mapName = null, int groupCount = 0, int edgeCount = 0, int zeroCount = 0, IEnumerable<string>? plotRegionLabels = null) #

Initializes the facts of one sentence, for example to test a formatter.

Parameters

kind ChartForgeX.Core.ChartDescriptionKind required
Which sentence is described.
title string? required
The chart title; null or white space when the chart has none.
seriesNames System.Collections.Generic.IEnumerable<string> required
The described series names.
count int required
The main count (see ChartDescriptionFacts.Count); zero or greater.
missingCount int = 0 optional
The number of days, regions, or tiles without a value; zero or greater.
firstDate System.DateTime? = null optional
The first day, for calendar sentences.
lastDate System.DateTime? = null optional
The last day, for calendar sentences.
mapName string? = null optional
The name of the region or tile map definition.
groupCount int = 0 optional
The number of groups, for topology descriptions; zero or greater.
edgeCount int = 0 optional
The number of edges, for topology descriptions; zero or greater.
zeroCount int = 0 optional
The number of calendar days at zero, for calendar sentences; zero or greater.
plotRegionLabels System.Collections.Generic.IEnumerable<string>? = null optional
The authored Cartesian plot region captions, including regions without points.

Properties

public ChartDescriptionKind Kind { get; } #

Gets which sentence is described.

public string? Title { get; } #

Gets the chart title, or null when the chart has none.

public IReadOnlyList<string> SeriesNames { get; } #

Gets the described series names: every series with source data, or the one calendar or map series.

public IReadOnlyList<string> PlotRegionLabels { get; } #

Gets authored Cartesian plot region captions for automatic and host-localized descriptions.

public int Count { get; } #

Gets the main count: described series, calendar days with a value, highlighted map points, filled map regions, or topology nodes, depending on ChartDescriptionFacts.Kind. A calendar day at zero is drawn neutral and counts in ChartDescriptionFacts.ZeroCount, not here, so a sentence can tell days with changes (ChartDescriptionFacts.Count) from days in the data (ChartDescriptionFacts.Count plus ChartDescriptionFacts.ZeroCount).

public int MissingCount { get; } #

Gets the number of calendar days without data, or of map regions without a value; zero for other kinds.

public int ZeroCount { get; } #

Gets the number of calendar days whose value is zero (days without changes, drawn neutral unless the day has a colour of its own); zero for other kinds.

public DateTime? FirstDate { get; } #

Gets the first day of a calendar sentence.

public DateTime? LastDate { get; } #

Gets the last day of a calendar sentence.

public string? MapName { get; } #

Gets the name of the region or tile map definition, when there is one.

public int GroupCount { get; } #

Gets the number of groups of a topology diagram; zero for other kinds.

public int EdgeCount { get; } #

Gets the number of edges of a topology diagram; zero for other kinds.

public string EnglishText { get; } #

Gets the English sentence ChartForgeX writes when no formatter is set.