-
Notifications
You must be signed in to change notification settings - Fork 27
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
Specifying y-axis limits and multiple tracks using the same y-axis are wanted #497
Comments
Hi Zhen!
If you know the min and max values of the y-axis, you can fix the y-axis scale using y: { field: 'value', type: 'quantitative', domain: [0, 100] }
I assume you are overlaying multiple tracks on top of each other. You can hide certain axis by specifying an y: { field: 'value', type: 'quantitative', axis: "none" } // axis can be "left", "right", "top", "bottom", "none"
Could you share with us details about the issue and the example spec so that we can replicate it? |
sorry, I cannot replicate it any more. @sehilyi : Adding more interaction functionality to Gosling is really required in the near future. |
@zhangzhen Yes, user interactions are something that we will definitely support in the future and are limited at the moment. And, knowing use cases like yours will be really helpful. I think, for now, the best way in your case would be to use the experimental The core part of the codes is located at // (1)
<gosling.GoslingComponent
ref={gosRef}
spec={generateGoslingSpec([+min, 0.001], ...)}
experimental={{ reactive: true }}
/> "id": "track-1", // (2)
"data": {
"url": "https://server.gosling-lang.org/api/v1/tileset_info/?d=cistrome-multivec",
"type": "multivec",
"row": "sample",
"column": "position",
"value": "peak",
"categories": ["sample 1", "sample 2", "sample 3", "sample 4"],
binSize: binSize === 0 ? 1 : binSize
},
... <div style={{marginLeft: 80}}>
{'Color Min Value: '}
<input
type="range"
min={0}
max={0.001}
step={0.0001}
value={min}
className="slider"
id="min-slider"
style={{ width: 100, display: 'inline', margin: 10}}
onChange={(e) => setMin(e.currentTarget.value) }
/>
{min} // (3) this information is used when generating gosling spec
</div> |
This comment has been minimized.
This comment has been minimized.
Moved the question right above as a new GitHub issue (#546) since it became quite different from the original question. |
The following new features are wanted in my case:
The text was updated successfully, but these errors were encountered: