Build a chart.
Check what it drew.
Working examples, precise option errors and a readable model of the rendered chart. Give your agent a way to check its work, from the first configuration to the final values.
Use Markdown, repository instructions, a shell or MCP with the tools you choose.
Validate the options
Get the exact path, issue and suggested fix.
WestCoastCharts.validate(options)Render the chart
Use the same configuration in your application.
await chart.render()Read the drawn state
Inspect values, scales and supported aggregates.
chart.describe()Catch an option error before rendering.
The configuration below uses legend.enabled. Run the library validator, apply its suggested correction, then inspect the chart it renders.
Runs in your browser with Library 1.1.5. Three illustrative values; no MCP server is called.
chart: { type: 'bar' },
series: [{ name: 'Requests', data: [12, 19, 7] }],
legend: { enabled: false }Ready to validate.
Read the returned model
Discover, validate, render, describe.
Seven tools cover discovery, validation, rendering and inspection. Start from a supported example, repair the configuration, then check the values the renderer actually drew.
Public agent tools 0.2.3, tested with Library 1.1.5; available from the versioned GitHub release and npm. Browser examples use Library 1.1.5. Compare versions and limits ↓
Premium customers and trial users can connect their agents to the same tools with their privately downloaded complete library and licence key. Set up Premium for your agents →
npm install west-coast-charts@1.1.5
npm install west-coast-charts-agent@0.2.3
npx --no-install wcc --version
npx --no-install wcc-mcp --version- 01
Discover
list_chart_types · list_examples · get_example · get_schemaChoose a supported type, retrieve a starting spec and request only the schema path you need.
- 02
Validate
validate_chartRead errors and warnings, apply the supplied hints, then validate again until ok is true. Validation does not establish that the data tells the right story.
- 03
Render
render_chartReturn SVG or PNG with a verification table. Use delivery: "link" when the image bytes are not needed in the model context.
- 04
Describe
describe_chartRead the drawn values as JSON or Markdown. Check units, aggregate functions, hidden series and tableSource before making a claim.
Inspect an MCP validation call and response
Illustrative request and selected response fields, checked against the tool contract. Not executed on this page. The current tools require the real e1 validator; a missing provider is an explicit error.
{
"name": "validate_chart",
"arguments": {
"spec": {
"chart": {
"type": "bar"
},
"series": [
{
"name": "Revenue",
"data": [
12,
19,
7
]
}
],
"legend": {
"enabled": false
}
}
}
}{
"structuredContent": {
"ok": false,
"validator": "e1",
"errors": [
{
"kind": "unknown_option",
"path": "legend.enabled",
"pointer": "/legend/enabled",
"suggestion": "legend.show",
"fix": {
"op": "rename",
"from": "legend.enabled",
"to": "legend.show"
}
}
],
"warnings": []
}
}Read result provenance and distinguish validation from tool failure
Know where a result came from.
render_chart and describe_chart return the inspection model in structuredContent.table. Its sibling tableSource must be describe in the current tools. The real library description provider is required; missing modules produce an explicit error. Do not treat stub or null output from an older server as full inspection.
Check structuredContent.table.table.total, structuredContent.table.table.truncated, units and each aggregation function. Full models can still contain unsupported or null fields. Percentiles, rates and scores are not additive totals.
Separate invalid options from tool failure.
validate_chart returning ok: false is a normal result. The validator field must identify the real e1 validator. Current tools fail explicitly if it is unavailable. It does not verify the business meaning of data or validate a Premium key.
Failures use isError: true. The JSON envelope {error:{kind,message,hint,details}} is in the second text block of content, not structuredContent. Follow its hint, then validate again.
Resources, prompts, transport and execution limits
Agent tools 0.2.3 target Library 1.1.5. The CLI and MCP guides list tested modules, optional Premium runtime loading and known headless limits. Check the resolved runtime rather than assuming that a browser preview proves headless support.
Read wcc://docs/agent-quickstart, discover the listed wcc://docs/{slug} resources, and inspect wcc://version for the actual server, render-core, library and font versions. wcc://errors supplies error guidance. The last 32 renders are available through wcc://renders/{id}.
The build_dashboard and pick_chart_type prompts provide reusable workflows. Use schema slices, paginated examples and delivery: "link" to keep the model context small. Connection options are stdio or Streamable HTTP, with optional configured bearer/OAuth authentication.
The seven chart tools compute results without writing files or making outbound chart-data requests. Specs are JSON, with no formatter functions. Configured HTTP authentication can fetch a JWKS, so network access is not universally absent. Width, height, scale and pixel limits apply.
CLI chart export and skills install write files. Their overwrite and confirmation flags are documented separately. This page does not run an MCP server or execute these examples.
Premium keys and machine-readable licence errors
Headless Premium rendering needs a configured licence key, or explicit evaluation mode that leaves an unlicensed watermark. Browser localhost evaluation does not imply that headless tools bypass licensing. Keep keys in server configuration or the documented HTTP header, out of shared specs.
Missing or rejected keys produce kind: "license" with details.reason equal to license_required or license_invalid. The CLI reference documents key-source precedence and exit codes. The 30-day trial availability includes all 13 families, including Quint, Vitals Clock and Practice Schedule. Start the trial on the pricing page. These examples do not issue a key or start a trial.
Give your agent a reliable starting point.
One rule set. Use the plain Markdown version with your agent, or choose an optional editor-specific format.
Repository instructions
AGENTS.mdReview and merge into your existing instructions. Use with an agent that reads AGENTS.md, or provide the text as context.DownloadCopilot instructions
.github/copilot-instructions.mdOptional format for GitHub Copilot. Merge with existing project instructions.DownloadCursor rule
.cursor/rules/westcoast-charts.mdcOptional .mdc format for Cursor projects. Review the file scope before adding it.Downloadcurl -fsSL https://westcoast-charts.com/agents/AGENTS.md -o westcoast-charts.instructions.md
# Review, then merge the relevant rules into your project instructions.Read the complete rule set
## WestCoast Charts
WestCoast Charts (1.1.5, release, public Core release, on npm) is an ApexCharts-4.x-compatible charting library. Docs for agents: https://westcoast-charts.com/llms.txt
- Install the current MIT Core with `npm install west-coast-charts@1.1.5`. Alternative versioned archives and checksums: https://westcoast-charts.com/download/index.md. Import the default export: `import WestCoastCharts from 'west-coast-charts'`. Do not import from `apexcharts`.
- Create charts with `const chart = new WestCoastCharts(element, options)` and `await chart.render()`; call `chart.destroy()` when the element is removed (React effect cleanup, Vue `onBeforeUnmount`, Svelte `onDestroy`, Angular `ngOnDestroy`).
- Options use the ApexCharts 4.x format. Before using an option you are not sure about, look it up in https://westcoast-charts.com/docs/reference/options/index.md (premium types: https://westcoast-charts.com/docs/reference/premium-options/index.md). Never guess option names.
- Extra MIT chart types (gauge, funnel, waterfall, sunburst, ...): `import types from 'west-coast-charts/types'` and `WestCoastCharts.use(types)`, or import one type, e.g. `'west-coast-charts/types/gauge'`.
- Premium types (sankey, chord, gantt, tree, stock, map, marimekko, network, radialColumn, quintTimeline, quintConvergence, vitalsClock, schedule): `import premium from 'west-coast-charts/premium'`, `WestCoastCharts.use(premium)`, and `WestCoastCharts.setLicenseKey(key)` read from configuration, never hard-coded. Localhost evaluation needs no key. The Free Core and MIT-marked source remain under their stated MIT licence; Premium distribution, updates and support have separate business terms. See https://westcoast-charts.com/maintenance/#licensing and https://westcoast-charts.com/terms/.
- Quint types (`quintTimeline`, `quintConvergence`) also use the separate module: `import quint from 'west-coast-charts/layers/quint'` and `WestCoastCharts.use(quint)`. It is not part of the Premium bundle. Read https://westcoast-charts.com/docs/quint/index.md for lanes, units and the labelled time-axis lens.
- If `render()` rejects naming a missing import, add that import; do not switch to another chart type.
- Medical/practice types require explicit modules in addition to Premium: `west-coast-charts/layers/vitals` for `vitalsClock`, and `west-coast-charts/layers/schedule` for `schedule`. They are not autoloaded. Bands, alarms and scores come from the caller; the library supplies no clinical thresholds or clinical score/alarm logic. Schedule changes are proposals; the caller decides and updates the model. Read https://westcoast-charts.com/docs/medical/index.md.
- Orient is optional MIT: import and register `west-coast-charts/features/orient` with the core runtime before creating the chart. /full already includes it. Supported types and limits: https://westcoast-charts.com/docs/features/orient/index.md. It is not a Premium family; check the current headless module matrix before using it through CLI or MCP.
- Update data with `chart.updateSeries(series)` or `chart.updateOptions(options)` instead of re-creating the chart.
- For machine-readable validation, load `west-coast-charts/agent/validate`, use `WestCoastCharts.validate(options)`, inspect `issues`, apply suggested fixes with `WestCoastCharts.applyFixes(options, issues)` and validate again.
- Load `west-coast-charts/agent/describe` and call `chart.describe({format: "json"})` after rendering for values, aggregates, scales, filters and table from the actual drawn state. Do not sum non-additive measures.
- Inspect `schemaVersion` and the options schema https://westcoast-charts.com/wcc/schema/wcc-options.schema.json. Result schema: https://westcoast-charts.com/wcc/schema/wcc-describe.schema.json. Respect missing/null fields and table truncation; never infer unavailable aggregates from a stub result.
- With MCP, discover available types/examples and narrow schema paths before validating, rendering and describing. Require `validator: "e1"` and `tableSource: "describe"` for the current tools; absent providers must fail explicitly rather than silently substituting stubs. Public agent tools 0.2.3, tested with Library 1.1.5; available from the versioned GitHub release and npm. Verify the resolved runtime and current module support before using Quint, Orient, vitalsClock or schedule. Tool errors use `isError` and a JSON envelope in the second text content block. See https://westcoast-charts.com/agents/index.md.
- Headless Premium rendering requires a configured key or explicit evaluation mode; browser localhost behaviour does not remove this requirement. Keep licence keys out of shared specs. The seven MCP tools do not write files; CLI export and skills-install commands do.
- For a working starting point, copy a gallery example: https://westcoast-charts.com/gallery/index.md (every entry has its full options).
Use the interface that fits your workflow.
Use the browser workflow directly, or install CLI and MCP from their versioned public release. The tools load the installed library; inspect their reported version and module support before rendering.
Structured option validation
Browser · 1.1.5Schema version, issue kind, severity, dotted path, JSON Pointer, suggestions and machine-applicable fixes. applyFixes() returns a corrected copy; validate it again before rendering.
chart.describe()
Browser · 1.1.5JSON, table or Markdown from the rendered state: values, units, aggregate functions, scale domains, extrema, filters and hidden series where supported. Fields may be null; respect table.total and table.truncated.
Options and result schemas
Machine-readable contractsThe options schema carries x-wcc-version. The separate wcc-describe/1 result schema defines the inspection model. MCP get_schema supports narrow dotted paths and depth limits.
Imports and working examples
Browser · 1.1.5Each gallery page includes configuration and its import recipe. Validation, describe(), features and layers are optional modules; Quint requires layers/quint in addition to Premium.
Vitals and scheduling modules
Browser modules · 1.1.5Explicit layers/vitals and layers/schedule imports add vitalsClock and schedule. Schedule helpers compute conflicts, utilization and patient-flow summaries without a chart; these are module APIs, not new MCP tools. Use the current tool module matrix and an explicitly installed complete Premium runtime for headless rendering.
Orient radial views
Optional MIT feature · 1.1.5Rotate a supported radial view without changing its data. Load features/orient with the core; /full already includes it. Orientation is described in accessible text and chart.describe() when that module is loaded. Check the current headless support matrix; Orient describes orientation, not a change to data values.
Headless command line
Agent tools · 0.2.3wcc validates, renders SVG/PNG, exports files and prints verification tables. Public agent tools 0.2.3, tested with Library 1.1.5; available from the versioned GitHub release and npm. Check the resolved library version, validator and tableSource before relying on inspection.
MCP server
Agent tools · 0.2.3Seven tools, Markdown resources, version discovery and two reusable prompts over stdio or Streamable HTTP. Public agent tools 0.2.3, tested with Library 1.1.5; available from the versioned GitHub release and npm.
Browser recipe: validate → fix → render → inspect
Library 1.1.5, using optional modules from the public MIT Core package. This example expects a #chart element. It is a copyable recipe; this page does not execute it.
The validator identifies exact option paths and JSON Pointers. Review its fixes, validate the corrected copy, then inspect JSON or Markdown from the chart. The Agent Lab runs the interactive browser workflow.
import WestCoastCharts from 'west-coast-charts'
import validatorPlugin from 'west-coast-charts/agent/validate'
import describePlugin from 'west-coast-charts/agent/describe'
WestCoastCharts.use(validatorPlugin).use(describePlugin)
const options = {
chart: { type: 'bar' },
series: [{ name: 'Revenue', data: [12, 19, 7] }],
xaxis: { categories: ['Q1', 'Q2', 'Q3'] },
}
const report = WestCoastCharts.validate(options)
const fixed = WestCoastCharts.applyFixes(options, report.issues)
if (!WestCoastCharts.validate(fixed).ok) throw new Error('Resolve remaining option issues')
const chart = new WestCoastCharts(document.querySelector('#chart'), fixed)
await chart.render()
const model = chart.describe({ format: 'json' })
const markdown = chart.describe({ format: 'markdown' })Vitals Clock and Practice Schedule: explicit module imports
Vitals Clock displays measurements in time slots, marks unmeasured slots separately from zero and shows the age of the last values. Practice Schedule shows rooms, people and appointments; moves and resizes emit proposals for the caller to accept and redraw. Bands, alarms and scores come from the calling application. The library supplies no clinical thresholds or clinical score/alarm decisions. The original examples use invented demo data and thresholds.
These separate Premium type modules are not autoloaded. Register the modules you use before creating the chart. With script tags, load core and Premium first, then dist/layers/vitals.min.js or dist/layers/schedule.min.js.
The schedule module provides standalone conflicts(), utilization(), utilizationSeries() and flow.fromEvents() helpers. These are library APIs, not new MCP tools. Patient-flow summaries retain median/P90 waiting times. Headless use requires the separately supplied complete Premium runtime and the current agent tools. Consult the tested module matrix in the tool guide.
Read data contracts and helper APIs · Explore the original demos
import WestCoastCharts from 'west-coast-charts'
import premium from 'west-coast-charts/premium'
import vitals from 'west-coast-charts/layers/vitals'
import schedule from 'west-coast-charts/layers/schedule'
WestCoastCharts.use([premium, vitals, schedule])
// Load only the type modules your application uses.
// Neither vitalsClock nor schedule is autoloaded.Optional MIT feature: orient a radial view
Orient is an optional MIT feature for pie, donut, polarArea, radialBar, Premium chord and radialColumn with its layers. It turns the view while keeping labels upright and preserving data values. Orientation survives data updates and resizes, and participates in perspectives, history and share links when those features are loaded. Reduced motion or animate: false skips the transition. Other chart types are unsupported; there is no 3D tilt or free-angle dragging.
The plain Core entry stays lean: load this feature only when needed. The /full entry already installs it. With script tags, load dist/west-coast-charts.min.js, then dist/features/runtime.min.js, then dist/features/orient.min.js, in that order, before initialising the chart. The ESM import below loads runtime.esm.js through its own dependency; no extra runtime import is needed. This browser recipe expects a #chart element and the public MIT Core 1.1.5 package; it is not executed on this page.
Read the Orient API and controls · Try the original Orient examples
import WestCoastCharts from 'west-coast-charts'
import orient from 'west-coast-charts/features/orient'
WestCoastCharts.use(orient)
const chart = new WestCoastCharts(document.querySelector('#chart'), {
chart: { type: 'donut', orient: { enabled: true } },
labels: ['Direct', 'Search', 'Referral'],
series: [44, 35, 21],
})
await chart.render()
await chart.orient.rotateTo('Search', 'top', { animate: false })
const orientation = chart.orient.get()
const description = chart.orient.describe()
// await chart.orient.reset()Using Codex, Claude Code, Hermes, Cursor or Copilot
Choose the capabilities enabled in your own setup: reading Markdown, repository instructions, shell commands or an MCP connection. These are available interfaces and documentation, not a blanket claim of tested compatibility with every client and version.
- Codex: use the AGENTS.md rule set when your setup reads repository instructions.
- Claude Code: the MCP guide includes a stdio configuration example.
- Hermes: provide the Markdown context through your configured client. No Hermes-specific adapter is verified here.
- Cursor: an optional .mdc rule and an MCP configuration example are provided.
- Copilot: an optional .github/copilot-instructions.md file is provided.
Cursor users may also add https://westcoast-charts.com/docs/ through @Docs. The single-file alternative is https://westcoast-charts.com/llms-full.txt.
Read only the context you need.
https://westcoast-charts.com/llms.txtStart here. Small; links to the Markdown version of every page that matters.Follow the explicit index.md linke.g. https://westcoast-charts.com/docs/getting-started/index.md. Original sample pages and some legal pages are HTML-only.Accept: text/markdownPages with a published Markdown twin return that twin with Vary: Accept; otherwise read HTML.rel="alternate" type="text/markdown", rel="describedby"Authored pages with a Markdown twin advertise it in their head. Follow that URL rather than guessing.https://westcoast-charts.com/docs/sitemap.mdAll docs and gallery pages in one list.https://westcoast-charts.com/llms-full.txtOptional, for clients that read a single document URL.curl -H 'Accept: text/markdown' https://westcoast-charts.com/docs/getting-started/
# Or read the explicit Markdown URL:
curl https://westcoast-charts.com/docs/getting-started/index.mdUsage signal for automated clients: Content-Signal: search=yes, ai-input=yes (robots.txt and HTTP header).