Evan Rusackas
|
26b7b8cdea
|
test(echarts): Tier 3 plugin-level smoke tests for 4 migrated charts
36 tests across 4 charts exercising different defineChart features:
Pie/Pie.test.ts (11 tests)
Plugin metadata (name, category, behaviors: Drill*), controlPanel
auto-generation (Query + Chart Options sections, _glyphArgs),
custom buildQuery (contribution post-processing, conditional
orderby), loaders presence.
Timeseries/Line/Line.test.ts (9 tests)
Plugin metadata, supportedAnnotationTypes pass-through (Event,
Formula, Interval, Timeseries), formDataOverrides preservation
(ExtraControls + getStandardizedControls pattern), thumbnails,
_glyphArgs, loaders.
Sunburst/Sunburst.test.ts (8 tests)
Plugin metadata, Drill behaviors, formDataOverrides preservation,
additionalControlOverrides merging into controlPanel.controlOverrides,
_glyphArgs, loaders. Sunburst exercises the complex cross-filter
useCallback render pattern, which we don't deeply unit-test here
(would require full Redux + React rendering); plugin-level shape
is verified.
BigNumber/BigNumberPeriodOverPeriod.test.ts (8 tests)
Plugin metadata, additionalSections append-after-Chart-Options
semantics (Time Comparison section), additional section has its
own controlSetRows, controlOverrides merging, _glyphArgs, loaders.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-05-19 14:01:16 -05:00 |
|
Evan Rusackas
|
2e16b8266a
|
feat(glyph): single-file chart definition pattern across all plugins
Introduce `defineChart()` — a declarative pattern that bundles metadata,
arguments (control-panel config), buildQuery, transform, and render into
a single chart-plugin file. Migrate every chart plugin to this pattern:
* plugin-chart-echarts: Pie, Funnel, Gauge, Sankey, Waterfall,
Histogram, Tree, Bubble, BoxPlot, Sunburst, Radar, Treemap, Graph,
Heatmap, Gantt, BigNumber (Total, WithTrendline, PoP, Glyph demo),
MixedTimeseries, and the Timeseries family (Generic, Scatter,
SmoothLine, Step, Area, Line, Bar)
* legacy-plugin-chart-*: calendar, horizon, chord, country-map,
world-map, paired-t-test, parallel-coordinates, partition, rose,
map-box
* other plugins: handlebars, word-cloud, pivot-table, table,
ag-grid-table, cartodiagram
* legacy-preset-chart-nvd3: Bubble, Bullet, Compare, TimePivot
* legacy-preset-chart-deckgl: Grid, Hex, Polygon, Scatter (single-file
defineChart); Arc, Contour, Geojson, Heatmap, Path, Screengrid kept
on the original multi-file ChartPlugin pattern pending follow-up
Glyph-core lives as @superset-ui/glyph-core (extracted package) and
provides: defineChart, ~14 argument types (Metric, Dimension, Select,
Checkbox, Text, Int, Slider, etc.), reusable presets (ShowLegend,
HeaderFontSize, Subtitle, etc.), cross-filter utilities
(extractCrossFilterProps, createSelectedValuesMap, isDataPointFiltered,
createLabelMap), and visibility-condition helpers
(resolveArgClass, getArgVisibleWhen, evaluateGlyphCondition).
Customize-tab rendering uses a new GlyphOptionsPanel — a native React
renderer that hybrids glyph args with additionalControls, with
inlined sharedControls in the Query section.
Imports are routed through @apache-superset/core subpath entrypoints
(/translation for t, /common for GenericDataType).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-05-14 15:38:18 -07:00 |
|