Skip to content
ChartForgeX
Class

HtmlChartDataAssets

ChartForgeX.Interactivity.Html

Namespace
ChartForgeX.Interactivity.Html
Assembly
ChartForgeX.Interactivity.Html
Modifiers
static

The scripts for chart width sets that carry data (HtmlWidthSetOptions): the reader, which only adds CfxEnhance.data, and the hover runtime, which adds CfxEnhance.mount. Both are fixed texts; nothing is written per chart.

Inheritance

  • object
  • HtmlChartDataAssets

Remarks

A page that only builds tables loads HtmlChartDataAssets.ReaderScriptFile. A page with hover values loads HtmlChartDataAssets.Files. The enhance runtime (HtmlEnhanceAssets) isn't needed, and all of them can be on one page in any order. See docs/enhance.md.

Methods

public static IReadOnlyList<HtmlAssetFile> Files(bool hover = true) #

Returns the files a bundle writes with HtmlInteractiveAssetFiles.WriteTo, in load order.

Parameters

hover bool = true optional
Whether the pages also show hover values.

Returns

IReadOnlyList<HtmlAssetFile> The reader, or the stylesheet, the reader and the hover script.
public static string InlineMarkup(string? nonce = null, bool hover = true) #

Returns the inline elements. Emit them once per document.

Parameters

nonce string? = null optional
An optional CSP nonce for every element.
hover bool = true optional
Whether the page also shows hover values.

Returns

string HTML markup.
public static string ReferenceMarkup(HtmlAssetReferences assets, string? nonce = null, bool hover = true) #

Returns the elements that reference the shared files.

Parameters

assets ChartForgeX.Interactivity.Html.HtmlAssetReferences required
Where the bundle's asset files are served from.
nonce string? = null optional
An optional CSP nonce for the script elements.
hover bool = true optional
Whether the page also shows hover values.

Returns

string HTML markup.

Properties

public static string ReaderScript { get; } #

Gets the reader script, which adds CfxEnhance.data(element).

public static string HoverScript { get; } #

Gets the hover script, which adds CfxEnhance.mount(scope) and CfxEnhance.unmount(scope). It also needs the reader.

public static string HoverStyleSheet { get; } #

Gets the hover stylesheet. The reader needs none.

public static HtmlAssetFile ReaderScriptFile { get; } #

Gets the reader script as a content-addressed shared file.

public static HtmlAssetFile HoverScriptFile { get; } #

Gets the hover script as a content-addressed shared file.

public static HtmlAssetFile HoverStyleSheetFile { get; } #

Gets the hover stylesheet as a content-addressed shared file.