Reports - Minute granularity


Author
Message
IvanW
IvanW
New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)
Group: Forum Members
Posts: 4, Visits: 16
In the reports section, the time scale seems to be restricted to minutes with the following settings:
SELECT Timestamp AS Time, tractionSwitch AS Traction, speedcap as Cap
FROM CurrentView
ORDER BY Time

Sample rows from execution results:
8 Jun 2023 2:13:16 PM.619     3861    7500
8 Jun 2023 2:13:16 PM.623     3862    7500

Is there any way to increase the granularity of the graphs by selecting units? The Log entries per minute has a dropdown which is nice, although it doesn't display units smaller than minutes when hovering.
Edited 10 Months Ago by LogViewPlus Support
LogViewPlus Support
LogViewPlus Support
Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)
Group: Moderators
Posts: 1.1K, Visits: 3.7K
Hi Ivan,

I am not 100% clear what you are trying to do, but if we look at the problem of "log entries per second" this can be achieved with:
select 
min(Timestamp) as Time,
count(*)
from CV
group by
datepart(year, Timestamp),
datepart(month, Timestamp),
datepart(week, Timestamp),
datepart(day, Timestamp),
datepart(hour, Timestamp),
datepart(minute, Timestamp),
datepart(second, Timestamp)
order by Time

This SQL statement will group all log entries by time down to the nearest second of granularity, count the number of entries during the interval, and find the minimum timestamp.

The built in 'Log Entries Per Minute' query does something similar by focusing on the minute interval.  It does this very differently (and somewhat hacky) by casting the Timestamp to a small date time:
CAST(Timestamp AS smalldatetime)

The SmallDateTime data type does not support granularity less than a minute.

Does that help the SQL you were trying to write?  If not, can you give me more detail on what you are trying to do?

Hope that helps,

Toby
Edited 10 Months Ago by LogViewPlus Support
IvanW
IvanW
New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)
Group: Forum Members
Posts: 4, Visits: 16
Ah thank you! I was able to use this and drill down and see that in fact, all values are being plotted correctly, but the graph is small enough that I couldn't see the unit resolution in the hovering. If I restrict the time period, I can see seconds or even ms if it's small enough. The X axis is autoscaling the resolution it seems. If I could force it to a certain scale that would be ideal so I could visualize all the values, even labeling was more course.
Ie with a small time period with same data:


vs larger time period with no other changes: 



Edited 10 Months Ago by IvanW
IvanW
IvanW
New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)
Group: Forum Members
Posts: 4, Visits: 16
TO be clear - I'd rather see all values and have a scroll bar, rather than it always fitting to my window.Smile

LogViewPlus Support
LogViewPlus Support
Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)
Group: Moderators
Posts: 1.1K, Visits: 3.7K
Correct - the graphs will auto-scale the X / Y axis based on the data range to display.  The graph is then drawn to a pre-allocated size and sometimes this can result in a graph that is difficult to read.  Unfortunately, this is not something that we can easily resolve.  It would be better to address this by changing the granularity or graph type.

I also noticed that you are using a line graph which draws a line between two points.  If data is missing for a time range, this can result in 'false' data being shown in the grid as the line does not drop to zero unless an explicit 'zero' value is found.  In this situation, a bar graph may be more appropriate.

Also, you may want to check out the Navigation Reports.  These reports use the same graphing controls and they might help with giving you a better understanding how the underlying controls behave.

Automatically adding a scroll bar to the charts is not going to be possible.  It is very difficult to predict in advance if they are actually needed.

Hope that helps,

Toby
Edited 10 Months Ago by LogViewPlus Support
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Login

Explore
Messages
Mentions
Search