yAxisRange returns wrong values
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3.2k
- Forks
- 589
- PR merge metrics
- No merged PRs in 30d
Description
In my case, yAxisRange returns wrong (too low for the lower and too high for the upper bound) values. Following workaround delivers correct values:
[g = dygraph object]
[data table layout = timestamp | idx0-values | idx1-values]
function myAxisRange(idx) {
var xMin, xMax, rMin, rMax;
[xMin,xMax] = g.xAxisRange();
rMin = g.findClosestRow(0);
rMax = g.findClosestRow(xMax-xMin);
return [g.getValue(rMin,idx+1),g.getValue(rMax,idx+1)];
}
Contributor 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.
Research direction
Start by locating the yAxisRange implementation and its relationship to xAxisRange, findClosestRow, and getValue. Reproduce the incorrect bounds using the issue's workaround for comparison; done means yAxisRange returns the expected lower and upper values for the plotted data.
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
- Needs clarification
- Newbie friendliness
- 25/100