`facet_chart` does not refine/load full-resolution data when zooming
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- data-visualization
Research direction
Start by running the provided Python reproduction and compare the facet_chart(link="x") behavior with the standalone line_chart control while zooming into a burst. Trace the facet_chart and linked-X handling from those entry points to determine where refinement differs; done means zooming reveals the irregular high-resolution samples in the faceted chart.
Written by the indexing model from the issue text.
Description
Summary
When using xy.facet_chart() with a DataFrame containing multiple time series, zooming into the chart does not appear to refine/load the underlying high-resolution data.
The same data plotted as a standalone xy.line_chart() does correctly refine/load the full-resolution data when zooming.
This appears to be specific to the combination of:
facet_chartlink="x"- highly non-uniform temporal sampling / long periods of inactivity
Environment
Python: 3.13
xy: 0.0.8.dev5+72a069f
OS: Linux
Example
maybe not minimal, but shows shorts bursts of data, followed by long times when nothing happens.
import numpy as np
import pandas as pd
import xy
rng = np.random.default_rng(42)
signals = {
"a": 880_000,
"b": 860_000,
}
frames = []
for signal, n in signals.items():
# Number of bursts
n_bursts = 100
# Samples per burst (roughly)
burst_sizes = np.full(n_bursts, n // n_bursts, dtype=int)
burst_sizes[:n % n_bursts] += 1
times = []
values = []
t = 0.0
for burst_idx, burst_n in enumerate(burst_sizes):
# ---------------------------------------------------------
# Burst
# ---------------------------------------------------------
# Random, strictly positive intervals inside the burst
dt = rng.lognormal(
mean=-2.0,
sigma=0.7,
size=burst_n,
)
burst_time = t + np.cumsum(dt)
# Random step signal during the burst
change = rng.random(burst_n) < 0.002
burst_values = np.empty(burst_n)
current = rng.normal()
for i in range(burst_n):
if change[i]:
current = rng.normal()
burst_values[i] = current
times.append(burst_time)
values.append(burst_values)
# ---------------------------------------------------------
# Sleep
# ---------------------------------------------------------
burst_duration = burst_time[-1] - t
# Sleep is 10,000 × the burst duration
sleep_time = 10_000 * burst_duration
t = burst_time[-1] + sleep_time
time = np.concatenate(times)
value = np.concatenate(values)
frames.append(
pd.DataFrame({
"time": time,
"value": value,
"signal": signal,
})
)
df_test = pd.concat(frames, ignore_index=True)
df_test["signal"] = pd.Categorical(
df_test["signal"],
categories=list(signals),
ordered=True,
)
chart = xy.facet_chart(
xy.step("time", "value", width=1.2),
by="signal",
data=df_test,
cols=1,
share_x=True,
share_y=False,
link="x",
width=1100,
height=400,
gap=10,
title="Burst / sleep signals",
)
# Standalone control
s1 = df_test[df_test["signal"] == "a"]
chart2 = xy.line_chart(
xy.step(
s1["time"].to_numpy(),
s1["value"].to_numpy(),
),
width=1100,
height=400,
)
print("standalone")
display(chart2)
print("facet")
display(chart)
The standalone chart correctly refines/loads the higher-resolution data when zooming.
Expected behavior
Zooming into a burst in the faceted chart should cause the visualization to refine to the underlying data points, just as it does for the standalone line_chart.
In particular, zooming into a small burst should reveal the irregular high-frequency samples contained within that burst.
Actual behavior
The faceted chart remains visually decimated after zooming and does not appear to refine to the underlying high-resolution samples.
The issue is particularly apparent because the data contains:
- large amount of data (> 800k samples?)
- irregular timestamps
- dense bursts
- very large gaps between bursts
- linked X axes across facets
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 76
- Avg merge
- 1h 25m
- Merged PRs (30d)
- 5
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from reflex-dev/xy
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
reflex-dev/xy#526 ·
Maintainers usually reply within 1 day
-
Skip finite/log visibility scans when zone maps already prove all-finite on linear axesMay be free again A pull request for this issue was closed without being merged. Openneeds investigate performance
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
reflex-dev/xy#169 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
reflex-dev/xy#516 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 74/100
reflex-dev/xy#512 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
reflex-dev/xy#511 ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
esphome/esphome.io#7657 ·
Maintainers usually reply within 1 day
-
comp/gateway comp/plugins duplicate P3 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NousResearch/hermes-agent#137019 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Kumo-Tabular weights unreachable behind restrictive egress proxies (Xet + plain HTTP both fail)Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
NVIDIA/structured-data-models#1091 ·
Maintainers usually reply within 1 day
-
[work-item] adam-adae-worsening-emergence: conform spec.yaml to the specification style contract (REQ-1280)Possibly taken @muse-yamaa-bot claimed this today. Openwork-item
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day