# HtmlInteractiveChartRenderer

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

 Class  

`ChartForgeX.Interactivity.Html`

**Namespace**

`ChartForgeX.Interactivity.Html`

**Assembly**

`ChartForgeX.Interactivity.Html`

**Source**

[HtmlInteractiveChartRenderer.cs:21](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlInteractiveChartRenderer.cs#L21)

**Modifiers**

sealed

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

## Inheritance

- object
- HtmlInteractiveChartRenderer

 Filter members   

    Show inherited   

 

## Constructors

 `public HtmlInteractiveChartRenderer()` [#](#constructor-ctor) 

## Methods

 `public static string? AutoThemeStyleSheet(Chart chart)` [#](#method-autothemestylesheet-chartforgex-core-chart) 

[HtmlInteractiveChartRenderer.cs:191](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlInteractiveChartRenderer.cs#L191)

Returns the scoped stylesheet that lets a [ThemeMode.Auto](/api/chartforgex-thememode/) 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)` [#](#method-preparehierarchysection-chartforgex-core-chart-chartforgex-core-charthierarchyview-action-chartforgex-interactivity-html-htmlchartinteractionoptions) 

[HtmlInteractiveChartRenderer.Hierarchy.cs:18](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlInteractiveChartRenderer.Hierarchy.cs#L18)

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)` [#](#member-384a1afb6c3488643061ec46) 

[HtmlInteractiveChartRenderer.NativeTransition.cs:32](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlInteractiveChartRenderer.NativeTransition.cs#L32)

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)` [#](#method-preparenativetransitionjson-chartforgex-interactivity-html-htmlchartsection-chartforgex-interactivity-html-htmlnativetransitionoptions-threading-cancellationtoken) 

[HtmlInteractiveChartRenderer.NativeTransition.Initial.cs:19](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlInteractiveChartRenderer.NativeTransition.Initial.cs#L19)

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)` [#](#method-preparepolarsection-chartforgex-core-chart-chartforgex-core-chartpolarviewport-action-chartforgex-interactivity-html-htmlchartinteractionoptions) 

[HtmlInteractiveChartRenderer.Polar.cs:15](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlInteractiveChartRenderer.Polar.cs#L15)

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**

Returns

 `HtmlChartSection` 

 `public HtmlChartSection PrepareSection(Chart chart, ChartCartesianViewport? viewport = null, Action<HtmlChartInteractionOptions>? configure = null)` [#](#method-preparesection-chartforgex-core-chart-chartforgex-core-chartcartesianviewport-action-chartforgex-interactivity-html-htmlchartinteractionoptions) 

[HtmlInteractiveChartRenderer.cs:128](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlInteractiveChartRenderer.cs#L128)

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)` [#](#method-preparevaluetransitionjson-chartforgex-interactivity-html-htmlchartsection-chartforgex-interactivity-html-htmlchartsection-int32-threading-cancellationtoken) 

[HtmlInteractiveChartRenderer.ValueTransition.cs:25](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlInteractiveChartRenderer.ValueTransition.cs#L25)

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)` [#](#method-preparevisibilitysection-chartforgex-core-chart-chartforgex-core-chartvisibilityview-chartforgex-core-chartcartesianviewport-action-chartforgex-interactivity-html-htmlchartinteractionoptions) 

[HtmlInteractiveChartRenderer.Visibility.cs:19](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlInteractiveChartRenderer.Visibility.cs#L19)

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.

Returns

 `HtmlChartSection` 

 RenderFragment 2 overloads 

 `public string RenderFragment(Chart chart)` [#](#method-renderfragment-chartforgex-core-chart) 

[HtmlInteractiveChartRenderer.cs:59](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlInteractiveChartRenderer.cs#L59)

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)` [#](#method-renderfragment-chartforgex-core-chart-action-chartforgex-interactivity-html-htmlchartinteractionoptions) 

[HtmlInteractiveChartRenderer.cs:68](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlInteractiveChartRenderer.cs#L68)

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)` [#](#method-renderfragmentwithoutassets-chartforgex-core-chart) 

[HtmlInteractiveChartRenderer.cs:98](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlInteractiveChartRenderer.cs#L98)

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)` [#](#method-renderfragmentwithoutassets-chartforgex-core-chart-action-chartforgex-interactivity-html-htmlchartinteractionoptions) 

[HtmlInteractiveChartRenderer.cs:107](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlInteractiveChartRenderer.cs#L107)

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)` [#](#method-renderpage-chartforgex-core-chart) 

[HtmlInteractiveChartRenderer.cs:21](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlInteractiveChartRenderer.cs#L21)

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)` [#](#method-renderpage-chartforgex-core-chart-action-chartforgex-interactivity-html-htmlchartinteractionoptions) 

[HtmlInteractiveChartRenderer.cs:30](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlInteractiveChartRenderer.cs#L30)

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. 

## Inherited Methods

 `public virtual bool Equals(object? obj)` [#](#method-equals-object) 

Inherited from object

Parameters

**obj object? required**

Returns

 `bool` 

 `public virtual int GetHashCode()` [#](#method-gethashcode) 

Inherited from object

Returns

 `int` 

 `public Type GetType()` [#](#method-gettype) 

Inherited from object

Returns

 `Type` 

 `public virtual string? ToString()` [#](#method-tostring) 

Inherited from object

Returns

 `string?` 

## Properties

 `public static string StyleSheet { get; }` [#](#property-stylesheet) 

[HtmlInteractiveChartRenderer.cs:149](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlInteractiveChartRenderer.cs#L149)

Builds the stylesheet used by embeddable interactive chart fragments.

Examples

```csharp
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; }` [#](#property-script) 

[HtmlInteractiveChartRenderer.cs:155](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlInteractiveChartRenderer.cs#L155)

Builds the JavaScript runtime used by embeddable interactive chart fragments.

 `public static string FeatureScript { get; }` [#](#property-featurescript) 

[HtmlInteractiveChartRenderer.cs:162](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlInteractiveChartRenderer.cs#L162)

Builds the optional feature bundles (motion, data export and context menu, series isolation, hierarchy and category drill-down) for hosts that register [HtmlInteractiveChartRenderer.Script](/api/chartforgex-interactivity-html-htmlinteractivechartrenderer/) themselves.

<!-- PowerForge markdown artifact sha256:D7AECA86BE309529ACAD687DA1E17F76F289B1E99EFCD3A1B0765F63A82BE4A0 -->
