Vliu explorev2 bugs (#1701)

* Fixed table_name does not exist in druid

* Make Chart container scrollable for large chart

* Fixed bug of action buttons not clickable in heatmap

* Solve codeclimate issue

* Limit overflow to x
This commit is contained in:
vera-liu 2016-11-29 10:31:11 -08:00 committed by GitHub
parent 3496a80f5a
commit 7919428a1e
3 changed files with 9 additions and 5 deletions

View File

@ -204,6 +204,7 @@ class ChartContainer extends React.Component {
id={this.props.containerId}
ref={(ref) => { this.chartContainerRef = ref; }}
className={this.props.viz_type}
style={{ 'overflow-x': 'scroll' }}
/>)
}
</Panel>

View File

@ -12,9 +12,9 @@ function heatmapVis(slice) {
function refresh() {
// Header for panel in explore v2
const header = document.getElementById('slice-header');
const headerHeight = header ? header.getBoundingClientRect().height : 0;
const headerHeight = header ? 30 + header.getBoundingClientRect().height : 0;
const margin = {
top: 20 + headerHeight,
top: headerHeight,
right: 10,
bottom: 35,
left: 35,
@ -101,14 +101,14 @@ function heatmapVis(slice) {
.style('height', hmHeight + 'px')
.style('image-rendering', fd.canvas_image_rendering)
.style('left', margin.left + 'px')
.style('top', margin.top + 'px')
.style('top', margin.top + headerHeight + 'px')
.style('position', 'absolute');
const svg = container.append('svg')
.attr('width', width)
.attr('height', height)
.style('left', '0px')
.style('top', '0px')
.style('top', headerHeight + 'px')
.style('position', 'absolute');
const rect = svg.append('g')

View File

@ -1451,11 +1451,14 @@ class Superset(BaseSupersetView):
"user_id": g.user.get_id() if g.user else None,
"viz": json.loads(viz_obj.get_json())
}
table_name = viz_obj.datasource.table_name \
if datasource_type == 'table' \
else viz_obj.datasource.datasource_name
return self.render_template(
"superset/explorev2.html",
bootstrap_data=json.dumps(bootstrap_data),
slice=slc,
table_name=viz_obj.datasource.table_name)
table_name=table_name)
else:
return self.render_template(
"superset/explore.html",