Action that generates SVG word clouds and tag bars from weighted word lists.

This action provides server-side SVG generation for text visualizations, designed for AI agents and workflows to create publication-quality word clouds from data.

Example

// Word cloud example
await runAction({
ActionName: 'Create SVG Word Cloud',
Params: [
{ Name: 'CloudType', Value: 'cloud' },
{ Name: 'Words', Value: JSON.stringify([
{ text: 'TypeScript', weight: 100 },
{ text: 'JavaScript', weight: 80 },
{ text: 'React', weight: 60 },
{ text: 'Node.js', weight: 50 }
]) },
{ Name: 'MaxWords', Value: '50' },
{ Name: 'Rotation', Value: 'few' },
{ Name: 'Width', Value: '800' },
{ Name: 'Height', Value: '600' }
]
});

// Tag bar example
await runAction({
ActionName: 'Create SVG Word Cloud',
Params: [
{ Name: 'CloudType', Value: 'tagbar' },
{ Name: 'Words', Value: JSON.stringify([
{ text: 'AI', weight: 67 },
{ text: 'Data', weight: 45 },
{ text: 'API', weight: 32 }
]) },
{ Name: 'MaxWords', Value: '10' }
]
});

Hierarchy (view full)

Constructors

Methods

  • Generates an SVG word cloud from the provided data and configuration

    Parameters

    • params: RunActionParams<any>

      The action parameters containing:

      • CloudType: Type of visualization ('cloud' | 'tagbar')
      • Words: JSON array of {text, weight} objects
      • MaxWords: Maximum number of words to display (default: 50)
      • Rotation: Rotation strategy ('none' | 'few' | 'mixed') for clouds
      • MinFont: Minimum font size (default: 10)
      • MaxFont: Maximum font size (default: 80)
      • Seed: Random seed for deterministic layouts (optional)
      • Width: Width in pixels (optional, default: 800)
      • Height: Height in pixels (optional, default: 600)
      • Title: Visualization title (optional)
      • Palette: Color palette name (optional)

    Returns Promise<SVGActionResult>

    A promise resolving to an SVGActionResult

  • Executes the action with the provided parameters.

    Parameters

    • params: RunActionParams<any>

      The action execution parameters including context

    Returns Promise<ActionResultSimple>

    Promise resolving to the action result