-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
[explore-v2] make chart container work with existing visualization files #1333
Conversation
@@ -3,28 +3,63 @@ import { connect } from 'react-redux'; | |||
import { Panel } from 'react-bootstrap'; | |||
import TimeSeriesLineChart from './charts/TimeSeriesLineChart'; | |||
import moment from 'moment'; | |||
import nvd3Vis from '../../../visualizations/nvd3_vis'; |
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.
To generalize here you'll be able to import the object that maps the visualization type string to the object, it's in ../../../visualizations/nvd3_vis
return this.props.vizType === 'line'; | ||
renderVis() { | ||
const slice = this.getMockedSliceObject(); | ||
nvd3Vis(slice).render(); |
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.
then here use: vizMap[vizType](slice).render()
@mistercrunch added support to use the mapping from vis type to vis file. i removed some components I had duplicated in explorev2, and also removed the new line chart in favor of using the existing viz files. i added an issue documenting the outstanding issues with wrapping the vis's in V2 and will make another PR with fixes for those. #1341. PTAL! |
<ChartContainer />
use existing visualization js files to render charts.todo:
https://github.com/ascott/caravel/blob/master/caravel/assets/visualizations/main.js#L3
nvd3_vis
module---- added an issue documenting all the issues with wrapping vis's in V2. will come back for these in a follow up PR. [explore-v2] issues with wrapping existing viz's in V2 #1341
/exploreV2/ with line, bar, area, pie, bubble, box_plot
cc @mistercrunch @vera-liu