high_chart 2.8.1
high_chart: ^2.8.1 copied to clipboard
A chart library based on High Charts (.JS), able to build advanced charts like Pie chart, linear chart, etc.
Changelog #
All notable changes to the High Chart package will be documented in this file.
2.8.1 #
Fixes #
- Boolean-typed options (e.g.
chart.polar,series.visible) are now properly typed asbool?instead of always falling back todynamic— a latent bug in the previous generator affected every boolean-typed field across the ~4,900 generated classes (TypeScript internally representsbooleanas a union of thetrue/falseliteral types, which tripped the old generator's union-handling before it ever reached itsbooleancheck)
Changed #
- Rewrote
tool/generate_options/as a standalone Dart tool: a real tokenizer/parser for the.d.tssyntax Highcharts' type definitions use, plus a resolver reimplementing the specific pieces of TypeScript's type-checking this schema depends on (declaration merging,extendsflattening, alias chasing, union collapsing). No Node.js/npm/TypeScript Compiler API needed to regenerate anymore — rundart run tool/generate_options/bin/generate.dart; seetool/generate_options/README.mdfor details, including the (small, enumerated) divergences from the old generator's output - Generated classes are now grouped into ~75 files under
lib/src/options/by Highcharts option module (e.g.hc_plot_*.dart,hc_axis.dart,hc_tooltip.dart) instead of one file per class, cutting the file count from ~4,900 to ~75
2.8.0 #
Features #
- Added
options, a fully typed, IDE-autocompleted alternative to the rawdatastring:HCOptionsplus ~4,900 generatedHC*Optionsclasses (one per Highcharts option group and series type, generated against Highcharts 13), covering the full Highcharts option tree.dataandoptionsare mutually exclusive; provide exactly one- Generated from Highcharts' own TypeScript definitions using the real TypeScript compiler API (not hand-maintained) — run
tool/generate_options/generate.shto regenerate against whatever Highcharts currently publishes aslatest; seetool/generate_options/README.mdfor details - Any
dynamic-typed slot (e.g.series, whose real type is a ~100-way union of series-specific option types Dart can't model as one type) still accepts either a typedHC*Optionsobject or a rawMap/List/primitive, so existing untyped payloads keep working unchanged, including mixed with typed options in the same tree - Function-typed options (formatters/callbacks) aren't represented in the typed API — Highcharts can't receive a JS function from a JSON payload either way; use
datafor charts that need them - Each generated class lives in its own
hc_<snake_case_name>.dartfile underlib/src/options/
- Generated from Highcharts' own TypeScript definitions using the real TypeScript compiler API (not hand-maintained) — run
Documentation #
- Corrected the README's platform support claims: Linux was listed as fully supported, but
HighChartshas no real implementation on Linux (it falls through to an "Unsupported Platform" placeholder) — thelinux/native plugin is still the unmodifiedflutter createtemplate stub
2.7.0 #
Features #
- Added native "save exported chart to disk" support on Android, iOS, macOS, and Windows. The plugin now intercepts the exporting module's client-side download (requires
offline-exporting.js, see below) and writes the file to the platform's Downloads folder where one exists, falling back to app storage elsewhere. Adds a new dependency:path_provider(#24) onEventnow also reports export outcomes as{event: 'export', status: 'success'|'error', ...}
Fixes #
- Fixed asset-loading errors printing a generic "not found" message regardless of the actual failure (permission issues, corrupt bundles, etc. all looked identical); the real exception is now included
- Fixed
getLocalAssetStringswallowing the original exception withcatch (_), making local script failures hard to diagnose
2.6.0 #
Features #
- Added
globalOptions, applied viaHighcharts.setOptions()before the chart is created, for settings such aslangthat live outside a single chart's configuration (#29) - Added
onEvent, delivering data sent from the chart's JavaScript back to Flutter via an injectedsendToFlutter(data)helper, so chart interactions (selection, click, zoom, etc.) can be handled in Dart (#25) - Forwarded WebView JS console output (including runtime errors) to the Flutter debug console on Android/iOS/macOS, making chart configuration mistakes visible instead of silently failing in the WebView (#24)
Fixes #
- Fixed dark mode rendering title, subtitle, axis labels, legend, and tooltip text unreadably (nearly invisible against the dark background). Highcharts hard-codes light-theme colors as inline styles for these elements, which silently overrode the plugin's
.highcharts-darkCSS; the plugin now re-points those inline defaults at the same dark palette viaHighcharts.setOptions() - Fixed
themeModechanges at runtime not actually reloading the chart on Android/iOS/macOS/Web, so toggling an app's theme never updated an already-rendered chart - Fixed the Web implementation not updating the chart container's theme class after its first render, since
registerViewFactoryonly takes effect once per view - Fixed the Windows implementation calling an undefined
senthilnasaJS function and never rendering the chart at all, sinceHighcharts.chart(...)was registered withaddScriptToExecuteOnDocumentCreated, which only applies to future navigations and never fires for the already-loaded page - Closed the unclosed
<body>/<html>tags in the Windows HTML template - Fixed a JS evaluation error (e.g. from a malformed chart config) crashing the app with an unhandled exception instead of being caught and logged, on all platforms
- Documented that the exporting menu needs
offline-exporting.jsalongsideexporting.js— without it, export relies on a round-trip to Highcharts' cloud server and a browser-style file download that the embedded WebView engines generally can't complete (#24)
2.5.2 #
2.4.0 #
2.2.0 #
2.1.0 #
2.0.3 #
0.0.1 #
- Initial release