-
Notifications
You must be signed in to change notification settings - Fork 829
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
Gl scatterplot #304
Gl scatterplot #304
Conversation
@mcnuttandrew Very cool. Not sure if this is of interest, but an idea we have been playing with in deck.gl is to provide better React wrappers allowing deck.gl layers be specified as React components. The idea would be to allow the following type code that might make deck.gl easier to use for your purposes.
Perhaps implemented using something like:
Maybe an adaptation of this idea could be helpful in your integration? |
@ibgreen That's a great idea! I feel like that would ease legibility lots of different places |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥇
MarkSeries | ||
} from 'index'; | ||
|
||
function getRandomData() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💅
const getRandomData = () =>
new Array(100).fill(0).map(row => ({
x: Math.random() * 10,
y: Math.random() * 20,
size: Math.random() * 10,
color: Math.random() * 10,
opacity: 0.9
})
);
src/plot/series/mark-series-gl.js
Outdated
return ( | ||
<div className={`${predefinedClassName} ${className}`}> | ||
{innerHeight && innerWidth && <DeckGL width={width} height={height} viewport={glViewport} | ||
style={{position: 'absolute', top: '0px', left: '0px'}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
top: 0, left: 0
src/plot/series/mark-series-gl.js
Outdated
<div className={`${predefinedClassName} ${className}`}> | ||
{innerHeight && innerWidth && <DeckGL width={width} height={height} viewport={glViewport} | ||
style={{position: 'absolute', top: '0px', left: '0px'}} | ||
layers={[this._renderScatterplotLayer(this.props)]}/>} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why passing the props here? Juste get them from the method
Alternative implementation over ib comment
|
This is an initial pass at making use of deck.gl for a abstract vis rendering engine. This PR adds support for a new series type called MarkSeriesGL, what it's still missing is
Delighted to hear thoughts on this approach