Skip to content

How can I hide track labels programmatically in the LinearGenomeView #4605

Answered by cmdcolin
thenath asked this question in Q&A
Discussion options

You must be logged in to vote

I can see that this isn't working in embedded also. but, since you are in embedded, you can call programmatic APIs easier (unlike in jbrowse-web which is very configuration oriented)

here is an example that should work for embedded

 const state = createViewState({
    assembly,
    tracks,
    location: 'ctgA:1105..1221',
  })
  state.session.view.showTrack('volvox-long-reads-sv-bam')
  state.session.view.setTrackLabels('hidden')


this is the particular "API" that I called here: the setTrackLabels function on the "LinearGenomeView" statemodel API https://jbrowse.org/jb2/docs/models/lineargenomeview/#action-settracklabels

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@cmdcolin
Comment options

Answer selected by cmdcolin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants