Giter VIP home page Giter VIP logo

Comments (11)

tjhart avatar tjhart commented on July 22, 2024 2

@cwanja I understand you're trying to represent a LOT of data on this graph, and space is a premium. Dunno what the right solution is for everyone.

I do expect lines of the same unit of measure should sync, whether the labels are displayed or not. I'm ok with not seeing a 'miles' label. The popup for values makes it clear enough for me.

from teslamate.

cwanja avatar cwanja commented on July 22, 2024 1

I believe what is happening is that these values are not plotted against the Y axis with the values we had displayed. And thus they do not "fluctuate" how you would expect them too on a normal graph (e.g. proper spacing). Notice that on the left, there is no value for the range values in the axis - it is speed and power. I think Grafana is just doing its best to plot the range values. @DrMichael you see anything different to this?

I can make them show, but look how confusing the right hand side is:
Screenshot 2024-03-22 161611

If I have my understanding correctly then, I am seeing the same behavior @tjhart - see screenshot and where my tooltip is.
Screenshot 2024-03-22 161727

But I believe if we add them, it is going to be too confusing.

from teslamate.

tjhart avatar tjhart commented on July 22, 2024 1

@JakobLichterfeld and @cwanja I don't have experience with Grafana, so I'm not sure if this is the correct solution, but it resolves my issue.

I've fiddled with the pane definition for 'Internal Drive -> Drives'. Override 12 is defined as:

Fields with name matching regex: range_estimated_.*
Standard options > Display name: Range (est.)

Which is different than Override 9:

Fields with name matching regex: range_rated_.*
Standard options > Display name: Range (rated)
Standard options > Min: 0

Removing Standard options > Min: 0 from both, or setting it to the same on both, gives me what I expect to see on the graph.

from teslamate.

cwanja avatar cwanja commented on July 22, 2024 1

@tjhart definitely take a look at it later, my gut tells me it was oversight. I know these graphs have been a bit pain even when Adrian was around. Would want @DrMichael to validate further as well.

from teslamate.

JakobLichterfeld avatar JakobLichterfeld commented on July 22, 2024

Hi tjhart,
Not really sure if I understand your issue correctly.

  • The graph do show that the values sometimes are really close or even the same
  • but when there is a big change in Range (est) (due to hard acceleration or deceleration) the cursor does not snag to the right value when you are zoomed out?

from teslamate.

tjhart avatar tjhart commented on July 22, 2024

@JakobLichterfeld Note the 3 screen shots (all of the exact same graph), the units I calculated, and the displayed difference between the values:

  1. As a baseline, The first screen shot shows the initial rated (244 mi) and estimated range (228 mi). The values are 16 units apart, and you can visually see some distance between them on the y axis, suggesting a delta in distance
  2. The second screen shot shows rated (235 mi) and estimated range (234 mi). The values are 1 unit apart on the y axis, and (at least to me) a surprising gap between the two, but compare that to the 3rd screenshot:
  3. Rated (234 mi) and estimated range (247 mi) they're now -13 units apart on the y axis, but are graphed at almost the exact same coordinate, with the estimated just being slightly below the rated. Compared to the baseline, I would expect the estimated coordinate to be above the rated coordinate, by a little less distance than the baseline
  4. Rated (125 mi) and estimated (132 mi). They're now -7 units apart, with the estimated coordinate being significantly below the rated coordinate (y axis). Further below than the baseline, when the distance was 16 units. I would expect the estimated coordinate to be above the rated coordinate.
  • The estimated range and rated range are the same unit (distance).
  • At any point the estimated range and rated range were the same (both measured in distance), I expect the graph point to be the same coordinate.
  • When the estimated range is higher than the rated range, I would expect the estimated coordinate to be higher than the rated on the y axis. The screen shots demonstrate that is not always the case.
  • When the estimated range is lower than the rated range, I would expect the estimated coordinate to be below the rated coordinate.
  • I expect the distance between the estimated and rated ranges y axis value to demonstrate the delta between the two values. It doesn't.

from teslamate.

JakobLichterfeld avatar JakobLichterfeld commented on July 22, 2024

As wrote before, the cursor does not snag to the correct value, this is a grafana "issue" when your zoom level is too small for quick changes in values.

from teslamate.

tjhart avatar tjhart commented on July 22, 2024

I don't understand "the cursor does not snag to the correct value" or "zoom level is too small for quick changes" What do you mean?

I recognize that in the graph above, Grafana is dealing with multiple records per point on the x axis. However, that does not explain the issue I'm seeing. The displayed values line up with the underlying data. I can't find 'adjacent' data that would explain the above.

Screen shot 3 explains the problem very well when you look at the data. The time is 2024-03-10 15:52:25 UTC. Here are records near that timestamp that have range values:

select id,
       date,
       convert_km(p.rated_battery_range_km, 'mi') as range_rated_mi,
       convert_km(p.est_battery_range_km, 'mi')   as range_estimated_mi
from positions p
where p.drive_id = 1781
  and p.date between '2024-03-10 15:52' and '2024-03-10 15:53'
  and p.rated_battery_range_km is not null
order by p.date


   id    |          date           |    range_rated_mi    |  range_estimated_mi  
---------+-------------------------+----------------------+----------------------
 4569786 | 2024-03-10 15:52:14.66  | 233.9903314402177290 | 247.0888687287956554
 4569841 | 2024-03-10 15:52:29.967 | 233.9903314402177290 | 247.0888687287956554
 4569890 | 2024-03-10 15:52:45.26  | 233.9903314402177290 | 246.7036176320727752
  1. Screen shot 1 represents position ID 4567906. The values displayed in the screen shot for range equal the values displayed. This is the second record for this drive. The previous record had no range values. The next range value doesn't show up for 5 seconds - ID 4567906, date 2024-03-10 15:39:43.57, and the values are effectively the same.
  2. Screen shot 2 represents position ID 4569599. The values displayed are correct for this record. The previous record with a range value was at 2024-03-10 15:50:58.281, and the next record with a range value isn't until 2024-03-10 15:51:28.858, ID 4569640. The values before and after are effectively the same
  3. Screen shot 3 represents position ID 4569841. The values displayed are correct for this record. The previous record with a range value was at 2024-03-10 15:52:14.66 (id 4569786), and the next was at 2024-03-10 15:52:45.26 (id 4569890), the values before and after are less than 1 unit different.
  4. Screen shot 4 represents position ID 4589081. The values displayed are correct for this record. The previous record with a range value was at 2024-03-10 17:47:50.972 (id 4589026), and the next was at 2024-03-10 17:48:21.738 (id 4589137). The values before and after are effectively the same

from teslamate.

tjhart avatar tjhart commented on July 22, 2024

@JakobLichterfeld I've provided data for a second drive which still demonstrates the same problem. This drive is only 10 minutes long, but the same issues are demonstrated.

from teslamate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.