Skip to content

Commit

Permalink
fix(xy): interaction in linear/log x scales (#1258)
Browse files Browse the repository at this point in the history
  • Loading branch information
markov00 committed Jul 20, 2021
1 parent fb8f719 commit db94db2
Show file tree
Hide file tree
Showing 5 changed files with 449 additions and 2 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -41,7 +41,7 @@
"test:tz-ny": "TZ=America/New_York jest --verbose --config=jest.tz.config.js",
"test:tz-jp": "TZ=Asia/Tokyo jest --verbose --config=jest.tz.config.js",
"test:integration": "./scripts/vrt.sh",
"test:integration:local": "LOCAL_VRT_SERVER=true PORT=9001 yarn test:integration",
"test:integration:local": "LOCAL_VRT_SERVER=true PORT=9002 yarn test:integration",
"test:integration:debug": "DEBUG=true yarn test:integration:local",
"test:integration:legacy": "LEGACY_VRT_SERVER=true yarn test:integration",
"test:integration:local:legacy": "LOCAL_VRT_SERVER=true PORT=9002 yarn test:integration:legacy",
Expand Down
2 changes: 1 addition & 1 deletion packages/charts/src/scales/scale_continuous.ts
Expand Up @@ -498,7 +498,7 @@ export class ScaleContinuous implements Scale {
}
const currentValue = data[leftIndex - 1];
// pure linear scale
if (this.minInterval === 0) {
if (this.bandwidth === 0) {
const nextValue = data[leftIndex];
const nextDiff = Math.abs(nextValue - invertedValue);
const prevDiff = Math.abs(invertedValue - currentValue);
Expand Down

0 comments on commit db94db2

Please sign in to comment.