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

User defined plot scales #69

Open
ericJrdn opened this issue May 29, 2021 · 1 comment
Open

User defined plot scales #69

ericJrdn opened this issue May 29, 2021 · 1 comment

Comments

@ericJrdn
Copy link

Hi,
Great app.
It would be great if we could fix graphic scales (heart rate, speed, pace) to arbitrary values, or if we could zoom to specific area with the mouse.

For example, heart rates below 120 are not relevant to me. It means i'm walking or that my HR monitor is wrong. The same thing applies for speed and of course, to pace.

I did not find the way to do it.
Eric

@alex-hhh
Copy link
Owner

Currently, the plot scale will be calculated such that all data is visible in the plot and there is no way for the user to change that. There are a few options on how to add this:

Modifying the source code

If you build the application yourself, you can however add your own scales to the plot, by adding an y-range function to the relevant series. This, of course, would be specific to your own needs.

For example, to have a minimum HR of 120, you would can add:

(define/override (y-range) (cons 120 #f))

... to this class definition:

(new (class series-metadata% (init) (super-new)

here is an example for the Left-Right balance series:

(define/override (y-range) (cons 45 55))

Add support for custom data series definitions to a JSON file

A second option is to allow defining these range in a separate JSON file -- this is what the xdata-series-metadata% class does, but only for XDATA series (and currently does not allow setting the Y-RANGE).

Updating the GUI

The last option is to update the GUI to allow the user to configure these scales -- this is the most complex option and also requires some design considerations. For example, should the application to remember that setting or not, should these limits be set for all activities of a certain type, like running, or just for individual activities, etc. It would also need some design about how exactly this would work (e.g the actual steps the user would take to configure this).

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