Skip to content

feat: use ECharts to have faster charts#2234

Draft
Ahmad-Wahid wants to merge 18 commits into
mainfrom
feat/better-and-fast-asset-charts
Draft

feat: use ECharts to have faster charts#2234
Ahmad-Wahid wants to merge 18 commits into
mainfrom
feat/better-and-fast-asset-charts

Conversation

@Ahmad-Wahid

@Ahmad-Wahid Ahmad-Wahid commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Description

  • ...
  • Added changelog item in documentation/changelog.rst

Look & Feel

...

How to test

...

Further Improvements

Vega-Lite ECharts
Asset page (vconcat line chart)
Sensor page (bar chart)
Sensor page (annotations)
Sensor page (histogram)
Sensor page (heat map)
Speed 🟡 🟢
Interactivity 🟡 🟢
Replay
Toggle legend position
Tooltip
Export (CSV)
Export (PNG)
Export (SVG)
  • 🟡 Good
  • 🟢 Great
  • ✅ Supported
  • ❌ Not supported
  • ⬜ Support unknown

Related Items

...

Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
@Ahmad-Wahid Ahmad-Wahid self-assigned this Jun 12, 2026
@Flix6x Flix6x added the UI label Jun 12, 2026
…ing charts

Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>

@Flix6x Flix6x left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No code review, just observations from testing. Improvements I observe are:

  • Speed
  • Panning
  • Zooming
  • Hover effect to focus on a single trace (line)
  • Heat map interactivity (select a value range to see)

Missing:

  • Asset page shows misaligned x-axis on vertically concatenated subcharts (tip: try the replay on asset 77) (✅ )
  • Bar chart of a year of 15-minute prices has missing data
  • SVG export on large heatmaps has missing data
  • No annotations visible on sensor bar chart (tip: select a time period on sensor 14 covering some Dutch public holidays) (✅ )
  • SVG export should exclude buttons (✅ )
  • Double click to reset
  • Font size too small (✅ )
  • Tooltip hover on nearest data point (this can be discussed)

Ahmad-Wahid and others added 8 commits June 12, 2026 20:09
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…mps, fonts)

- show hover annotations on the sensor page, matching the Vega-Lite
  SHADE_LAYER/TEXT_LAYER (gray bands, highlight + label on hover)
- use tableau10 colors and zero-based y-axis like Vega-Lite
- use linear interpolation for instantaneous sensors so ramps are visible
- match Poppins font and Vega-Lite font sizes
- always show the legend below on the sensor page
- mixed date/time x-axis labels and extra inter-subplot spacing
@Ahmad-Wahid

Ahmad-Wahid commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

No code review, just observations from testing. Improvements I observe are:

  • Speed
  • Panning
  • Zooming
  • Hover effect to focus on a single trace (line)
  • Heat map interactivity (select a value range to see)

Missing:

  • Asset page shows misaligned x-axis on vertically concatenated subcharts (tip: try the replay on asset 77)
  • Bar chart of a year of 15-minute prices has missing data (✅ )
  • SVG export on large heatmaps has missing data
  • No annotations visible on sensor bar chart (tip: select a time period on sensor 14 covering some Dutch public holidays) (✅ )
  • SVG export should exclude buttons (✅ )
  • Double click to reset
  • Font size too small (✅ )
  • Tooltip hover on nearest data point (this can be discussed)

Let's discuss the rest of the items in a call.

- dataZoom realtime:false + throttle:80 so a slider drag coalesces into a
  single redraw on release instead of one per tick (removes mid-drag jank)
- large mode on line series for batched canvas drawing
- measured on asset 77 (7,728 rows): initial render 134ms -> 71ms,
  slider drag 25 re-renders -> 1
@Flix6x

Flix6x commented Jun 26, 2026

Copy link
Copy Markdown
Member

Updated list of observations

Sensor page:

  • Reorder buttons: please move the SVG button to between Reset Zoom and PNG.

  • PNG and SVG for 1 year of sensor 14 is still missing data. CSV probably, too, please check.

  • Reset Zoom is very peculiar at the moment. It only does something when the Zoom button function has been used, and whatever window had been selected at that time will be the window that it resets to, until you reload the entire page. I see two options going forward:

    1. Always reset to the full period in the URL, or
    2. Reset to the previously selected period (like a back button).

    The first option is probably simplest.

Asset page:

  • Source legend at the bottom.
  • Instantaneous sensors should not have step-before/after viz
  • Tooltip should always show for the nearest data point (nearest vertical trace, in case of multiple traces, nearest horizontally on the left or right, I don't mind that much; the vega-lite uses the nearest on the left).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants