mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
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:
parent
3496a80f5a
commit
7919428a1e
@ -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>
|
||||
|
@ -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')
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user