Some weeks ago, Timeline did not allow to zoom out from start.
- You could only zoom out to get back to zoomed in.
- On Spider, the default Timeline zoom was displaying all data.
That was an issue for performance, as getting the min and max of data across all historical indices was long (300ms to 5s). So I moved to a fixed zoom level based on the current time, and the ability to zoom out from start.
This was faster, and less stress for the server. Nice.
But then the Timeline UX was not good. When sliding the Timeline at first, the TimeLine was enlarging its domain instead sliding. This was linked to previous (no zoom) fashion, but was not anymore welcome.
So I did some feature removal and code cleaning. Removing some bugs on the way, and now, TimeLine sliding and initial zoom out is much better. With proper management of the domain limits (maxDomain).
This is v3.0 of Timeline: https://www.npmjs.com/package/@spider-analyzer/timeline/v/3.0.0
The zoom out factor can be set in the props!
Timeline tooltips
This was a request from Streetsmart team:
Implementing tooltips to display metrics information over the Timeline.
At first, it seems simple, but it was not.
- Indeed, HTML allows only one element to capture the 'onMouseOver' event. The first one under the mouse usually.
- And either the Dragoverlay layer or the Cursor layer were already capturing it.
- So, the histograms bar could not.
Then, I add to di it the old way:
- Compute the position on the mouse in the referential of the histogram
- Determine what bar was hovered
- Send the information to the histogram component
- And then display a darkening rectangle to show the hover effect.
- I also delayed the tooltip appearance, as a whole for the histogram, with a straight setTimeout, that is cleared onMouseOut
For better UX,
- Tooltips are hidden when sliding the Timeline or dragging/drawing the time selection.
All custom made :) But it rocks!
It is deployed on Spider Network and Monitoring UIs, and will be soon on Streetsmart!
The tooltip content as well as look and feel can be easily customized with component props and CSS.
This is v3.1: https://www.npmjs.com/package/@spider-analyzer/timeline/v/3.1.0