gosling-lang/gosling.js

Add support for in-view overlay of detail track (overlaid tracks with different dimensions)

thomcsmits opened this issue · 0 comments

Story
To display detail about a chart it's common to add a smaller second chart in the first chart on one of the sizes:

bar chart with smaller bar chart on the right top

Generally, either of the 2 is true:

  • The same mark is used for the charts, the label is the same for the axes (e.g x-axis 1 and 2), but the domain is different, generally x-axis 2 has a smaller domain than x-axis 1.
  • The axis domain is the same (e.g. both show the full genome) but the mark is different.

An example where the domain is the same but the mark is different:
image

Potential solution
We can support this by allowing two overlaid tracks to have different sizes. We would need to specify the size of the smaller chart, as well as either the alignment (which corner, as these are almost always in corners), or the specific x,y coordinates of one of the corners.

Requested enhancement
Ability to overlay tracks with different sizes, and be able to specify the relative location of the smaller track.