# AgentPMT Marketplace Product (Agent Format)

Name: Chart Generator
Product ID: 69836138abdf9c195542120a
Vendor: Apoth3osis
Agent description: Create many types of charts and graphs from data with built in styling and theme -  including bar, line, pie, scatter, doughnut, radar, and more. Perfect for creating data visualizations for reports, presentations, dashboards, social media, and documentation.
Price: 200 credits

External Agent API:
- Docs: https://www.agentpmt.com/external-agent-api
- Purchase credits: POST https://www.agentpmt.com/api/external/credits/purchase
- Create session: POST /api/external/auth/session
- Balance: POST https://www.agentpmt.com/api/external/credits/balance
- Invoke this tool: POST https://www.agentpmt.com/api/external/tools/69836138abdf9c195542120a/invoke
- Workflows: GET https://www.agentpmt.com/api/external/workflows
- Workflow fetch: POST https://www.agentpmt.com/api/external/workflows/{workflowId}/fetch
- Workflow start: POST https://www.agentpmt.com/api/external/workflows/{workflowId}/start
- Workflow end: POST https://www.agentpmt.com/api/external/workflows/{workflowId}/end
- Workflow active: POST https://www.agentpmt.com/api/external/workflows/active
- Jobs list: POST https://www.agentpmt.com/api/external/jobs/list
- Job reserve: POST https://www.agentpmt.com/api/external/jobs/{jobId}/reserve
- Job complete: POST https://www.agentpmt.com/api/external/jobs/{jobId}/complete
- Job status: POST https://www.agentpmt.com/api/external/jobs/{jobId}/status
- Job workflow create: POST https://www.agentpmt.com/api/external/jobs/{jobId}/workflow/create
- Job workflow update: PUT https://www.agentpmt.com/api/external/jobs/{jobId}/workflow/{workflowId}
- Job workflow publish (private): POST https://www.agentpmt.com/api/external/jobs/{jobId}/workflow/{workflowId}/publish

Categories: Financial Modeling, Data Science, Financial Data, Developer Tools, Automation, Data Processing, Color & Design Utilities, Mapping & Visualization, Technical Market Analysis, Graphic Design & Layout, Image Generation & Manipulation, AI Copywriting & Text Generation, Blog & Article Writing

```json
{
  "actions": {
    "generate_chart": {
      "description": "Generate a modern, professional chart image from structured data. Supports 9 chart types (bar, line, pie, doughnut, scatter, bubble, radar, polarArea, horizontalBar), 5 preset themes plus custom styling, and 4 export formats (PNG, SVG, PDF, WebP). Returns chart as a cloud-stored file URL or base64-encoded data.",
      "properties": {
        "chart_type": {
          "type": "string",
          "description": "Type of chart to generate",
          "required": true,
          "enum": [
            "bar",
            "line",
            "pie",
            "doughnut",
            "scatter",
            "bubble",
            "radar",
            "polarArea",
            "horizontalBar"
          ]
        },
        "data": {
          "type": "object",
          "description": "Chart.js compatible data object. Must contain 'labels' (array of strings) and/or 'datasets' (array of dataset objects). Each dataset has 'label' (string), 'data' (array of numbers or point objects), and optional color overrides.",
          "required": true,
          "properties": {
            "labels": {
              "type": "array",
              "description": "Array of label strings for chart categories/x-axis",
              "required": false,
              "items": {
                "type": "string"
              }
            },
            "datasets": {
              "type": "array",
              "description": "Array of dataset objects, each with label, data, and optional styling",
              "required": true,
              "items": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "description": "Dataset display name",
                    "required": false
                  },
                  "data": {
                    "type": "array",
                    "description": "Array of numeric values or point objects ({x, y} for scatter/bubble)",
                    "required": true,
                    "items": {
                      "type": "number"
                    }
                  },
                  "backgroundColor": {
                    "type": "string",
                    "description": "Background color override for this dataset",
                    "required": false
                  },
                  "borderColor": {
                    "type": "string",
                    "description": "Border color override for this dataset",
                    "required": false
                  },
                  "borderWidth": {
                    "type": "number",
                    "description": "Border width in pixels",
                    "required": false
                  }
                }
              }
            }
          }
        },
        "theme": {
          "type": "string",
          "description": "Preset theme: 'corporate' (professional blues/grays), 'modern_dark' (dark background, vibrant accents), 'minimal' (black/white/gray), 'colorful' (vibrant marketing colors), 'academic' (colorblind-accessible), 'custom' (no preset, use custom_options)",
          "required": false,
          "default": "corporate",
          "enum": [
            "corporate",
            "modern_dark",
            "minimal",
            "colorful",
            "academic",
            "custom"
          ]
        },
        "width": {
          "type": "integer",
          "description": "Chart width in pixels (100-2000)",
          "required": false,
          "default": 600,
          "minimum": 100,
          "maximum": 2000
        },
        "height": {
          "type": "integer",
          "description": "Chart height in pixels (100-2000)",
          "required": false,
          "default": 400,
          "minimum": 100,
          "maximum": 2000
        },
        "title": {
          "type": "string",
          "description": "Chart title text displayed on the chart",
          "required": false
        },
        "background_color": {
          "type": "string",
          "description": "Background color. Accepts named colors ('white', 'transparent'), HEX ('#FFFFFF'), RGB ('rgb(255,255,255)'), or HSL",
          "required": false,
          "default": "white"
        },
        "output_format": {
          "type": "string",
          "description": "Output format for the chart image: 'png' (raster), 'svg' (vector), 'pdf' (document), 'webp' (compressed)",
          "required": false,
          "default": "png",
          "enum": [
            "png",
            "svg",
            "pdf",
            "webp"
          ]
        },
        "device_pixel_ratio": {
          "type": "integer",
          "description": "Device pixel ratio: 1 for normal displays, 2 for retina/high-DPI",
          "required": false,
          "default": 1,
          "enum": [
            1,
            2
          ]
        },
        "custom_options": {
          "type": "object",
          "description": "Custom Chart.js options object to override theme defaults. Supports any Chart.js 3.x/4.x option (plugins, scales, etc.)",
          "required": false
        },
        "return_base64": {
          "type": "boolean",
          "description": "If true, returns base64-encoded image data instead of a file URL. Useful for embedding in emails or immediate display",
          "required": false,
          "default": false
        },
        "store_file": {
          "type": "boolean",
          "description": "If true, stores the chart in cloud storage and returns a signed download URL",
          "required": false,
          "default": true
        },
        "expiration_days": {
          "type": "integer",
          "description": "Number of days until the stored file expires (1-7)",
          "required": false,
          "default": 7,
          "minimum": 1,
          "maximum": 7
        }
      }
    }
  },
  "properties": {
    "action": {
      "type": "string",
      "description": "Action to perform: get_instructions (returns documentation) or generate_chart (creates chart)",
      "required": true,
      "default": "generate_chart",
      "enum": [
        "get_instructions",
        "generate_chart"
      ]
    },
    "chart_type": {
      "type": "string",
      "description": "Type of chart to generate",
      "required": false,
      "enum": [
        "bar",
        "line",
        "pie",
        "doughnut",
        "scatter",
        "bubble",
        "radar",
        "polarArea",
        "horizontalBar"
      ]
    },
    "data": {
      "type": "object",
      "description": "Chart.js compatible data object with labels and datasets",
      "required": false
    },
    "theme": {
      "type": "string",
      "description": "Preset theme for styling the chart",
      "required": false,
      "default": "corporate",
      "enum": [
        "corporate",
        "modern_dark",
        "minimal",
        "colorful",
        "academic",
        "custom"
      ]
    },
    "width": {
      "type": "integer",
      "description": "Chart width in pixels",
      "required": false,
      "default": 600,
      "minimum": 100,
      "maximum": 2000
    },
    "height": {
      "type": "integer",
      "description": "Chart height in pixels",
      "required": false,
      "default": 400,
      "minimum": 100,
      "maximum": 2000
    },
    "title": {
      "type": "string",
      "description": "Chart title text",
      "required": false
    },
    "background_color": {
      "type": "string",
      "description": "Background color (RGB, HEX, HSL, or named color)",
      "required": false,
      "default": "white"
    },
    "format": {
      "type": "string",
      "description": "Output format for the chart image",
      "required": false,
      "default": "png",
      "enum": [
        "png",
        "svg",
        "pdf",
        "webp"
      ]
    },
    "device_pixel_ratio": {
      "type": "number",
      "description": "Device pixel ratio (1 for normal, 2 for retina)",
      "required": false,
      "default": 1,
      "enum": [
        1,
        2
      ]
    },
    "custom_options": {
      "type": "object",
      "description": "Custom Chart.js options to override theme defaults",
      "required": false
    },
    "return_base64": {
      "type": "boolean",
      "description": "If true, returns base64-encoded image data instead of URL",
      "required": false
    },
    "store_file": {
      "type": "boolean",
      "description": "If true, stores file in cloud storage and returns signed URL",
      "required": false,
      "default": true
    },
    "expiration_days": {
      "type": "integer",
      "description": "Number of days until stored file expires (1-7)",
      "required": false,
      "default": 7,
      "minimum": 1,
      "maximum": 7
    }
  }
}
```
