Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zoom by wheel not working properly with rescale optio #2926

Open
monexiao opened this issue Oct 27, 2022 · 0 comments
Open

Zoom by wheel not working properly with rescale optio #2926

monexiao opened this issue Oct 27, 2022 · 0 comments

Comments

@monexiao
Copy link

monexiao commented Oct 27, 2022

Description

// base css
import "billboard.js/dist/theme/insight.css";
import bb from "billboard.js";

// for ESM environment, need to import modules as:
// import bb, {line, zoom} from "billboard.js";

var chart = bb.generate({
  data: {
    columns: [
	["sample", 30, 200, 100, 400, 150, 250, 150, 200, 170, 240, 350, 150, 100, 400, 150, 250, 150, 200, 170, 240, 100, 150, 250, 150, 200, 170, 240, 30, 200, 100, 400, 150, 250, 150, 200, 170, 240, 350, 150, 100, 400, 350, 220, 250, 300, 270, 140, 150, 90, 150, 50, 120, 70, 40]
    ],
    type: "line", // for ESM specify as: line()
  },
  zoom: {
    enabled: true, // for ESM specify as: zoom()
    rescale: true
  },
  bindto: "#zoom"
});

Steps to check or reproduce

Use the sample "zoom" of https://naver.github.io/billboard.js/demo/#
and add the "rescale: true" in zoom block.

After I zoom in, the chart is reset to original offset when drag it to left or right.

I have try the 3.6.0, 3.6.2 and the same of demo page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants