Git Product home page Git Product logo

timeline-chart's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

timeline-chart's Issues

Unnecessary duplicate data provider requests

In TimeGraphChart:maybeFetchNewData() method, a new request is discarded if it the current data model already corresponds to the new request.

But if a previous request for the same view range is ongoing and awaiting response, the new request will be allowed to proceed, causing two concurrent requests for the same data model.

Furthermore, since requests are asynchronous, there is no guarantee on the order of reception of their responses, and if the older requests comes back last, it will overwrite the data model from the latest request with an obsolete data model.

A request for the same view range as an ongoing request should be ignored, and a response for a model that is not for the latest request should be discarded.

Mouse wheel makes rows bottom-aligned

When the timeline chart contains less rows than the maximum number of visible rows, and therefore there is no visible vertical scroll bar, then using the mouse wheel to scroll up or down moves the rows from the top to the bottom of the chart.
bottom

Initial selection range is not drawn

If the unit controller already has a selection range, it is not drawn when the component is created. It is only drawn once the selection range is changed after creation.

Time graph axis labels should be dynamic

The number translator should be aware of the step length so that it can dynamically adjust the format of the labels it provides.
For example if the step length is 0.1s it might not be necessary to format the labels up to the nanosecond.

Issues with state navigation at high zoom level

When trying to navigate between states at high zoom levels, using the left & right arrow keys, the selection doesn't skip correctly:

  • In the timeline-chart example app, the selection skips between the beginning and end of the absolute range.
    skipping-high-zoom-timeline

  • In the theia-trace-extension example app, it seems the selection skips to the next state and then it's only possible to skip between the start and end of that state, until zooming out a little. Notice also the disappearance of states when zooming in (related to #62?).
    skipping-high-zoom-trace-viewer

Add a 5 based scale to the axis

Currently, when you zoom, you always get a 10 based unit scale, which means when you zoom the number of labels jumps from ~1 to ~10. Would be nice if we had something in between, i.e.

1,2,3,4,5,...10
5,10,15,20,...50
10,20,30,40,...100
50

Improve user interaction

Especially with regard to touch pads. I'd expect

  • mouse interactions to be the same on the axis and on the chart
  • scroll left/right on the chart to scroll left / right
  • zoom to be possible within the chart (not just on the axis part. This is currently pretty hidden)

We should have equally intuitive interactions as the profiler of the Chrome Devtools.

Uncaught exception causes prevents further query to server to happen

The flag "this.fetching" can be set to true and won't be reset if an exception created in between (see lines below in time-graph-chart.ts).

BR
Bernd

       `this.fetching = true;
        const rowData = await this.providers.dataProvider(viewRange, resolution);
        if (rowData) {
            this.providedResolution = rowData.resolution;
            this.providedRange = rowData.range;
            this.setRowModel(rowData.rows);
            this.removeChildren();
            this.addRows(this.rows, this.rowController.rowHeight);
        }
        this.fetching = false;`

Leaking TimeGraphChart instances

The debounced maybeFetchNewData method is added as a viewRangeChangedHandler to the unit controller, but it is not removed when the time graph chart is destroyed. This causes the time graph chart instance to leak.

States with a style of height 0 do not show correctly

It is perfectly legitimate to have a style that advertises a height of 0 (like for minimum frequency of CPUs), but those states are displayed with some average height, not 0. The state should be of height 0, but any label associated with it should still be visible.

Reduce GPU load

Even without any interaction, the Chrome profiler shows more than 50% load on the GPU.
Can we improve on that?

Show annotation 'ticks' in timeline chart

Allow exemplars/regions of interest to be shown in the timeline chart.

Examples could be a system crash/core dump or simply an event that may be a trigger to show a change in state. (See instant events in the event-trace format)

Leaking TimeGraphNavigatorHandle instances

The moveEnd method is added as a snap-x-end handler to the document, but it is not removed when the time graph chart navigator handle is destroyed. This causes the time graph navigator handle instance to leak.

Entry selection + scroll + up/down arrow not consistent

Observed behavior

1- Select an entry at the top of the view
2- Scroll down the timeline
3- Click on the up/down arrow, expecting to navigate up and down

--> nothing happens, until the selected entry appears on screen when down is clicked often enough.

Expected behavior

When hitting up/down, it selects the next entry from the one that is selected and the entry should be revealed, so it should bring back the view to the selected entry.

Use test resources

For more closer to reality test case the resources in examples folder shall be used for example graph.

Gridlines are not on rounded time boundaries

The time graph gridlines and axis ticks are on rounded multiples of the step length away from the start time of the view range.
But the absolute time of the gridline will not be on a rounded number because the time graph does not seem to be aware of the time offset of its view range, which is only known by the (external) implementation of the numberTranslator.

