Skip to content

Instantly share code, notes, and snippets.

@cstefanache
Created August 21, 2019 11:51
Show Gist options
  • Save cstefanache/ac15942472644b73e6fc10da7cc71812 to your computer and use it in GitHub Desktop.
Save cstefanache/ac15942472644b73e6fc10da7cc71812 to your computer and use it in GitHub Desktop.
Stackoverflow comment
Window width (wwidth) = 100
DATA.length = 8
dataPointsOnScreen = 5
Case 1: x scroll = 0
0 [middle]
| |
*----*----*-+--*----*----*----*----*
|
|<---- width = 100 --->|
|<------- range ------>|
|<------------- domain ----------->|
Case 1: x scroll = 5 (units)
-5 0 [middle]
| | |
*----*----*----*-+--*----*----*----*
|
|<---- width = 100 --->|
|<------- range ------>|
|<------------- domain ----------->|
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment