Comments (3)
Hi @mattp-
We have the horizontal version of Crosshair in our pipeline, it's not our highest priority though.
Can you please explain how would you like to use it with Timeline? We usually integrate them like this:
from unovis.
hi there, yep that looks like what i was looking for. mainly I was actually just looking for a workaround for #103 to get my tooltip to appear. I thought I had it with crosshair until I realized it was not the right axis :)
from unovis.
@mattp- In that case, you'll need to set snapToData
to false
in Crosshair's config, and provide your own getCircles
function for getting the position for the Crosshair circles. It's a bit tricky, but here is an example:
function findDataEntriesAt (x: number): SampleTimelineDatum[] {
return data.filter(d => (d.time <= x) && ((d.time + d.duration) >= x))
}
function getCircles (x: number, data: SampleTimelineDatum[]): CrosshairCircle[] {
return findDataEntriesAt(x).map((d, i) => ({
y: 11 + i * 22 - scrollTop, // If your Timeline is scrollable you'll also need to store its current scrollTop position
color: d.color,
}))
}
// Optional: saving the scrollTop position and re-rendering the Crosshair
// Set this function via the `onScroll` config property of Timeline
function onScroll (top: number): void {
setScrollTop(top)
crosshairRef.component.render(0)
}
from unovis.
Related Issues (20)
- The "path" argument must be of type string. Received null after upgrading HOT 4
- Force Graph is refusing to accept height constant, stays at 300px default. HOT 4
- Scatter: Add labels trimming support
- Docs | Contribution Guide
- Possibility of multiple x / y axes
- Chord Diagram | Highlight nodes and links via config
- Website | Dark theme functionality is broken
- Feature request for Chord Diagram: Ability to use a SVG as a label HOT 5
- Accessibility: Automatic chart description generation
- Chart Annotations
- Website | Gallery | Broken gallery examples
- Hidden tooltip overflows viewport HOT 2
- ELK Algorithm Support Request HOT 1
- @unovis/svelte VisSingleContainer Props have no effect
- vue bundle size + ~2MB HOT 5
- Getting empty graphs when x values are strings HOT 1
- VisCrosshair not working with update 1.3.0 HOT 2
- Donut: `config.sortFunction` is not a function error HOT 1
- Make number of grid line to tick label ratio configurable
- Crosshair events don't trigger HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unovis.