docs: correct HTML chart Handlebars bindings and sandbox limitations - #11388
Draft
igorlukanin wants to merge 1 commit into
Draft
docs: correct HTML chart Handlebars bindings and sandbox limitations#11388igorlukanin wants to merge 1 commit into
igorlukanin wants to merge 1 commit into
Conversation
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The HTML chart docs page describes a template context and a JavaScript capability that don't match what the product does. Every code example on the page currently fails if copy-pasted.
Handlebars bindings. The page documents
result._firstand{{#each result.data}}. There's noresultkey in the template context — rows are a flatdataarray. Templates compile in strict mode, so these don't render blank, they throw and break the chart. Corrected todata.0.<member>and{{#each data}}, matching the Handlebars reference panel in the chart editor.JavaScript. The page says
<script>tags are supported and shows a Chart.js CDN example. HTML charts render in a sandboxed iframe under a restrictive CSP, so scripts don't execute and external resources don't load. Replaced that section with an accurate description of what the sandbox allows, and pointed readers at built-in chart types or custom Vega-Lite specs for visualizations.Also documents the rest of the template context (
columns,rowCount,columnCount,pivot) and the available helpers, which previously only existed in the in-app panel.