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

Support auto scaling for y axis #820

Open
mwalliczek opened this issue Aug 26, 2020 · 1 comment
Open

Support auto scaling for y axis #820

mwalliczek opened this issue Aug 26, 2020 · 1 comment

Comments

@mwalliczek
Copy link

Currently auto scaling of the y axis is disabled for all entities with only positive values (see js/entity.js line 210).

However, for pressure given in hPa that makes the graphic more or less useless, because you would not see any difference between 995 and 1005.

So I manually enabled the auto scaling by setting the min value to "null", like this:

htdocs/js/options.js:
@@ -93,7 +93,8 @@ vz.options.plot = {
                },
                {
                        axisLabel: '°C', // assign temperature to 2nd axis- remove if not used
-                       tickFormatter: vz.wui.tickFormatter             // show axis label
+                       tickFormatter: vz.wui.tickFormatter,            // show axis label
+                       min: null
                },
                {
                        /*
@@ -103,7 +104,8 @@ vz.options.plot = {
                        */
                        position: 'right',
                        // alignTicksWithAxis: 1,
-                       tickFormatter: vz.wui.tickFormatter             // show axis label
+                       tickFormatter: vz.wui.tickFormatter,            // show axis label
+                       min: null
                }
        ],
        selection: { mode: 'x' },

and it seems to work. I would like to have this behaviour as configurable option - it this possible?

@andig
Copy link
Contributor

andig commented Aug 26, 2020

Would be happy to accept a PR. It should cover the general case.

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