Render Chart Skill

Render Chart Skill

Overview

Use the Render Chart skill when your agent already has the labels and numeric values needed to create a chart. The skill generates a chart image that can be used immediately in downstream steps, especially inside a PDF created by the Generate PDF skill.

This skill is best for simple, readable business visuals rather than dashboards or advanced analytics.

Who This Is For

Salesforce admins, RevOps teams, customer operations teams, and solution architects who are extending custom agents with reporting or document-generation skills.

What The Skill Can Create

  • Line charts for trends over time
  • Bar charts for category comparisons

Best Use Cases

  • Monthly revenue trends
  • Quarterly bookings summaries
  • Pipeline by stage
  • Cases by priority
  • Leads by source
  • Region-by-region comparisons
  • Service volume trends over time

What The Skill Needs

Render Chart works best when the agent has:

  • a chart title
  • a set of labels or categories
  • one or more named series
  • exact numeric values

This is important: the skill is designed to visualize known data. It should not guess, estimate, or invent numbers.

When To Use Line vs. Bar

  • Use a line chart for trends over time, sequence, or progression.
  • Use a bar chart when comparing categories, teams, regions, or segments side by side.

Pairing With Generate PDF

Render Chart becomes especially useful when paired with Generate PDF:

  1. The agent collects the values it should visualize.
  2. The agent calls render_chart.
  3. The agent creates a report layout.
  4. The agent calls generate_pdf and places the chart into the final document.

This is a strong pattern for:

  • board update packets
  • customer success reviews
  • sales performance summaries
  • executive one-page reports
  • internal weekly and monthly business updates

Attach The Chart Directly To A Record

You do not always need to wrap a chart in a PDF.

If the user wants the chart PNG itself saved on the current Salesforce record, instruct the agent to call render_chart and attach the chart directly to the record.

This is useful when:

  • a sales manager wants a chart file added to an Account or Opportunity
  • a support team wants a chart attached to a Case
  • an admin wants the raw image available in Salesforce Files for later reuse

In plain language, ask for something like:

Create the chart and attach the PNG file directly to this Salesforce record.

Make Chart PDFs Fit The Page

Render Chart outputs a PNG image. That works well in PDFs, but the agent should still lay the image out correctly inside the HTML report.

For chart-heavy reports, tell the agent to:

  • use HTML rather than Markdown
  • keep page margins fairly narrow
  • make the chart image span the available content width
  • keep the chart height automatic so it scales cleanly

In plain language, ask for something like:

Create the PDF in HTML. Use page margins of about half an inch. Make each chart use the full content width and keep the height automatic.

If you want more explicit layout guidance, use:

When building the chart PDF, use HTML with a letter-sized page and margins of about 0.45in.
Embed each chart image at full content width with automatic height so the chart fits the page cleanly.

Admin Setup Checklist

  1. Add the render_chart skill to the agent.
  2. Add the generate_pdf skill as well if you want downloadable reports.
  3. Make sure the agent prompt tells the model to use exact values from context.
  4. Tell the agent when to choose a line chart and when to choose a bar chart.
  5. If you want chart-based reports, tell the agent to render the chart first and then create the PDF.

Prompt Guidance Snippets

Use snippets like these in your custom agent system prompt.

General Chart Guidance

When the user asks for a chart, call render_chart using the exact labels and values available in context.
Use a line chart for trends over time.
Use a bar chart for category comparisons.
Do not invent or estimate missing values.

Chart + PDF Report

When the user asks for a chart-based report, first call render_chart.
Then call generate_pdf and include the returned chart image in the final report.
Use a business-ready title, a short summary paragraph, and the chart.
Create the PDF in HTML with page margins of about half an inch.
Make the chart image fill the available content width and keep its height automatic.

Direct Chart Attachment

When the user wants the chart file itself saved on the current Salesforce record, call render_chart and attach the PNG directly to the record.
Do not wrap it in a PDF unless the user also asks for a downloadable report.

Time-Series Example

When the user provides monthly or quarterly values, prefer render_chart with a line chart.
Label the axes clearly and keep the title short and business-friendly.

Example Agent Behaviors

Example: Revenue Trend

User request:

Create a chart showing revenue from January through April, then build a short PDF report.

Good agent behavior:

  • call render_chart with a line chart
  • use the months as the labels
  • use the revenue values exactly as provided
  • call generate_pdf and include the chart image in the report

Example: Pipeline By Region

User request:

Show pipeline value by region and create a summary report I can download.

Good agent behavior:

  • call render_chart with a bar chart
  • compare the regions side by side
  • call generate_pdf for the final downloadable report

Tips For Better Results

  • Give the agent clean values rather than vague instructions like "make a chart of recent performance."
  • Tell the agent what business question the chart should answer.
  • Ask for a chart title that a business user would understand immediately.
  • Ask for a PDF report when you want the chart packaged with narrative context.
  • Keep v1 requests simple: one clear chart is usually better than trying to produce a dashboard.

Troubleshooting

  • The agent answered in prose instead of creating a chart: add stronger prompt guidance telling it to call render_chart when values are present.
  • The wrong chart type was used: explicitly tell the agent whether the request is a trend-over-time view or a category comparison.
  • The chart is not in the final document: update the prompt so the agent calls generate_pdf after render_chart.
  • The user wanted the chart file itself, not a PDF: update the prompt so the agent attaches the chart PNG directly to the current Salesforce record.
  • The chart looks incomplete: make sure the labels and values are present and aligned before the agent tries to render it, and tell the agent to use HTML with narrower page margins and a full-width chart image in the PDF.
Generated 2026-03-28T17:25:01.331799Z
iDialogue Agent

Ask about this page, related knowledge or specific iDialogue product and support features.