doesn't work zooming Xscale with static range
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 463
- PR merge metrics
- No merged PRs in 30d
Description
Hello, I find strange behavior of zooming X scale. When X scale из without range (auto) - it zooms, but if it has range[ x1, x2] zoom on X doesn't work. Zooming by mouse.
But! on Y scale zoom works in both situations.
What I do wrong? or is this normal behavior og is it bug?
I have two uPlots with syncro on X, uPlot options:
const prepareChartOpts = (id, series) => {
return {
id,
width: document.getElementById("chart1").offsetWidth,
height: document.getElementById("chart1").offsetHeight,
hooks: {
setSeries: [
(u, seriesIdx) => {
u.series.forEach((s, i) => {
s.width = i == seriesIdx ? 2 : 1;
});
}
],
},
legend: {
show: false
},
focus: {
alpha: 1.1,
},
cursor: {
points: {
show: false,
},
drag: {
x: true,
y: true,
dist: 2,
uni: 2
},
sync: {
key: "moo",
scales: ["x"]
}
},
select: {
over: false,
},
scales: {
x: {
time: false,
range: [0, 5] <- with this string X zoom doesn't work
},
y: {
range: [-2, 4]
}
},
series: [
{
label: "x",
},
...series,
],
}
}
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start by reproducing the supplied prepareChartOpts configuration with mouse dragging, comparing X zoom with an automatic range against range: [0, 5], and comparing both with Y zoom. Determine whether the fixed-range behavior is intentional or broken, then document the expected result and add a regression check for the affected interaction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100