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

Graph has odd Y-axis values and sensor data showing fixed 1. #958

Open
earlthesquirrel opened this issue Nov 8, 2024 · 4 comments
Open
Labels
bug Something isn't working

Comments

@earlthesquirrel
Copy link

Please don't delete these questions! They are asked almost with every issue - answering them as below saves us time from asking them!

First step
Try to debug the skin yourself. If you can't figure it out, please include the debug information (text, screenshots, etc.). See this guide on debugging the skin. https://github.com/poblabs/weewx-belchertown#how-to-use-debug

I have a graph for O3 data. The data coming in (as verified from the Particle API) has values like 0.554274, 0.563021, 0.528518 ppm (at least that's what I was told the units were)

I am trying to properly graph the information. I tried to specify yAxis_softMin = 0.10000, yAxis_softMax = 1.50000, yAxis_tickInterval = 0.01000.

Describe the bug
A clear and concise description of what the bug is.

The graphs produces some weird values on the Axis, and the O3 reading shows always as 1
I've confirmed that the data in the DB has the correct values.
(I've been playing with the numbers, so the Axis values have been moving around)

Link to your website (IMPORTANT)
https://www.baugh.org/weewx/belchertown/graphs/?graph=airQuality

That page has the O3 graph.

Version of the skin you're using

Using version 1.3

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

I expect some better scaling :-) and proper values showing up.

Screenshots
If applicable, add screenshots to help explain your problem.

Device Information (please complete the following information):

  • Device: [e.g. desktop, iPhone6]
  • OS: [e.g. Windows, Android, iOS]
  • Browser [e.g. Chrome, Safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here. Maybe a potential fix?

HELP WANTED
If you have a fix for this, please submit a pull request against the development branch!

@earlthesquirrel earlthesquirrel added the bug Something isn't working label Nov 8, 2024
@roe-dl
Copy link
Contributor

roe-dl commented Nov 9, 2024

You can set up the number of decimals in graphs.conf:

            [[[[numberFormat]]]]
                decimals = 5

May be, you will have to add a line to belchertown.py:

        all_obs_rounding_json['yourObsType'] = 5

Insert it before the line # social share.

@earlthesquirrel
Copy link
Author

Where should I be adding the

          [[[[numberFormat]]]]
               decimals = 5

at?

@earlthesquirrel
Copy link
Author

Also, I don't see a line starting with

# social share

in my belchertown.py file. Do you have a line number?

@roe-dl
Copy link
Contributor

roe-dl commented Nov 12, 2024

graphs.conf

The number format can be set in graphs.conf for every line in a graph. So you could set up a graph like this:

...
    [[YourPlot]]
        ...
        [[[YourObservationType]]]
            ...
            [[[[numberFormat]]]]
               decimals = 5

You did not provide the observation type name of your O3 reading. So I can describe it in general only. Replace [[[YourObservationType]]] with the name of your O3 reading, and [[YourPlot]] with the name of the plot.

belchertown.py

The line # social share is at line number 1953 in the actual version of the skin. So put the new line in line 1951. Please note py not js.tmpl.

line 1951 of belchertown.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants