HtmlInteractiveChartRenderer
ChartForgeX.Interactivity.Html
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
- 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
- The unchanged source hierarchy chart.
- view ChartForgeX.Core.ChartHierarchyView? = null
- An exact source root identity, or null for the complete hierarchy.
- configure System.Action<ChartForgeX.Interactivity.Html.HtmlChartInteractionOptions>? = null
- Optional interaction configuration; enable HierarchyNavigation for managed navigation controls.
Returns
HtmlChartSection A detached section; the embedding host owns request transport and accepted basis tokens.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
- The captured source, or an explicit native baseline for InitialValues.
- to ChartForgeX.Interactivity.Html.HtmlChartSection
- The captured destination used by the same host.
- options ChartForgeX.Interactivity.Html.HtmlNativeTransitionOptions
- Immutable effect, observation count and optional explicit native flash paint.
- cancellationToken System.Threading.CancellationToken = default
- Cancellation checked before publishing a complete bounded payload.
Returns
stringpublic 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
- The already prepared immutable final native section; presentInitial requires this exact accepted destination.
- options ChartForgeX.Interactivity.Html.HtmlNativeTransitionOptions
- InitialFade and its finite frame count. Value/geometry effects retain their explicit baseline overload.
- cancellationToken System.Threading.CancellationToken = default
- Cancels before a complete payload is published.
Returns
stringpublic 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
- viewport ChartForgeX.Core.ChartPolarViewport? = null
- configure System.Action<ChartForgeX.Interactivity.Html.HtmlChartInteractionOptions>? = null
Returns
HtmlChartSectionpublic 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
- The chart to prepare.
- viewport ChartForgeX.Core.ChartCartesianViewport? = null
- 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
- An optional callback configuring the HTML interaction adapter.
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
- The retained committed native section used as the host request basis.
- to ChartForgeX.Interactivity.Html.HtmlChartSection
- The newly prepared destination section returned by the same native host.
- frameCount int = 12
- The finite number of captured native observations, including both endpoints; 2..16.
- cancellationToken System.Threading.CancellationToken = default
- 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
- The retained complete source chart with authored series identities.
- visibility ChartForgeX.Core.ChartVisibilityView? = null
- Immutable absolute targets, native layout and label layering policy; null preserves ordinary preparation.
- viewport ChartForgeX.Core.ChartCartesianViewport? = null
- Optional existing Cartesian source window.
- configure System.Action<ChartForgeX.Interactivity.Html.HtmlChartInteractionOptions>? = null
- Existing HTML host configuration.
Returns
HtmlChartSectionpublic string RenderFragment(Chart chart) #Renders the specified chart to a self-contained embeddable interactive HTML fragment.
Parameters
- chart ChartForgeX.Core.Chart
- 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
- The chart to render.
- configure System.Action<ChartForgeX.Interactivity.Html.HtmlChartInteractionOptions>?
- An optional configuration callback for the HTML interaction adapter.
Returns
string An embeddable interactive HTML fragment.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
- 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
- The chart to render.
- configure System.Action<ChartForgeX.Interactivity.Html.HtmlChartInteractionOptions>?
- 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.public string RenderPage(Chart chart) #Renders the specified chart to a complete interactive HTML document.
Parameters
- chart ChartForgeX.Core.Chart
- 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
- The chart to render.
- configure System.Action<ChartForgeX.Interactivity.Html.HtmlChartInteractionOptions>?
- An optional configuration callback for the HTML interaction adapter.
Returns
string A complete HTML document.Inherited Methods
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.