Skip to content

feat(chartquery): add ChartQuery integration - #9890

Open
josselinlbe wants to merge 1 commit into
simstudioai:stagingfrom
chartquery:feat/chartquery-integration
Open

josselinlbe wants to merge 1 commit into
simstudioai:stagingfrom
chartquery:feat/chartquery-integration

Conversation

@josselinlbe

Copy link
Copy Markdown

Summary

Adds a ChartQuery integration: tools, block, icon and generated docs page. I work on ChartQuery, so this PR comes from the ChartQuery team.

Turn data into images with ChartQuery: render any Chart.js v4 chart from its config, describe a chart in plain language and let ChartQuery build it from your data, or generate QR codes and barcodes. Every operation stores the image and returns public links you can put in a message, an email or a document.

Operations:

  • Create Chart (chartquery_create_chart): Render a Chart.js v4 chart (bar, line, pie, doughnut, radar, scatter and more) from its config and get public links to the image.
  • Create Chart From Prompt (chartquery_create_chart_from_prompt): Describe a chart in plain language, optionally with raw CSV or JSON data, and get public links to the image ChartQuery builds from it.
  • Create QR Code (chartquery_create_qr_code): Generate a QR code for a URL, text, email, phone number or Wi-Fi network and get public links to the image.
  • Create Barcode (chartquery_create_barcode): Generate a barcode (Code 128, EAN-13, UPC-A, ITF-14, Code 39 and more) and get public links to the image.

Every tool sends share: true, so the API answers with JSON links (render_url, view_url, an embed snippet and the expiry) instead of binary image data, which keeps outputs usable by later blocks. Credentials are a ChartQuery API key on the block (AuthMode.ApiKey), sent as the x-api-key header. Every tool is an external ToolConfig.request (POST with a JSON body) against the ChartQuery API. The chart config accepts an object or a JSON string, and the block's code field has a wand that writes a Chart.js config from a description.

Product update (if relevant)

Sim has no chart, QR code or barcode integration today. Workflows can now post a chart of table data to Slack, attach a QR code to an email, or write barcode images back to a product table. The block appears in the integrations catalog under Analytics with 4 templates and grounded skills; the docs page is apps/docs/content/docs/integrations/chartquery.mdx.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

  • Request bodies and outputs follow the documented OpenAPI request schemas and share: true response of each endpoint. The same endpoints returned share links in live calls from our other integrations; these Sim tools have not been run live from a Sim instance yet.
  • Local gate on this branch: bun run lint, bun run type-check, bun run check:audits (all 62 audits), bun run apps/sim/scripts/check-canvas-sentences.ts --block=chartquery, and the blocks Vitest suites (85 files, 795 tests) pass. check-block-registry.ts origin/staging could not run locally because my install skipped lifecycle scripts (node_modules/simstudio-ts-sdk missing); the block is new, so no existing subblock id changes.
  • Regenerated artifacts are committed: tool metadata, docs, block names and the docs manifest.
  • No new unit tests, following the repo's testing guidance.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

Adds ChartQuery tools, block, icon and generated docs: render a Chart.js v4 chart from its config, build a chart from a plain-language description, and create QR codes and barcodes. Every tool asks for share links so the output is a public image URL.
@vercel

vercel Bot commented Nov 11, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Sim Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The new behavior is limited to workflows that choose ChartQuery.

The PR appears safe to merge, with a non-blocking issue that changes surrounding spaces in encoded text.

Findings

  1. P2 Encoded text loses spaces ▶

Summary

Adds ChartQuery with four operations for charts, charts from prompts, QR codes, and barcodes.

  • ChartQuery actions turn chart and code inputs into shareable image links.
  • The ChartQuery block gives workflows four ways to make images.
  • ChartQuery appears in Sim’s integration catalog and docs.

josselinlbe explicitly states that no new unit tests were added, following the repository's testing guidance.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[ChartQuery block] --> B[Selected tool]
  B --> C[Build JSON with share true]
  C --> D[ChartQuery API]
  D --> E[Map image links]
  E --> F[Later workflow blocks]
Loading

Reviews (1) · Last reviewed commit: "feat(chartquery): add ChartQuery integra..." · Reviewed by Greptile

if (value === undefined || value === null) continue
if (typeof value === 'string' && value.trim() === '') continue
if (typeof value === 'number' && !Number.isFinite(value)) continue
body[key] = typeof value === 'string' ? value.trim() : value

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Encoded text loses spaces

chartQueryBody trims every string, including the data sent to QR code and barcode operations. Encoding " hello " sends "hello" instead, so the image contains a different value from the one supplied. Preserve payload strings as given; trim only fields where surrounding spaces are not meaningful.

Suggested change
body[key] = typeof value === 'string' ? value.trim() : value
body[key] = value

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant