Skip to content
ChartForgeX
Class

HtmlInteractiveChartRenderer

ChartForgeX.Interactivity.Html

Namespace
ChartForgeX.Interactivity.Html
Assembly
ChartForgeX.Interactivity.Html
Modifiers
sealed

Renders a ChartForgeX chart as a self-contained interactive HTML document.

Inheritance

  • object
  • HtmlInteractiveChartRenderer

Constructors

public HtmlInteractiveChartRenderer() #

Methods

public static string? AutoThemeStyleSheet(Chart chart) #

Returns the scoped stylesheet that lets a ThemeMode.Auto chart's interactive section follow the viewer's colour scheme, or null for an explicit mode or a chart with its own SVG colour variables.

Parameters

chart ChartForgeX.Core.Chart required
The chart the section is rendered from.

Returns

string? Plain CSS for the section root's data-cfx-auto-theme scope, or null.
public HtmlChartSection PrepareHierarchySection(Chart chart, ChartHierarchyView? view = null, Action<HtmlChartInteractionOptions>? configure = null) #

Prepares matching interactive markup and native exports for an existing Treemap or Sunburst root.

Parameters

chart ChartForgeX.Core.Chart required
The unchanged source hierarchy chart.
view ChartForgeX.Core.ChartHierarchyView? = null optional
An exact source root identity, or null for the complete hierarchy.
configure System.Action<ChartForgeX.Interactivity.Html.HtmlChartInteractionOptions>? = null optional
Optional interaction configuration; enable HierarchyNavigation for managed navigation controls.

Returns

HtmlChartSection A detached section; the embedding host owns request transport and accepted basis tokens.
PrepareNativeTransitionJson 2 overloads
public string PrepareNativeTransitionJson(HtmlChartSection from, HtmlChartSection to, HtmlNativeTransitionOptions options, CancellationToken cancellationToken = default) #

Captures finite native values, explicit initial values, changed-value flash, or finite retained native visibility through existing native owners.

Parameters

from ChartForgeX.Interactivity.Html.HtmlChartSection required
The captured source, or an explicit native baseline for InitialValues.
to ChartForgeX.Interactivity.Html.HtmlChartSection required
The captured destination used by the same host.
options ChartForgeX.Interactivity.Html.HtmlNativeTransitionOptions required
Immutable effect, observation count and optional explicit native flash paint.
cancellationToken System.Threading.CancellationToken = default optional
Cancellation checked before publishing a complete bounded payload.

Returns

string
public string PrepareNativeTransitionJson(HtmlChartSection final, HtmlNativeTransitionOptions options, CancellationToken cancellationToken = default) #

Captures a whole-visual initial fade over one authoritative native final section.

Parameters

final ChartForgeX.Interactivity.Html.HtmlChartSection required
The already prepared immutable final native section; presentInitial requires this exact accepted destination.
options ChartForgeX.Interactivity.Html.HtmlNativeTransitionOptions required
InitialFade and its finite frame count. Value/geometry effects retain their explicit baseline overload.
cancellationToken System.Threading.CancellationToken = default optional
Cancels before a complete payload is published.

Returns

string
public HtmlChartSection PreparePolarSection(Chart chart, ChartPolarViewport? viewport = null, Action<HtmlChartInteractionOptions>? configure = null) #

Prepares one continuous Polar section and its matching detached angle/radius scene.

Parameters

chart ChartForgeX.Core.Chart required
viewport ChartForgeX.Core.ChartPolarViewport? = null optional
configure System.Action<ChartForgeX.Interactivity.Html.HtmlChartInteractionOptions>? = null optional
public HtmlChartSection PrepareSection(Chart chart, ChartCartesianViewport? viewport = null, Action<HtmlChartInteractionOptions>? configure = null) #

Prepares an asset-free interactive section and its matching detached native scene.

Parameters

chart ChartForgeX.Core.Chart required
The chart to prepare.
viewport ChartForgeX.Core.ChartCartesianViewport? = null optional
Optional explicit X, primary Y or XY windows for supported vertical Cartesian charts. Null prepares the full domain, including when resetting a previous viewport. An omitted axis retains its full-data domain; primary Y windows require no secondary-axis series.
configure System.Action<ChartForgeX.Interactivity.Html.HtmlChartInteractionOptions>? = null optional
An optional callback configuring the HTML interaction adapter.

Returns

HtmlChartSection The section markup and the prepared scene used to render it.

Exceptions

  • ArgumentNullException – The chart is null.
  • NotSupportedException – An explicit viewport is requested for an unsupported chart.
  • ArgumentOutOfRangeException – An explicit window extends outside its full domain or cannot be mapped.
  • InvalidOperationException – An explicit viewport is requested without observations or a usable plot.
public string PrepareValueTransitionJson(HtmlChartSection from, HtmlChartSection to, int frameCount = 12, CancellationToken cancellationToken = default) #

Captures bounded native SVG frames for one typed, identified Progress, LayeredRadial, Circle, ProgressRing, Gauge, Bullet or compatible fixed Line/Bar, positive Pie/Donut or fixed authored Treemap/Sunburst value edit.

Parameters

from ChartForgeX.Interactivity.Html.HtmlChartSection required
The retained committed native section used as the host request basis.
to ChartForgeX.Interactivity.Html.HtmlChartSection required
The newly prepared destination section returned by the same native host.
frameCount int = 12 optional
The finite number of captured native observations, including both endpoints; 2..16.
cancellationToken System.Threading.CancellationToken = default optional
Cancels native capture before a complete response is published.

Returns

string JSON for the optional native reply's transition field. The normal html/basis response remains authoritative.
public HtmlChartSection PrepareVisibilitySection(Chart chart, ChartVisibilityView? visibility = null, ChartCartesianViewport? viewport = null, Action<HtmlChartInteractionOptions>? configure = null) #

Captures a native visibility view through the incumbent prepared HTML section and lifetime.

Parameters

chart ChartForgeX.Core.Chart required
The retained complete source chart with authored series identities.
visibility ChartForgeX.Core.ChartVisibilityView? = null optional
Immutable absolute targets, native layout and label layering policy; null preserves ordinary preparation.
viewport ChartForgeX.Core.ChartCartesianViewport? = null optional
Optional existing Cartesian source window.
configure System.Action<ChartForgeX.Interactivity.Html.HtmlChartInteractionOptions>? = null optional
Existing HTML host configuration.
RenderFragment 2 overloads
public string RenderFragment(Chart chart) #

Renders the specified chart to a self-contained embeddable interactive HTML fragment.

Parameters

chart ChartForgeX.Core.Chart required
The chart to render.

Returns

string An embeddable interactive HTML fragment.
public string RenderFragment(Chart chart, Action<HtmlChartInteractionOptions>? configure) #

Renders the specified chart to a self-contained embeddable interactive HTML fragment.

Parameters

chart ChartForgeX.Core.Chart required
The chart to render.
configure System.Action<ChartForgeX.Interactivity.Html.HtmlChartInteractionOptions>? required
An optional configuration callback for the HTML interaction adapter.

Returns

string An embeddable interactive HTML fragment.
RenderFragmentWithoutAssets 2 overloads
public string RenderFragmentWithoutAssets(Chart chart) #

Renders the specified chart to an embeddable interactive HTML fragment without stylesheet or script assets.

Parameters

chart ChartForgeX.Core.Chart required
The chart to render.

Returns

string An embeddable interactive HTML fragment that expects the caller to register interactive chart assets.
public string RenderFragmentWithoutAssets(Chart chart, Action<HtmlChartInteractionOptions>? configure) #

Renders the specified chart to an embeddable interactive HTML fragment without stylesheet or script assets.

Parameters

chart ChartForgeX.Core.Chart required
The chart to render.
configure System.Action<ChartForgeX.Interactivity.Html.HtmlChartInteractionOptions>? required
An optional configuration callback for the HTML interaction adapter.

Returns

string An embeddable interactive HTML fragment that expects the caller to register interactive chart assets.
RenderPage 2 overloads
public string RenderPage(Chart chart) #

Renders the specified chart to a complete interactive HTML document.

Parameters

chart ChartForgeX.Core.Chart required
The chart to render.

Returns

string A complete HTML document.
public string RenderPage(Chart chart, Action<HtmlChartInteractionOptions>? configure) #

Renders the specified chart to a complete interactive HTML document.

Parameters

chart ChartForgeX.Core.Chart required
The chart to render.
configure System.Action<ChartForgeX.Interactivity.Html.HtmlChartInteractionOptions>? required
An optional configuration callback for the HTML interaction adapter.

Returns

string A complete HTML document.

Properties

public static string StyleSheet { get; } #

Builds the stylesheet used by embeddable interactive chart fragments.

Examples

var css = ChartFontAssets.StyleSheet + HtmlInteractiveChartRenderer.StyleSheet;
var fragment = renderer.RenderFragmentWithoutAssets(chart, options => options.TextPresentation = HtmlChartTextPresentation.Browser);
// Register css and Script once outside the asset-free fragments.
public static string Script { get; } #

Builds the JavaScript runtime used by embeddable interactive chart fragments.

public static string FeatureScript { get; } #

Builds the optional feature bundles (motion, data export and context menu, series isolation, hierarchy and category drill-down) for hosts that register HtmlInteractiveChartRenderer.Script themselves.