The time offset should be available and used by the time graph so that it can set the gridlines and axis ticks on rounded boundaries.

States do not render always when the viewRange is changed

When the viewRange is changed the states aren't rendered. (you have to do it really fast to observe the issue)

In the below screen cast, the state doesn't appear if I move the scrollbar. But once I zoom in/out(or do some action that performs UI refresh), the states appear.
Kapture 2020-10-19 at 15 36 36

Scrolling with mouse wheel is not smooth

In a typical application, scrolling down with mouse wheel with one full finger strike makes the page scroll down around 1/3 of the page, so that after 3 strikes, the page is completely new. In the timeline-chart, a full finger strike scrolls down barely a line. So it takes a lot of finger work to scroll down a full page!

TypeError in TimeGraphChart

Appears to map to time-graph-chart.ts:190 : maybeFetchNewData()

Uncaught (in promise) TypeError: Cannot read property 'viewRangeLength' of undefined
at TimeGraphChart. (:3000/45.bundle.js:1789)
at step (:3000/45.bundle.js:1639)
at Object.next (:3000/45.bundle.js:1620)
at :3000/45.bundle.js:1614
at new Promise ()
at push.../../timeline-chart/timeline-chart/lib/layer/time-graph-chart.js.__awaiter (:3000/45.bundle.js:1610)
at TimeGraphChart.push.../../timeline-chart/timeline-chart/lib/layer/time-graph-chart.js.TimeGraphChart.maybeFetchNewData (:3000/45.bundle.js:1784)
at TimeGraphChart.push.../../timeline-chart/timeline-chart/lib/layer/time-graph-chart.js.TimeGraphChart.updateChart (:3000/45.bundle.js:1778)
at TimegraphOutputComponent.componentDidUpdate (:3000/45.bundle.js:4503)

Provide default annotation symbol

Right now when the annotation symbol style is not known then the annotation symbol is not drawn. There should be a default symbol drawn in for unknown styles (e.g. plus).

TimeGraphUnitController handlers cannot be removed

Handlers that are added to the unit controller with onViewRangeChange() and onSelectionRangeChanged() can never be removed.

So if the component that added a handler is unmounted, its handler will continue to be called.

Overlapping TimeGraphAxisScale labels

The minimum step length hard-coded to 80 is not enough to ensure that labels fit in the step width.

The calculation should consider the expected width of the label text.

Don't update the model unnecessarily when scaling or scrolling

Atm the underlying component model is recreated on every vie change. Which causes a lot of objects being created and garbage collected.
We should instead use the viewport and scaling information on an existing component model.
Separated from that the component model should only be recreated if a new data model is available.

Text value of the BitMapText object overflows

Steps to reproduce: Expand the state's width to the max so that the entire text is visible and then slowly reduce the width of the state's label by scrolling left or right. The text will start to overflow.

ctrl + mouse wheel not working as expected

Expected behavior

  • mouse wheel: go up and down the timeline
  • ctrl + mouse wheel: zoom in and out

Observed behavior

Hitting ctrl changes the behavior, so that mouse wheel after a ctrl keypress zooms in and out, whether or not the ctrl is pressed. Hitting another key (even ctrl itself sometimes) goes back to ctrl-less behavior (up and down)

Re-use annotations to improve performance

It would be good to improve the timeline chart's annotation performance by making one annotation for every type and re-using it by adding it as a child to the parent node (row element). This will save on drawing and memory constraints.

It is not yet an obvious performance issue, so it should be addressed when it is one though.

Closing time graph chart can be very slow

Closing a time graph chart that has a very large number of components (states, annotations, arrows) can take a very long time, > 20 seconds when there are > 120k elements. This is because the time graph layer destroys each of its children one by one.

It should be checked if the whole layer can be destroyed in a single operation.

Vertical Scrollbar issue on timeline-chart

The right side vertical scrollbar misbehaves. It fails to recalculate the correct y-axis position using the vertical offset.
The gif attached illustrates the incorrect behavior.
Vertical_ScrollBar_defect

Incorrect throttling prevents fetching correct time graph data

In TimeGraphChart's view range change handler, new time graph data should sometimes be fetched for the new view range. But if data is already being fetched, the throttling mechanism will just omit the fetching of new data.

Therefore when changing the view range rapidly, for example when zooming with mouse wheel or panning with the mouse, only the first view range change will fetch data, and the subsequent and last view range will not. The end result is time graph data that does not match the latest view range.

Either the data should be fetched for the latest upon completion of the current fetching, or a debouncing function could be used to wait until view range has finished updating to fetch the data for the latest stable view range.

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.