VisualSvgOptions
ChartForgeX.Rendering
Controls safe SVG host integration and explicit captured-effect representation without repeating layout.
Inheritance
- object
- VisualSvgOptions
Usage
Explore 12 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.
Returned or exposed by 8
- Method VisualSvgOptions.WithCompactMarkup
- Method VisualSvgOptions.WithEnhanceHooks
- Method VisualSvgOptions.WithFluidWidth
- Method VisualSvgOptions.WithFontVariables
- Method VisualSvgOptions.WithInheritedFonts
- Method VisualSvgOptions.WithoutProductFonts
- Method VisualSvgOptions.WithPatternTiles
- Method VisualSvgOptions.WithSharedDesignRoles
Accepted by parameters 4
- Method ChartExtensions.ToSvg
- Extension method Chart.ToSvg
- Method HtmlChartRenderer.RenderFragment
- Method PreparedVisual.ToSvg
Constructors
public VisualSvgOptions(string? idScope = null, SvgColorVariables? colorVariables = null, VisualSvgLinkTarget linkTarget = SameContext, bool responsive = false, VisualSvgEffectProfile effectProfile = Baked, VisualRenderOptions? effectRasterOptions = null) #Creates a detached SVG export policy.
Parameters
- idScope string? = null
- Unique host namespace; null uses a deterministic content namespace.
- colorVariables ChartForgeX.Themes.SvgColorVariables? = null
- Host CSS properties with resolved static fallback colors. The mapping is copied.
- linkTarget ChartForgeX.Rendering.VisualSvgLinkTarget = SameContext
- Whether safe scene links use the current browsing context or a new protected context.
- responsive bool = false
- Baked native effect pixels, or supported typed native SVG effects on retained vectors.
- effectProfile ChartForgeX.Rendering.VisualSvgEffectProfile = Baked
- Existing native raster options for baked effects; unused by native SVG filter math.
- effectRasterOptions ChartForgeX.Rendering.VisualRenderOptions? = null
- Whether inline SVG shrinks to its host width while preserving the logical viewport and aspect ratio.
Methods
public VisualSvgOptions WithCompactMarkup(bool enabled = true) #Returns a policy that writes a compact static SVG, retaining the other export settings.
Parameters
- enabled bool = true
- Whether to write compact markup.
public VisualSvgOptions WithEnhanceHooks(bool enabled = true, bool includeData = false) #Returns a policy that writes the hooks a page-level enhance runtime needs, retaining the other export settings.
Parameters
- enabled bool = true
- Whether to write the hooks.
- includeData bool = false
- Whether to add a <metadata data-cfx-enhance-data> JSON island with series names, colours and X-sorted points. It is inert text: the SVG stays script-free.
public VisualSvgOptions WithFluidWidth(bool enabled = true) #Returns a script-free, horizontally fluid SVG policy retaining the other export settings.
Parameters
- enabled bool = true
- Whether to fill the host width at the prepared logical height.
public VisualSvgOptions WithFontVariables(string? familyVariable = null, string? sizeVariable = null) #Lets browser SVG text use page custom properties for font family and/or size, with page inheritance as fallback.
Parameters
- familyVariable string? = null
- A validated custom property such as --body-font; null inherits the page family.
- sizeVariable string? = null
- A validated custom property such as --chart-font-size; null inherits the page size.
Exceptions
ArgumentException– Neither property was supplied, or a property name is invalid.
public VisualSvgOptions WithInheritedFonts() #Lets browser SVG text inherit the embedding page's font family and size.
public VisualSvgOptions WithoutProductFonts() #Omits bundled product font styles from SVG embedded in a host that supplies the fonts.
public VisualSvgOptions WithPatternTiles(bool enabled = true) #Returns an export policy with native user-space pattern tiles, retaining the other host settings.
Parameters
- enabled bool = true
- Whether to use tiles. Static exports keep individual native lines by default.
Inherited Methods
Properties
public bool CompactMarkup { get; } #Gets whether the SVG leaves out what only scripts read.
public bool PatternTiles { get; } #Gets whether native hatch marks serialize as user-space SVG tiles instead of individual clipped lines.
public VisualSvgEffectProfile EffectProfile { get; } #Gets how retained typed scene effects lower. Explicit captured images remain images.
public VisualRenderOptions? EffectRasterOptions { get; } #Gets immutable density/coverage/cap options for baked effects; null resolves native defaults only when needed.
public string? IdScope { get; private set; } #Gets the host ID namespace, or null for a deterministic content namespace.
public SvgColorVariables? ColorVariables { get; } #Gets an independent copy of the host color mapping.
public VisualSvgLinkTarget LinkTarget { get; } #Gets the safe link target policy.
public bool Responsive { get; } #Gets whether the SVG carries self-contained responsive sizing for inline hosts.
public bool EnhanceHooks { get; } #Gets whether the SVG carries the root and legend hooks the optional enhance runtime reads.
public bool EnhanceData { get; } #Gets whether the SVG also carries a compact JSON data island for shared-X tooltips and large key sets.
public bool FluidWidth { get; } #Gets whether horizontal positions fill the host while height, text and marker sizes remain in CSS pixels.