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

Fixed provider and view to get correct viewRange and absoluteRange #2

Open
wants to merge 1 commit into
base: prototype-timeline-chart
Choose a base branch
from

Conversation

jbicker
Copy link

@jbicker jbicker commented Feb 13, 2019

Some notes to this PR:

The unitController is 0-based. So, the viewRange (the visible range of the chart) should be between 0 and the absoluteRange (the total length of the chart).
Since in this example the chart begins far more later than 0 we have to take that value and say thats the logical 0. So we have to normalise everything by subtracting that start value from all other values of rows and states.
If you need the original time in the time axis you can adapt the number in the numberTranslator again.
I have enhanced the TimelineChart.TimeGraphModel with a data field so one can transport such information.

One more thing: I had to use the type 'any' for states because the type 'TimeGraphState' in the tsp-typescript model isn't the same as the state object returned by the server. -> the TimeGraphState in tsp-ts-client needs endTime while the server provides an object with duration instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant