-
Notifications
You must be signed in to change notification settings - Fork 11
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
Expose only Track()
to users and internally decide between SingleTrack
and PartialTrack
?
#12
Comments
Track()
to users and internally decide between SIngleTrack
and PartialTrack
?Track()
to users and internally decide between SingleTrack
and PartialTrack
?
I think this is a good idea, but unfortunately the types are distinct. Another option would be to export a singleton of # gosling/api.py
track = PartialTrack()
# example.py
bar_overview = bar_base.properties(
width=300, height=300,
alignment='overlay',
tracks=[
gos.track, # since overlay alignment is used with tracks, this is PartialTrack
gos.track.mark_brush().encode(x=gos.Channel(linkingId='detail-1')),
gos.track.mark_brush().encode(x=gos.Channel(linkingId='detail-2'))
]
) With that said, there is likely a way to make |
Another option would be to have a bar_overview = gos.track(data=data).properties(
width=300, height=300,
alignment='overlay',
tracks=[
gos.track(), # since overlay alignment is used with tracks, this is PartialTrack
gos.track().mark_brush().encode(x=gos.Channel(linkingId='detail-1')),
gos.track().mark_brush().encode(x=gos.Channel(linkingId='detail-2'))
]
) The less magic the better IMO. And this is clearly a function that just adds some shorthand. |
Closing this for now since I think this is addressed by #19 (comment) |
I am wondering if it makes sense to expose
gos.Track()
only to users instead of the additionalgos.PartialTrack()
. I think whenever a user usesoverlay
alignment
withtracks
, we can internally consider this asPatialTrack
so that users do not have to manually select betweenSingleTrack
andPartialTrack
.The text was updated successfully, but these errors were encountered: