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

Compact L1 labels #452

Merged
merged 15 commits into from
Feb 13, 2023
Merged

Compact L1 labels #452

merged 15 commits into from
Feb 13, 2023

Conversation

goodboy
Copy link
Contributor

@goodboy goodboy commented Feb 2, 2023

New styling for our L1 spread labels drawn on the fast chart, again, in support of the oncoming #420.
screenshot-2023-02-02_16-05-26

@goodboy goodboy force-pushed the epoch_indexing_and_dataviz_layer branch from ead2e1e to 956cacb Compare February 9, 2023 21:29
@guilledk guilledk force-pushed the epoch_indexing_and_dataviz_layer branch from 956cacb to b112d0e Compare February 12, 2023 18:14
@goodboy goodboy force-pushed the epoch_indexing_and_dataviz_layer branch from b112d0e to 340045a Compare February 12, 2023 19:00
Base automatically changed from epoch_indexing_and_dataviz_layer to master February 12, 2023 19:27
Instead of having the l1 lines be inside the view space, move them to be
inside their respective axis (with only a 16 unit portion inside the
view) such that the clear price label can overlay with them nicely
without obscuring; this is much better suited to multiple adjacent
y-axes and in general is simpler and less noisy.

Further `L1Labels` + `LevelLabel` style tweaks:
- adjust `.rect` positioning to be "right" (i.e. inside the parent
  y-axis) with a slight 16 unit shift toward the viewbox (using the new
  `._x_br_offset`) to allow seeing each level label's line even when the
  clearing price label is positioned at that same level.
- add a newline's worth of vertical space to each of the bid/ask labels
  so that L1 labels' text content isn't ever obscured by the clear price
  label.
- set a low (10) z-value to ensure l1 labels are always placed
  underneath the clear price label.
- always fill the label rect with the chosen background color.
- make labels fully opaque so as to always make them hide the parent
  axes' `.tickStrings()` contents.
- make default color the "default" from the global scheme.
- drop the "price" part from the l1 label text contents, just show the
  book-queue's amount (in dst asset's units, aka the potential clearing vlm).
Goes back to always adjusting the y-axis range to include the L1 spread
and clearing label in view whenever the last datum is also in view,
previously this was broken after reworking the display loop for
multi-feeds.

Drops a bunch of old commented tick looping cruft from before we started
using tick-type framing. Also adds more stringent guards for ignoring
but error logging quote values that are more then 25% out of range; it
seems particularly our `ib` feed has some issues with strange `price`
values that are way off here and there?
@goodboy goodboy merged commit 42d2f9e into master Feb 13, 2023
@goodboy goodboy deleted the l1_compaction branch February 13, 2023 16:21
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.

2 participants