API Reference
ChartGrid
Describes a dependency-free small-multiple report made from multiple charts.
Inheritance
- Object
- ChartGrid
Usage
Explore 79 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 26
- Method ChartExtensions.ConfigureTheme
- Method ChartExtensions.WithBrandKit
- Extension method ChartGrid.ConfigureTheme
- Extension method ChartGrid.WithBrandKit
- Method ChartGrid.Add
- Method ChartGrid.ConfigureSubtitleStyle
- Method ChartGrid.ConfigureTitleStyle
- Method ChartGrid.Create
- Method ChartGrid.FromFacets``2
- Method ChartGrid.WithAutomaticPanelSize
- Method ChartGrid.WithAutomaticTheme
- Method ChartGrid.WithColumns
- Method ChartGrid.WithGap
- Method ChartGrid.WithPadding
- Method ChartGrid.WithPanelFit
- Method ChartGrid.WithPanelSize
- Method ChartGrid.WithPanelSpan
- Method ChartGrid.WithPngOutputScale
- Method ChartGrid.WithSharedAxes
- Method ChartGrid.WithSharedXAxis
- Method ChartGrid.WithSharedYAxis
- Method ChartGrid.WithSubtitle
- Method ChartGrid.WithSvgColorVariables
- Method ChartGrid.WithTheme
- Method ChartGrid.WithTitle
- Property ChartGridPage.Grid
Accepted by parameters 53
- Method ChartExtensions.ConfigureTheme
- Method ChartExtensions.Save
- Method ChartExtensions.SaveBmp
- Method ChartExtensions.SaveHtml
- Method ChartExtensions.SavePng
- Method ChartExtensions.SavePpm
- Method ChartExtensions.SaveRasterImage
- Method ChartExtensions.SaveSvg
- Method ChartExtensions.SaveTiff
- Method ChartExtensions.ToBmp
- Method ChartExtensions.ToHtmlFragment
- Method ChartExtensions.ToHtmlPage
- Method ChartExtensions.ToPng
- Method ChartExtensions.ToPpm
- Method ChartExtensions.ToRasterImage
- Method ChartExtensions.ToRgbaImage
- Method ChartExtensions.ToSvg
- Method ChartExtensions.ToTiff
- Method ChartExtensions.WithBrandKit
- Method ChartExtensions.WriteBmp
- Method ChartExtensions.WritePpm
- Method ChartExtensions.WriteRasterImage
- Method ChartExtensions.WriteTiff
- Method ImageComposition.DrawChartGrid
- Extension method VisualCanvas.AddChartGrid
- Extension method ChartGrid.ConfigureTheme
- Extension method ChartGrid.Save
- Extension method ChartGrid.SaveBmp
- Extension method ChartGrid.SaveHtml
- Extension method ChartGrid.SavePng
- Extension method ChartGrid.SavePpm
- Extension method ChartGrid.SaveRasterImage
- Extension method ChartGrid.SaveSvg
- Extension method ChartGrid.SaveTiff
- Extension method ChartGrid.ToBmp
- Extension method ChartGrid.ToHtmlFragment
- Extension method ChartGrid.ToHtmlPage
- Extension method ChartGrid.ToPng
- Extension method ChartGrid.ToPpm
- Extension method ChartGrid.ToRasterImage
- Extension method ChartGrid.ToRgbaImage
- Extension method ChartGrid.ToSvg
- Extension method ChartGrid.ToTiff
- Extension method ChartGrid.ToVisualArtifact
- Extension method ChartGrid.WithBrandKit
- Extension method ChartGrid.WriteBmp
- Extension method ChartGrid.WritePpm
- Extension method ChartGrid.WriteRasterImage
- Extension method ChartGrid.WriteTiff
- Method HtmlChartGridRenderer.RenderFragment
- Method HtmlChartGridRenderer.RenderPage
- Method CompositeArtifactRendering.ToVisualArtifact
- Method VisualsExtensions.AddChartGrid
Constructors
public ChartGrid() #Methods
public ChartGrid Add(Chart chart) #ChartGridAdds a chart to the grid.
Parameters
- chart ChartForgeX.Core.Chart
- The chart to add.
Returns
The current chart grid.
public ChartGrid Add(Chart chart, Int32 columnSpan, Int32 rowSpan = 1) #ChartGridAdds a chart to the grid with a panel span.
Parameters
- chart ChartForgeX.Core.Chart
- The chart to add.
- columnSpan System.Int32
- The number of columns occupied by the chart panel.
- rowSpan System.Int32 = 1
- The number of rows occupied by the chart panel.
Returns
The current chart grid.
public ChartGrid ConfigureSubtitleStyle(Action<TextStyleOverride> configure) #ChartGridConfigures grid subtitle text styling.
Parameters
- configure System.Action<ChartForgeX.Typography.TextStyleOverride>
- The style configuration callback.
Returns
The current chart grid.
public ChartGrid ConfigureTitleStyle(Action<TextStyleOverride> configure) #ChartGridConfigures grid title text styling.
Parameters
- configure System.Action<ChartForgeX.Typography.TextStyleOverride>
- The style configuration callback.
Returns
The current chart grid.
public static ChartGrid Create() #ChartGridCreates a new chart grid.
Returns
A new chart grid instance.
public static ChartGrid FromFacets<T, TKey>(ChartDataset<T?> dataset, Func<T?, TKey?> facet, Func<TKey?, ChartDataset<T?>, Chart> chartFactory, Int32 columns = 2, IEqualityComparer<TKey?>? comparer = null) #ChartGridBuilds a small-multiple grid from deterministic dataset groups.
Type Parameters
- T
- TKey
Parameters
- dataset ChartForgeX.Data.ChartDataset<T?>
- facet System.Func<T?, TKey?>
- chartFactory System.Func<TKey?, ChartForgeX.Data.ChartDataset<T?>, ChartForgeX.Core.Chart>
- columns System.Int32 = 2
- comparer System.Collections.Generic.IEqualityComparer<TKey?>? = null
public IReadOnlyList<ChartGridPage> Paginate(Int32 maximumChartsPerPage = 6) #IReadOnlyList<ChartGridPage>Splits this grid into ordered pages with at most the specified number of charts.
Parameters
- maximumChartsPerPage System.Int32 = 6
- The maximum chart count per page, independent of panel spans.
Returns
Read-only page metadata and independently configurable grids; an empty grid produces no pages.
public PreparedVisual Prepare(VisualRenderContext context) #PreparedVisualPrepares all panels once in the supplied fixed viewport with a shared theme and frame.
Parameters
- context ChartForgeX.Rendering.VisualRenderContext
public ChartGrid WithAutomaticPanelSize() #ChartGridClears the fixed panel size so composed exports use the largest chart dimensions.
Returns
The current chart grid.
public ChartGrid WithAutomaticTheme() #ChartGridClears the grid theme so renderers use the first chart theme.
Returns
The current chart grid.
public ChartGrid WithColumns(Int32 columns) #ChartGridSets the preferred number of columns on wide viewports.
Parameters
- columns System.Int32
- The preferred column count.
Returns
The current chart grid.
public ChartGrid WithGap(Int32 gap) #ChartGridSets the gap between charts in pixels.
Parameters
- gap System.Int32
- The gap in pixels.
Returns
The current chart grid.
public ChartGrid WithPadding(Int32 padding) #ChartGridSets the outer padding around exported grid content in pixels.
Parameters
- padding System.Int32
- The padding in pixels.
Returns
The current chart grid.
public ChartGrid WithPanelFit(VisualPanelFit fit) #ChartGridSets how charts fit inside fixed-size grid panels.
Parameters
- fit ChartForgeX.Primitives.VisualPanelFit
- The panel fit behavior.
Returns
The current chart grid.
public ChartGrid WithPanelSize(Int32 width, Int32 height) #ChartGridSets a fixed panel size for composed SVG and PNG grid exports.
Parameters
- width System.Int32
- The panel width in pixels.
- height System.Int32
- The panel height in pixels.
Returns
The current chart grid.
public ChartGrid WithPanelSpan(Int32 chartIndex, Int32 columnSpan, Int32 rowSpan = 1) #ChartGridSets the panel span for an existing chart in the grid.
Parameters
- chartIndex System.Int32
- The zero-based chart index.
- columnSpan System.Int32
- The number of columns occupied by the chart panel.
- rowSpan System.Int32 = 1
- The number of rows occupied by the chart panel.
Returns
The current chart grid.
public ChartGrid WithPngOutputScale(Int32 scale) #ChartGridSets the output pixel multiplier used by composed PNG grid exports.
Parameters
- scale System.Int32
- The output scale from one to four. Higher values emit larger PNG dimensions with the same logical grid layout.
Returns
The current chart grid.
public ChartGrid WithPngOutputScale(ChartPngOutputScale scale) #ChartGridSets the output pixel multiplier used by composed PNG grid exports using a named density preset.
Parameters
- scale ChartForgeX.Core.ChartPngOutputScale
- The output density preset.
Returns
The current chart grid.
public ChartGrid WithSubtitle(String subtitle) #ChartGridSets the report subtitle.
Parameters
- subtitle System.String
- The report subtitle.
Returns
The current chart grid.
public ChartGrid WithSvgColorVariables(SvgColorVariables? variables) #ChartGridWrites mapped colours in the grid SVG as CSS custom properties with the literal colour as fallback.
Parameters
- variables ChartForgeX.Themes.SvgColorVariables?
- The colour variables, or null to write literal colours.
Returns
The current grid.
public ChartGrid WithTheme(ChartTheme theme) #ChartGridSets the theme used by the grid background and heading.
Parameters
- theme ChartForgeX.Themes.ChartTheme
- The grid theme.
Returns
The current chart grid.
public ChartGrid WithTitle(String title) #ChartGridSets the report title.
Parameters
- title System.String
- The report title.
Returns
The current chart grid.
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public String Title { get; set; } #Gets or sets the report title.
public String Subtitle { get; set; } #Gets or sets the report subtitle.
public Int32 Columns { get; set; } #Gets or sets the preferred number of columns on wide viewports.
public Boolean PreserveEmptyColumns { get; set; } #Gets or sets whether composed SVG and PNG exports retain columns without charts.
public Int32 Gap { get; set; } #Gets or sets the gap between charts in pixels.
public Int32 Padding { get; set; } #Gets or sets the outer padding around exported grid content in pixels.
public Int32 PngOutputScale { get; set; } #Gets or sets the output pixel multiplier used by composed PNG grid exports.
public ChartSize? PanelSize { get; set; } #Gets or sets the optional fixed panel size used by composed SVG and PNG grid exports.
public VisualPanelFit PanelFit { get; set; } #Gets or sets how charts fit inside fixed-size grid panels.
public ChartTheme? Theme { get; set; } #Gets or sets the optional theme used by the grid background and heading.
public TextStyleOverride TitleStyle { get; } #Gets the text style used for the grid title.
public TextStyleOverride SubtitleStyle { get; } #Gets the text style used for the grid subtitle.
public IReadOnlyList<Chart> Charts { get; } #Gets the charts included in the grid.
public IReadOnlyList<ChartGridPanelSpan> PanelSpans { get; } #Gets the panel spans for charts included in the grid.
public VisualAccessibility Accessibility { get; } #Gets the text alternative for the complete chart comparison.
public SvgColorVariables? SvgColorVariables { get; set; } #Gets or sets the CSS custom properties the grid SVG writes for mapped colours (see SvgColorVariables): the grid title, background, and every panel, including charts without their own variables. Null (the default) writes literal colours; PNG output always uses literal colours.
Extension Methods
public static ChartGrid ConfigureTheme(ChartGrid grid, Action<ChartTheme> configure) #ChartGridConfigures the current chart grid theme in place, creating a light grid theme when the grid is currently automatic.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to configure.
- configure System.Action<ChartForgeX.Themes.ChartTheme>
- The theme customization callback.
Returns
The current chart grid.
public static Void Save(ChartGrid grid, String path, RasterImageOptions? rasterOptions = null) #VoidSaves a chart grid using the output path extension to choose SVG, HTML, PNG, or another raster image format.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
- path System.String
- The output file path.
- rasterOptions ChartForgeX.Core.RasterImageOptions? = null
- Optional raster export options.
public static Void SaveBmp(ChartGrid grid, String path, RasterImageOptions? options = null) #VoidSaves a chart grid as a BMP file.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
- path System.String
- The output file path.
- options ChartForgeX.Core.RasterImageOptions? = null
- Optional raster export options.
public static Void SaveHtml(ChartGrid grid, String path) #VoidSaves a chart grid as a complete HTML file.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
- path System.String
- The output file path.
public static Void SavePng(ChartGrid grid, String path) #VoidSaves a chart grid as a PNG file.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
- path System.String
- The output file path.
public static Void SavePpm(ChartGrid grid, String path, RasterImageOptions? options = null) #VoidSaves a chart grid as a PPM file.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
- path System.String
- The output file path.
- options ChartForgeX.Core.RasterImageOptions? = null
- Optional raster export options.
public static Void SaveRasterImage(ChartGrid grid, String path, RasterImageFormat format, RasterImageOptions? options = null) #VoidSaves a chart grid as an opaque raster image file.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
- path System.String
- The output file path.
- format ChartForgeX.Core.RasterImageFormat
- The raster image format.
- options ChartForgeX.Core.RasterImageOptions? = null
- Optional raster export options.
public static Void SaveRasterImage(ChartGrid grid, String path, RasterImageOptions? options = null) #VoidSaves a chart grid as an opaque raster image file using the output path extension to choose the format.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
- path System.String
- The output file path.
- options ChartForgeX.Core.RasterImageOptions? = null
- Optional raster export options.
public static Void SaveSvg(ChartGrid grid, String path) #VoidSaves a chart grid as an SVG file.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
- path System.String
- The output file path.
public static Void SaveTiff(ChartGrid grid, String path, RasterImageOptions? options = null) #VoidSaves a chart grid as a TIFF file.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
- path System.String
- The output file path.
- options ChartForgeX.Core.RasterImageOptions? = null
- Optional raster export options.
public static Byte[] ToBmp(ChartGrid grid, RasterImageOptions? options = null) #Byte[]Renders a chart grid to BMP bytes.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
- options ChartForgeX.Core.RasterImageOptions? = null
- Optional raster export options.
Returns
A BMP image.
public static String ToHtmlFragment(ChartGrid grid) #StringRenders a chart grid to a standalone HTML fragment containing inline SVG charts.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
Returns
An HTML fragment.
public static String ToHtmlFragment(ChartGrid grid, String idScope) #StringRenders a chart grid to an HTML fragment with an additional deterministic ID scope.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
- idScope System.String
- A caller-provided scope used to keep IDs unique when embedding equivalent fragments together.
Returns
An HTML fragment.
public static String ToHtmlPage(ChartGrid grid) #StringRenders a chart grid to a complete HTML document.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
Returns
An HTML page.
public static Byte[] ToPng(ChartGrid grid) #Byte[]Renders a chart grid to PNG bytes.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
Returns
A PNG image.
public static Byte[] ToPpm(ChartGrid grid, RasterImageOptions? options = null) #Byte[]Renders a chart grid to PPM bytes.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
- options ChartForgeX.Core.RasterImageOptions? = null
- Optional raster export options.
Returns
A PPM image.
public static Byte[] ToRasterImage(ChartGrid grid, RasterImageFormat format, RasterImageOptions? options = null) #Byte[]Renders a chart grid to opaque raster image bytes.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
- format ChartForgeX.Core.RasterImageFormat
- The raster image format.
- options ChartForgeX.Core.RasterImageOptions? = null
- Optional raster export options.
Returns
Encoded raster image bytes.
public static RgbaImage ToRgbaImage(ChartGrid grid) #RgbaImageRenders a chart grid directly to an in-memory RGBA image without encoding it.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
Returns
The rendered RGBA image.
public static String ToSvg(ChartGrid grid) #StringRenders a chart grid to SVG markup.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
Returns
SVG markup.
public static String ToSvg(ChartGrid grid, String idScope) #StringRenders a chart grid to SVG markup with an additional deterministic ID scope.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
- idScope System.String
- A caller-provided scope used to keep SVG element IDs unique when embedding multiple SVG grids in one document.
Returns
SVG markup.
public static Byte[] ToTiff(ChartGrid grid, RasterImageOptions? options = null) #Byte[]Renders a chart grid to TIFF bytes.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
- options ChartForgeX.Core.RasterImageOptions? = null
- Optional raster export options.
Returns
A TIFF image.
public static VisualArtifact ToVisualArtifact(ChartGrid grid, String? id = null, VisualArtifactSourceLanguage sourceLanguage = Native) #VisualArtifactWraps a chart grid in a reusable visual artifact.
Parameters
- grid ChartForgeX.Core.ChartGrid
- id System.String? = null
- sourceLanguage ChartForgeX.VisualArtifacts.VisualArtifactSourceLanguage = Native
public static ChartGrid WithBrandKit(ChartGrid grid, ChartBrandKit brandKit) #ChartGridApplies a reusable brand kit to the current chart grid theme, creating a light grid theme when the grid is currently automatic.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to configure.
- brandKit ChartForgeX.Themes.ChartBrandKit
- The brand kit to apply.
Returns
The current chart grid.
public static Void WriteBmp(ChartGrid grid, Stream stream, RasterImageOptions? options = null) #VoidWrites a chart grid to a BMP stream.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
- stream System.IO.Stream
- The destination stream.
- options ChartForgeX.Core.RasterImageOptions? = null
- Optional raster export options.
public static Void WritePpm(ChartGrid grid, Stream stream, RasterImageOptions? options = null) #VoidWrites a chart grid to a PPM stream.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
- stream System.IO.Stream
- The destination stream.
- options ChartForgeX.Core.RasterImageOptions? = null
- Optional raster export options.
public static Void WriteRasterImage(ChartGrid grid, Stream stream, RasterImageFormat format, RasterImageOptions? options = null) #VoidWrites a chart grid to an opaque raster image stream.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
- stream System.IO.Stream
- The destination stream.
- format ChartForgeX.Core.RasterImageFormat
- The raster image format.
- options ChartForgeX.Core.RasterImageOptions? = null
- Optional raster export options.
public static Void WriteTiff(ChartGrid grid, Stream stream, RasterImageOptions? options = null) #VoidWrites a chart grid to a TIFF stream.
Parameters
- grid ChartForgeX.Core.ChartGrid
- The chart grid to render.
- stream System.IO.Stream
- The destination stream.
- options ChartForgeX.Core.RasterImageOptions? = null
- Optional raster export options.