Draw a chart in the conversation. Use it whenever the answer is a shape rather than a number: a trend over time, a compa
Changed onDraw a chart in the conversation. Use it whenever the answer is a shape rather than a number: a trend over time, a comparison across products or campaigns, a split of a total, a relationship between two measures. Prefer a chart to a markdown table for anything with more than about five rows of numbers, and always pass the figures you actually read from a tool — never invent or round data to make a nicer picture. Pick the kind by the question: line/area for a value over time; bar for magnitude across categories; stacked_bar or stacked_area when the TOTAL is also a real quantity; pie or donut for one whole split into a few parts; scatter for two measures against each other; combo for one measure as bars with another as a line. There is no dual-axis chart on purpose — two measures of very different scale go in two charts. ALWAYS set unit (and currency when it is money): a currency drawn as a bare number is a figure the merchant will read as the wrong thing. ALWAYS set source with the tool you read, the window, and the row count, so the merchant can trace the number back. At most 6 series; if you have more, chart the ones that matter and say so. Write a one-line answer in prose as well — the chart supports the sentence, it does not replace it.
Request
- Base URLhttps://app.magistry.io
- Auth
- HTTP bearer
- or OAuth 2Authorization codehttps://app.magistry.io/api/oauth/authorizeToken URLhttps://app.magistry.io/api/oauth/tokenScopesread
Request body
Chosen by the question the data answers, not by preference.
The rows, each an object. Every yKey must be a NUMBER in every row it appears in; use null for a genuinely missing point rather than 0, which is a measurement.
The field on the x axis (or the slice name for pie/donut).
The measures to plot. Six at most — the series palette has six slots and is never reused.
Display names keyed by raw field name, e.g. {"rev":"Revenue","d":"Day"}.
What the chart shows, as a short noun phrase.
The window, the filter, or the caveat. One line.
How to format values. Percentages are whole numbers (12.5 means 12.5%), not fractions.
ISO 4217, when unit is currency. e.g. EUR, GBP, USD.
combo only: which series are bars.
combo only: which series are the line.
An optional marked rule: a target, a break-even, last period's average.
Where these numbers came from. Set it whenever the data came from a tool — it is what lets the merchant trace a figure back to the question that produced it.
Response
Tool result
Changes
- warning
added the new
method_not_allowedenum value to theerrorresponse property for the response status - warning
added the new
method_not_allowedenum value to theerrorresponse property for the response status - warning
added the new
method_not_allowedenum value to theerrorresponse property for the response status
11 more changes in this revision
- warning