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

Mobile device zooming with 2 y-axes #980

Open
chrissyheb opened this issue Nov 28, 2019 · 0 comments
Open

Mobile device zooming with 2 y-axes #980

chrissyheb opened this issue Nov 28, 2019 · 0 comments

Comments

@chrissyheb
Copy link

Hello,
I have a application where I have to use two y-axes. If I use the graph on my laptop and zoom in with the mouse, I can click and hold to zoom and both y-axes are showing exactly the area I marked.
If I view the same graph on a mobile device (tried with chrome on iPad (current iOS version) and brave/firefox on Android 9.0) and try to zoom in only the left (main) y-axis zooms in, the right one keeps its scale.
Can anyone please give me a hint how to achieve the same behaviour on a mobile device as it is with a desktop browser?
Thanks a lot.
Chrissy

Initialization is done by following code.

labelsDiv: 'legend_div',
legendFormatter: legendFormatter,
animatedZooms: true,
title: '',
legend: 'always',
labels: ['time','y1Val1','y1Val2','y2Val1','y2Val2'],
xlabel: 'time',
ylabel: 'Y1',
y2label: 'Y2',
includeZero : true,
drawAxesAtZero : true,
xRangePad: 1,
series: {
    'y1Val1': {
        color: 'blue',
    },
    'y1Val2': {
        color: 'green',
    },
    'y2Val1': {
        color: 'red',
        axis: 'y2',
    },
    'y2Val2': {
        color: 'orange',
        axis: 'y2',
    },
 },
 axes: {
    x: {
        pixelsPerLabel: 40,
    },
    y: {
        valueRange: [-10,11],
        pixelsPerLabel: 20,
    },
    y2: {
        valueRange: [0,367.5],
    },
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant