Dev - #97
Open
Chenglong Wang (Chenglong-MS) wants to merge 5 commits into
Open
Conversation
Add an `image-charts` backend that compiles the shared core semantic layer into a single Image-Charts URL. Unlike the JS-spec backends it emits a permanent hosted-image URL that renders server-side and embeds anywhere an <img> works (email, PDF, Slack, no-code) with no runtime JavaScript. The assembler is pure: it builds a string with no network I/O, no crypto, and no dependencies, and emits unsigned free-tier URLs only. It reuses the Phase 0 semantic resolution and banded-axis overflow filtering, then serializes into the Image-Charts query grammar (cht, chd=a:, chs, chxt/chxl, chco, chdl, chm, chtt). Coverage is partial by design, like the Excel backend: bar/line/area/pie/doughnut/radar/ scatter map to a faithful cht; unsupported types throw. Wire the backend into the src barrel, tsup entries, package exports, the public-API smoke test, and the test-data generators.
feat: add Image-Charts backend (hosted-image-URL render target)
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.
This pull request introduces a stricter and more explicit policy for displaying units in Flint charts, requiring that visible units must be explicitly declared in the field's semantic annotation (
unit). It also adds a new Image-Charts backend and updates related documentation and code to reflect these changes. The changes clarify how and when units are displayed, improve the handling of value labels and chart layout metadata, and enhance extensibility with a new backend.Unit Display Policy and Handling
annotation.unitnow authorizes visible unit text; semantic types, field names, or data scanning are no longer sufficient. Compact units (likeor%) may appear beside values, while lexical units (likeyears`) are stated once with the field title. [1] [2] [3] [4] [5]resolveDisplayUnitandtitleWithDisplayUnitinfield-semantics.tsto standardize how display units are resolved and attached to field titles, ensuring only valid, explicit units are shown.Chart Layout and Label Improvements
plotHeight, and the interface for label placement has been simplified by removingoutsideMaxValue. [1] [2] [3]Extensibility: New Image-Charts Backend
Documentation Updates
Minor Template and API Adjustments
suppressValueLabelsto the chart template definition to prevent redundant value labels when values are already displayed in a dedicated column.These changes make unit display more predictable and controlled, improve chart readability, and expand Flint's rendering options.