Skip to content
ChartForgeX
Command

New-ImageVisualGrid

Module imageplayground
Inputs
System.Object[]
Outputs
ChartForgeX.VisualBlocks.VisualGrid ChartForgeX.Motion.VisualMotionPresentation

Creates a reusable dashboard grid from charts and visual blocks.

Syntax

New-ImageVisualGrid [-AdaptiveRowHeights] [-Columns <Int32>] [-ContentDefinition] <ScriptBlock> [-FilePath <String>] [-Frame] [-Gap <Int32>] [-Motion <VisualMotionTimeline>] [-Padding <Int32>] [-PanelFit <Contain|Stretch>] [-PanelHeight <Int32>] [-PanelWidth <Int32>] [-PassThru] [-Show] [-Subtitle <String>] [-Theme <ChartTheme>] [-Title <String>] [<CommonParameters>]
#
Parameter set: Definition
New-ImageVisualGrid [-AdaptiveRowHeights] [-Columns <Int32>] -Content <Object[]> [-FilePath <String>] [-Frame] [-Gap <Int32>] [-Motion <VisualMotionTimeline>] [-Padding <Int32>] [-PanelFit <Contain|Stretch>] [-PanelHeight <Int32>] [-PanelWidth <Int32>] [-PassThru] [-Show] [-Subtitle <String>] [-Theme <ChartTheme>] [-Title <String>] [<CommonParameters>]
#
Parameter set: Content

Description

Render the grid directly, pass it to New-ImageVisualStory, or compose it inside a ChartForgeX visual canvas.

With Motion, the output is a detached VisualMotionPresentation accepted by New-ImageVisualStory. Static grids remain VisualGrid objects.

HTML reflows panels on narrow screens. SVG and raster output keep their authored dimensions; use one column and appropriately sized child blocks for a compact fixed export. Apply the same theme to the grid and its children for a consistent report.

Examples

Authored help example

Create a status dashboard

New-ImageVisualGrid -Title 'Service health' -Columns 2 -ContentDefinition { New-ImageMetricCard -Label 'Requests' -Value 12840 -Status Positive; New-ImageListBlock -Title 'Checks' -Item API,Database -Status Positive,Warning } -FilePath dashboard.svg

Give every panel the same width and let rows size to their content

$cards | New-ImageVisualGrid -Columns 3 -PanelWidth 300 -FilePath cards.png

Without -PanelHeight, content is resized to the width rather than squeezed into a fixed box.

Parameters

-AdaptiveRowHeights SwitchParameter optional
Use each row's natural item height.
-Columns Int32 optional
Preferred column count.
-ContentDefinition ScriptBlock requiredposition: 0sets: Definition
Script block that emits charts, visual blocks, or New-ImageVisualGridItem results.
-FilePath String optional
Optional output path. Omit it to return the grid or detached motion presentation.
-Frame SwitchParameter optional
Render a subtle outer frame.
-Gap Int32 optional
Gap between panels in pixels.
-Motion VisualMotionTimeline optional
Optional script-free SVG and HTML motion timeline.
-Padding Int32 optional
Outer grid padding in pixels.
-PanelFit VisualPanelFit optional
How child content fits fixed panels: Contain (default) scales uniformly; Stretch scales each axis independently and distorts content.
Possible values: Contain, Stretch
-PanelHeight Int32 optional
Panel height in pixels. Requires -PanelWidth.
-PanelWidth Int32 optional
With -PanelHeight, every panel gets that fixed size and content is fitted with -PanelFit. Alone, each chart and block is resized to the panel width (or the spanned width) keeping its aspect ratio, and each row takes the height of its tallest item. The supplied charts and blocks are resized in place.
-PassThru SwitchParameter optional
Return the grid or detached motion presentation when an output file is also written.
-Show SwitchParameter optional
Open the rendered dashboard.
-Subtitle String optional
Optional dashboard subtitle.
-Theme ChartTheme optional
ChartForgeX theme.
Possible values: Default, Dark, Light, Colorblind, Aurora, Editorial, Candy, PeopleInfographic, Terminal, TransparentOverlayDark, Minimal, DashboardLight, SaasDashboardLight, RestaurantDashboardLight
-Title String optional
Optional dashboard title.
-Content Object[] requiredpipeline: True (ByValue)sets: Content
Charts, visual blocks, or grid items supplied directly or through the pipeline.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.