Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Latest

## What's Changed
* :bug: `show_dash()` no longer fails with a `ValueError` on Windows when the working directory is on another drive than plotly-resampler (#362) by @raashish1601


# v0.11.1 (2026-10-04)
The README now points to [FlexViz](https://github.com/flex-analytics/flexviz), our successor project for whole-dashboard cross-filtering at scale.
Expand Down
3 changes: 1 addition & 2 deletions plotly_resampler/figure_resampler/figure_resampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

__author__ = "Jonas Van Der Donckt, Jeroen Van Der Donckt, Emiel Deprost"

import os
import warnings
from pathlib import Path
from typing import List, Optional, Tuple, Union
Expand Down Expand Up @@ -568,7 +567,7 @@ def show_dash(
if self._create_overview:
# fmt: off
# Add the assets folder to the init_dash_kwargs
init_dash_kwargs["assets_folder"] = os.path.relpath(ASSETS_FOLDER, os.getcwd())
init_dash_kwargs["assets_folder"] = ASSETS_FOLDER
# Also include the lodash script, as the client-side callbacks uses this
init_dash_kwargs["external_scripts"] = ["https://cdn.jsdelivr.net/npm/lodash/lodash.min.js" ]
# fmt: on
Expand Down
17 changes: 17 additions & 0 deletions tests/test_figure_resampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1250,6 +1250,23 @@ def test_show_dash_graph_config_not_null(monkeypatch):
assert all(isinstance(g["props"]["config"], dict) for g in graphs)


def test_show_dash_assets_folder_outside_cwd(monkeypatch, tmp_path):
# The assets folder must not depend on the cwd, which can be on another drive
# than plotly-resampler on Windows (see #362)
import dash

from plotly_resampler import ASSETS_FOLDER

monkeypatch.setattr(dash.Dash, "run", lambda *args, **kwargs: None)
monkeypatch.chdir(tmp_path)
fr = FigureResampler(go.Figure(), create_overview=True)
fr.add_trace(go.Scattergl(name="test"), hf_y=np.arange(10_000))
fr.show_dash(mode="inline")

assert fr._app.config.assets_folder == ASSETS_FOLDER
assert fr._app.server.test_client().get("/assets/coarse_fine.js").status_code == 200


def test_show_dash_default_mode(monkeypatch):
import dash

Expand Down