Skip to content

feat: fitted trendline KPIs, no table chrome over rows that show, named empty IN values - #44

Closed
debabsah wants to merge 1 commit into
feat/chart-display-additionsfrom
feat/display-polish
Closed

debabsah wants to merge 1 commit into
feat/chart-display-additionsfrom
feat/display-polish

Conversation

@debabsah

@debabsah debabsah commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Three fixes found while building a showcase dashboard, plus the limits behind three more, each verified in Superset source at 4.1.4, 5.0.0 and 6.1.0. Stacked on #40.

Added

  • y_axis_truncate on big_number_trend. It writes start_y_axis_at_zero: false, so the trendline fits its data. Without it, a trailing-12-month total that moves 3% renders as a flat line over a solid block. The control is at BigNumberWithTrendline/controlPanel.tsx:96 at 4.1.4 and 5.0.0 and :107 at 6.1.0, read as yAxis.scale (transformProps.ts:219,326 at 6.1.0), on every release. Omitted, the compiler still writes true, so specs build the same bytes. Decompile and plan read it.
  • No table chrome over rows that already show. Any page_length above 0 draws the page-size picker even when every row fits (DataTable.tsx:123,173 at 6.1.0).
    • default.search-box now fills only on a table that pages.
    • --fix removes a box an older brain filled on a table whose rows all show.
    • A new info rule, size.table-chrome, names a page_length or search_box written on such a table.
  • Empty listed values. Apply's data check now warns when a listed IN value, on a column the chart groups or draws by, returns no rows. For example: deal_size IN lists 'Huge', which returns no rows, so the chart draws nothing for it.

Documented as limits (no plugin control exists)

  • Per-series line style on the mixed chart. MixedTimeseries passes no line style to either query (transformProps.ts:457-493,530-567 at 6.1.0). A theme override styles every series alike. The workaround is the reference metric in its own query, pale through label_colors.
  • Axis format apart from value labels on bar, line, area and scatter. One y_axis_format serves all three. ",.1~f" gives whole-number ticks while keeping decimals on values.
  • Area edge width. The Area panel declares only opacity.

Design brain 10

PRs #40 and #42 each claim "9", and #38 "8", so the numbers need reconciling at merge.

Tests

  • Offline: 1726 passed, 1 skipped. params_drift --all is clean, and every example and fixture without the new field compiles to the same bytes.
  • New tests cover the field's compile, decompile and plan; the search-box and chrome rules, with a sweep of heights 6–20; and six smoke cases for the empty-values warning.
  • Live on all three releases: apply, plan clean, screenshots. On 6.1.0, ci_live_check passed with the display-controls fixture.

…ed empty IN values

Gaps a design review found while building a showcase dashboard, each checked
in plugin source at 4.1.4, 5.0.0 and 6.1.0:

- Trendline KPI: `y_axis_truncate` unticks "Start y-axis at 0"
  (start_y_axis_at_zero, BigNumberWithTrendline/controlPanel.tsx:96 at 4.1.4
  and 5.0.0, :107 at 6.1.0), which the trendline reads as yAxis.scale:
  !startYAxisAtZero (transformProps.ts:219, :326 at 6.1.0). A trailing-12-month
  total that moved a few percent was a flat line over a solid block; fitted,
  it shows the movement. Omitted, it compiles to true as before, so the goldens
  are unchanged; decompile reads false back as the field and plan reports a
  change made in the UI. All three releases declare it: no version gate.
- Design brain 10: no page-size picker, pager or search box on a table whose
  rows all show in its panel. Any page_length above 0 draws the picker, on
  one page too (hasPagination, DataTable.tsx:123, :173 at 6.1.0).
  default.search-box now fills only a raw table that pages, where the box
  sits in the picker's bar, and --fix removes a box it filled over rows that
  all show; size.table-chrome, a new info rule, names an author's page_length
  or search_box there.
- Apply's data check names the values a chart's IN filter lists that return
  no rows, on a column the chart groups or draws by (a line chart listing
  four zones where two have data). A time column and a series-limited
  groupby are left alone, and a query that reached its row limit says so.

No spec field where the plugin has no control, documented instead (spec
descriptions, CONTRACTS.md, the chart-choice guide):

- A mixed chart draws every line solid at one width: transformSeries takes a
  line style only from its caller, and MixedTimeseries passes none for either
  query at any of the three releases. 6.1.0's ECharts Options replace the
  series list whole and a theme override styles every series, so neither
  reaches one series. A reference series goes in its own query with a pale
  label_colors colour.
- The area chart declares a fill opacity (already `opacity`) but no line
  width; on 6.1.0 a theme's echartsOptionsOverridesByChartType can thin every
  area chart's edges (read from source, not tried live).
- Line, bar, area and scatter charts have one number format for the value
  axis, the value labels and the tooltip; a `~` format such as ",.1~f" keeps
  the axis in whole numbers. A mixed chart writes query B's value labels in
  number_format_secondary whichever axis B sits on.

Verified live on 4.1.4, 5.0.0 and 6.1.0 with throwaway dashboards: apply,
re-apply with stable ids, plan clean, decompile without losses, screenshots
of each look and the data check naming an empty deal size. The
display-controls live check passes on 6.1.0 with the fixture's new field.
@debabsah

debabsah commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

Merged into main through #53 (321bda7). This PR was stacked on another branch, so GitHub couldn't mark it merged on its own; every commit in it is in main.

@debabsah debabsah closed this Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant