Skip to content
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
24e8435
feat: use ECharts to make the asset charts faster and more interactive
Ahmad-Wahid Jun 12, 2026
a22650a
feat: use ECharts to make the asset charts faster and more interactive
Ahmad-Wahid Jun 12, 2026
27e32b8
add changelog
Ahmad-Wahid Jun 12, 2026
9ad09bd
improve the EChart by adding missing features as we have in the exist…
Ahmad-Wahid Jun 12, 2026
0b5955c
drop the changes that were made for speeding the vegalite
Ahmad-Wahid Jun 12, 2026
ee2d367
connect histgram horizentally and move x-axis to the top of the chart
Ahmad-Wahid Jun 12, 2026
828415d
stack the legends below the subplots if option is chosen
Ahmad-Wahid Jun 12, 2026
6ed06f0
fix: use asset name with sensor name in the chart legends
Ahmad-Wahid Jun 12, 2026
3a50883
fix: show source chart lines
Ahmad-Wahid Jun 12, 2026
9572d44
fix: vertical concatination of subplots
Ahmad-Wahid Jun 12, 2026
1f56d00
fix: ECharts
Ahmad-Wahid Jun 13, 2026
af2a6e1
fix: derive sensor-type from shared unit and improve ECharts legends
Ahmad-Wahid Jun 23, 2026
383993a
fix: export full legends without toolbox and drop restore button
Ahmad-Wahid Jun 23, 2026
db29e6a
fix: match axis and title font size and color to Vega-Lite
Ahmad-Wahid Jun 23, 2026
cecdd86
fix: show sensor-page legend with Source title and Vega-Lite-style la…
Ahmad-Wahid Jun 23, 2026
49558ad
fix: add minor gridlines to line and bar charts like Vega-Lite
Ahmad-Wahid Jun 23, 2026
e07f66c
feat: match fast ECharts charts to Vega-Lite (annotations, colors, ra…
Ahmad-Wahid Jun 24, 2026
ddca605
perf: smooth fast-chart pan/zoom and speed up rendering
Ahmad-Wahid Jun 24, 2026
5fa86d1
fix: complete heatmap PNG/SVG export and reorder sensor-page toolbox
Ahmad-Wahid Jun 27, 2026
b927611
Merge remote-tracking branch 'origin/main' into feat/better-and-fast-…
Ahmad-Wahid Jul 1, 2026
55adf01
Merge remote-tracking branch 'origin/main' into feat/better-and-fast-…
Ahmad-Wahid Jul 2, 2026
b4b08ec
Improve fast (ECharts) chart parity with Vega-Lite
Ahmad-Wahid Jul 4, 2026
943cd58
Remove the Charge Point sessions line-style legend
Ahmad-Wahid Jul 4, 2026
31d9264
Match fast (ECharts) chart interpolation to Vega-Lite
Ahmad-Wahid Jul 4, 2026
0cd573f
Snap fast (ECharts) chart tooltip to the nearest data point
Ahmad-Wahid Jul 5, 2026
2c565c1
Align fast (ECharts) chart subplots on a shared x domain
Ahmad-Wahid Jul 8, 2026
130ba83
apply pre-commit
Ahmad-Wahid Jul 8, 2026
e3a70ca
Revert "apply pre-commit"
Ahmad-Wahid Jul 8, 2026
430dedf
Merge remote-tracking branch 'origin/main' into feat/better-and-fast-…
Ahmad-Wahid Jul 8, 2026
216b398
docs: add changelog entry for the fast (ECharts) chart mode
Ahmad-Wahid Jul 8, 2026
7acee9d
fix: use cache as main
Ahmad-Wahid Jul 8, 2026
009e30a
Merge origin/main into feat/better-and-fast-asset-charts
Copilot Jul 14, 2026
fd37ade
Show the hovered line's sensor in the fast-chart tooltip
Ahmad-Wahid Jul 14, 2026
f30bc08
remove the chart performance widget and it's code
Ahmad-Wahid Jul 14, 2026
52f1482
Merge remote-tracking branch 'origin/main' into feat/better-and-fast-…
Ahmad-Wahid Jul 14, 2026
2736cde
Make the fast (ECharts) chart the default, Vega-Lite the fallback
Ahmad-Wahid Jul 14, 2026
bb72fb3
fix(ui): address ECharts fast-chart review feedback (#2234)
Flix6x Jul 15, 2026
40cd673
fix(ui): second round of ECharts fast-chart review fixes (#2234)
Flix6x Jul 15, 2026
3e65186
fix(ui): third round of ECharts fast-chart review fixes (#2234)
Flix6x Jul 15, 2026
fd91406
fix(ui): fourth round of ECharts fast-chart review fixes (#2234)
Flix6x Jul 15, 2026
39ea35a
fix(ui): fifth round of ECharts fast-chart review fixes (#2234)
Flix6x Jul 15, 2026
c473ce4
fix(ui): sixth round of ECharts fast-chart review fixes (#2234)
Flix6x Jul 15, 2026
8d68cd4
fix(ui): seventh round of ECharts fast-chart review fixes (#2234)
Flix6x Jul 15, 2026
1785d50
fix(ui): eighth round of ECharts fast-chart review fixes (#2234)
Flix6x Jul 15, 2026
531ac2b
fix(ui): ninth round of ECharts fast-chart review fixes (#2234)
Flix6x Jul 15, 2026
dda5b85
fix(ui): x-axis intermediate tick level for multi-day views (#2234)
Flix6x Jul 15, 2026
85c7ebb
fix(ui): stop mobile page-scroll from resetting the fast chart zoom (…
Flix6x Jul 15, 2026
3dafdc0
fix(ui): don't reset fast-chart zoom on height-only resizes (mobile s…
Flix6x Jul 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion documentation/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ v1.0.0 | July XX, 2026

New features
-------------

* In the UI, an opt-in "Fast chart" mode renders asset and sensor charts with Apache ECharts (canvas) for much faster drawing and interaction on dense time series, while staying visually and functionally equivalent to the existing Vega-Lite charts [see `PR #2234 <https://www.github.com/FlexMeasures/flexmeasures/pull/2234>`_]
Comment thread
Ahmad-Wahid marked this conversation as resolved.
Outdated
* Breaking behaviour change: the top-level flex-context's ``relax-constraints`` field now defaults to ``True`` (matching the default already used within each ``commodities`` entry), so constraint violations are softly penalized by default instead of being hard constraints, unless explicitly set to ``False`` [see `PR #2172 <https://www.github.com/FlexMeasures/flexmeasures/pull/2172>`_]
* Support for creating new assets by using another asset as a template from the UI. [see `PR #2195 <https://www.github.com/FlexMeasures/flexmeasures/pull/2195>`_ and `PR #2268 <https://www.github.com/FlexMeasures/flexmeasures/pull/2268>`_
* In the UI, asset and sensor lists can be filtered by ID prefix through API-backed search fields [see `PR #2231 <https://www.github.com/FlexMeasures/flexmeasures/pull/2231>`_]
Expand Down
10 changes: 10 additions & 0 deletions flexmeasures/data/models/generic_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,7 @@ def _create_fixed_value_sensors(
id=fixed_value_sensor.id,
name=sensor_name,
sensor_unit=ref["unit"],
event_resolution=fixed_value_sensor.event_resolution.total_seconds(),
description=sensor_name,
asset_id=parent_asset.id,
asset_description=parent_asset.name,
Expand Down Expand Up @@ -1084,6 +1085,12 @@ def chart_data_json(
sensors_meta[str(sensor.id)] = {
"name": as_dict.get("name", sensor.name),
"unit": as_dict.get("sensor_unit", sensor.unit),
# Fixed-value sensors are instantaneous (0), so the chart
# renders their row with linear interpolation like Vega-Lite.
"event_resolution": as_dict.get(
"event_resolution",
sensor.event_resolution.total_seconds(),
),
"description": as_dict.get("description", sensor.name),
"asset_id": as_dict.get("asset_id"),
"asset_description": as_dict.get("asset_description", ""),
Expand Down Expand Up @@ -1291,6 +1298,9 @@ def search_beliefs( # noqa C901
sensors_metadata[sensor.id] = {
"name": sensor_dict.get("name", ""),
"unit": sensor_dict.get("unit", sensor.unit),
"event_resolution": sensor_dict.get(
"event_resolution", sensor.event_resolution.total_seconds()
),
"description": sensor_dict.get("description", ""),
"asset_id": sensor_dict.get(
"asset_id", getattr(sensor, "generic_asset_id", None)
Expand Down
4 changes: 4 additions & 0 deletions flexmeasures/data/models/time_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,9 @@ def search_beliefs( # noqa: C901
sensors_metadata[self.id] = {
"name": sensor_dict.get("name", ""),
"unit": sensor_dict.get("sensor_unit", self.unit),
"event_resolution": sensor_dict.get(
"event_resolution", self.event_resolution.total_seconds()
),
"description": sensor_dict.get("description", ""),
"asset_id": sensor_dict.get(
"asset_id", getattr(self, "generic_asset_id", None)
Expand Down Expand Up @@ -703,6 +706,7 @@ def as_dict(self) -> dict:
id=self.id,
name=self.name,
sensor_unit=self.unit,
event_resolution=self.event_resolution.total_seconds(),
description=f"{self.name} ({self.generic_asset.name})",
asset_description=f"{self.generic_asset.name}"
+ (f" ({parent_asset.name})" if parent_asset is not None else ""),
Expand Down
18 changes: 18 additions & 0 deletions flexmeasures/ui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,23 @@ def basic_admin_auth():

def add_jinja_filters(app):
from flexmeasures.ui.utils.view_utils import asset_icon_name, username, accountname
from flexmeasures.data.models.charts.belief_charts import (
determine_shared_sensor_type,
)

def shared_sensor_type(sensors):
"""Mirror the Vega-Lite y-axis title logic: if all sensors share a
sensor type use it, otherwise derive the dimension from the shared unit
(e.g. a group of kW sensors becomes "power").

``sensor_type`` is normally set lazily inside the chart methods, so we
populate it here (as ``get_attribute("sensor_type", name)``) before
delegating to the shared helper.
"""
sensors = list(sensors)
for sensor in sensors:
sensor.sensor_type = sensor.get_attribute("sensor_type", sensor.name)
return determine_shared_sensor_type(sensors)

app.jinja_env.filters["zip"] = zip # Allow zip function in templates
app.jinja_env.add_extension(
Expand All @@ -174,6 +191,7 @@ def add_jinja_filters(app):
app.jinja_env.filters["capitalize"] = capitalize
app.jinja_env.filters["pluralize"] = pluralize
app.jinja_env.filters["parameterize"] = parameterize
app.jinja_env.filters["shared_sensor_type"] = shared_sensor_type
app.jinja_env.filters["isnull"] = pd.isnull
app.jinja_env.filters["hide_nan_if_desired"] = lambda x: (
""
Expand Down
1 change: 1 addition & 0 deletions flexmeasures/ui/static/js/chart-data-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export function decompressChartData(responseData) {
name: sensor.name || "",
sensor_unit: sensor.unit || "",
unit: sensor.unit || "",
event_resolution: sensor.event_resolution,
description: sensor.description || "",
asset_id: sensor.asset_id,
asset_description: sensor.asset_description || "",
Expand Down
Loading
Loading