Skip to content
ChartForgeX
Command

New-ImageVisualStory

Module imageplayground
Inputs
ChartForgeX.Motion.VisualMotionPresentation ChartForgeX.VisualBlocks.VisualGrid
Outputs
ChartForgeX.VisualBlocks.VisualGrid ChartForgeX.Motion.VisualMotionPresentation

Creates a script-free animated visual story from a ChartForgeX visual grid.

Syntax

New-ImageVisualStory -FilePath <String> [-Motion <VisualMotionTimeline>] [-MotionDefinition <ScriptBlock>] [-PassThru] [-Show] [-StoryScript] <ScriptBlock> [<CommonParameters>]
#
Parameter set: StoryScript
New-ImageVisualStory -FilePath <String> -Grid <VisualGrid> [-Motion <VisualMotionTimeline>] [-MotionDefinition <ScriptBlock>] [-PassThru] [-Show] [<CommonParameters>]
#
Parameter set: Grid
New-ImageVisualStory -FilePath <String> [-PassThru] -Presentation <VisualMotionPresentation> [-Show] [<CommonParameters>]
#
Parameter set: Presentation

Description

Use a native ChartForgeX VisualGrid or configure one in StoryScript. SVG and HTML preserve motion, while PNG renders the completed static state.

A VisualMotionPresentation returned by New-ImageVisualGrid -Motion can also be piped directly into this command.

Examples

Authored help example

Create an animated engineering profile card

New-ImageVisualStory -StoryScript {
  param($Story)
  [void] $Story.WithTitle('Engineering signal').WithColumns(1)
  $metric = [ChartForgeX.VisualBlocks.MetricCard]::Create().WithMetric('Projects', '126')
  [void] $Story.Add('projects', $metric)
} -MotionDefinition {
  New-ImageVisualMotionCue -TargetId title -Effect Reveal -DurationSeconds 0.9
  New-ImageVisualMotionCue -TargetId projects -Effect Rise -DelaySeconds 0.3
} -FilePath profile.svg

Builds a dependency-free SVG whose one-shot motion honors reduced-motion preferences.

Export a detached motion grid through the pipeline

$motion = [ChartForgeX.Motion.VisualMotionTimeline]::Create().Rise('requests')
New-ImageVisualGrid -ContentDefinition {
  New-ImageVisualGridItem -TargetId requests -Block (New-ImageMetricCard -Label Requests -Value 12840)
} -Motion $motion | New-ImageVisualStory -FilePath requests.svg

Reuses the typed presentation captured by the grid command without changing its source grid or timeline.

Parameters

-FilePath String required
Output file path. Supported extensions are SVG, HTML, HTM, and PNG; static grids without motion can also be written as JPEG, WebP, GIF, BMP, TIFF, or TGA.
-Motion VisualMotionTimeline optionalsets: StoryScript, Grid
Ready-to-use ChartForgeX motion timeline.
-MotionDefinition ScriptBlock optionalsets: StoryScript, Grid
Script block that emits New-ImageVisualMotionCue results or one VisualMotionTimeline.
-PassThru SwitchParameter optional
Write the detached motion presentation, or the static grid when no motion is supplied.
-Show SwitchParameter optional
Open the generated visual after creation.
-StoryScript ScriptBlock requiredposition: 0sets: StoryScript
Script block that receives and configures a new ChartForgeX VisualGrid.
-Grid VisualGrid requiredpipeline: True (ByValue)sets: Grid
Native ChartForgeX visual grid to render.
-Presentation VisualMotionPresentation requiredpipeline: True (ByValue)sets: Presentation
Detached motion presentation to export, including output from New-ImageVisualGrid -Motion.

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.