Skip to content

refactor: remove the ECharts renderer - #136

Merged
jvdd merged 7 commits into
mainfrom
refactor/remove-echarts
Oct 1, 2026
Merged

jvdd merged 7 commits into
mainfrom
refactor/remove-echarts

Conversation

@jvdd

@jvdd jvdd commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Removes the deprecated ECharts renderer and the compat shims and dead code that it and older specs left behind. Closes #126.

Change

  • ECharts is removed (first commit). flexviz/adapters/echarts_adapter.py, flexviz/adapters/js/echarts/ (3 files), the ECharts bundle in runtime.py, the ECharts entries in registry.py, the ECharts-only tests, and the ECharts parts of Architecture.md, docs/guides/customizing.md, docs/guides/cross-filtering.md and the docstrings.
  • The renderer switch stays (option B in Remove the deprecated ECharts renderer, and decide what stays of the renderer switch #126). renderer= on Figure.show and Dashboard.show, and ?renderer= on /view and /h/{n}, keep "plotly" as the only value. adapters/registry.py stays as the place for a second renderer. The name must now match "plotly" exactly: normalize_renderer_name (lowercase and strip) is removed.
  • Tests:
    • The "echarts" value is removed from every renderer parametrization, and 11 ECharts skips are gone. Two tests check that renderer=echarts gets 400 at /view and /h/{n}.
    • The single-value renderer parametrizations and the unused renderer arguments of the test helpers are removed. _wait_for_init keeps its argument for now, because fix(cube): brush binned sources on their own bin grid #134 adds calls to it in test_browser_cube.py.
    • New tests in test_adapters.py cover the capability check in validate_dashboard_renderer, check that PLOTLY_TRACE_TYPES holds every registered trace type, and check that renderer="Plotly" raises.
  • Compat shims and dead code are removed:
    • the old-spec x/y branch in BarPlot.from_trace_spec, with its two tests;
    • the params.bar_mode fallback in plotly_adapter.py and plotly/traces.js;
    • the ::bg/::fg id shim in stripLayerSuffix, the legacy hover-mode coerce in toolbar.js, and the _fvClearAllCrosshairs and window.fvClearAllCrosshairs aliases;
    • _registered_sources, FlexTrace.is_grouped_parent, CorrHeatmap.default_color_scale / default_color_range, set_cache_backend and set_cube_cache_backend (no callers);
    • the call to _fvResetRendererCache in runtime/overlay.js, which only ECharts defined.
  • Docs fixes:
    • Architecture.md gives spec version 0.7 (it said 0.5).
    • Architecture.md lists the 9 renderer hooks that the shared runtime and toolbar.js call, plus _fvAllFigUids. Before, it listed 4 hooks, and 3 of them do not exist after this PR. The runtime.py docstring points to this list.
    • Architecture.md no longer lists dispatchCrosshairs. The comments in pie.py and line.py point at the right format and file.
    • CHANGELOG.md records the ECharts removal, the exact renderer name and the removed cache setters. The stale ECharts sentence in the fix(server): answer only same-origin pages and loopback host names #131 entry is removed.

Impact

  • 34 files changed, 526 insertions, 3,959 deletions. Most insertions are test signatures that ruff wraps again.
  • No spec change. A Plotly user who passes renderer="plotly" or no renderer sees no change.
  • renderer="echarts" and renderer="Plotly" now raise ValueError. A share URL or flexviz history entry with renderer=echarts returns HTTP 400 at /view and /h/{n}.
  • flexviz.cache.set_cache_backend and set_cube_cache_backend are removed. They shipped in 0.1.0b1 to 0.1.0b5 but were not documented.
  • feat(adapters): add a light and dark house theme #137 (stacked on this PR) needs a rebase and one fix commit: 4 of its new browser test calls pass "plotly" to helpers that no longer take it.

Checks

  • pytest tests flexviz_polars/tests (what make test runs): 2,363 passed, 2 skipped.
  • pytest -m browser -p no:randomly -n 6 tests (what make test-browser runs): 306 passed.
  • ruff format --check, ruff check flexviz tests, mkdocs build --strict, git diff --check: pass.

@codspeed

codspeed Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing refactor/remove-echarts (07fffcc) with main (835c799)

Open in CodSpeed

@jvdd
jvdd added this pull request to stack #138 September 30, 2026 13:58
@jvdd
jvdd merged commit 18b95bf into main Oct 1, 2026
18 checks passed
@jvdd
jvdd deleted the refactor/remove-echarts branch October 1, 2026 09:08
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.

Remove the deprecated ECharts renderer, and decide what stays of the renderer switch

1 participant