Skip to content

Commit

Permalink
Merge branch 'master' into gg-sqlLab-remember-selectedSchema
Browse files Browse the repository at this point in the history
  • Loading branch information
Grace Guo committed May 11, 2017
2 parents aa21b65 + 3208a01 commit 0b75b44
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions superset/assets/visualizations/nvd3_vis.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,11 @@ function nvd3Vis(slice, payload) {
.style('fill-opacity', 1);
}

if (chart.yAxis !== undefined) {
if (chart.yAxis !== undefined || chart.yAxis2 !== undefined) {
// Hack to adjust y axis left margin to accommodate long numbers
const marginPad = isExplore ? width * 0.01 : width * 0.03;
const maxYAxisLabelWidth = getMaxLabelSize(slice.container, 'nv-y');
const maxYAxisLabelWidth = chart.yAxis2 ? getMaxLabelSize(slice.container, 'nv-y1')
: getMaxLabelSize(slice.container, 'nv-y');
const maxXAxisLabelHeight = getMaxLabelSize(slice.container, 'nv-x');
chart.margin({ left: maxYAxisLabelWidth + marginPad });
if (fd.y_axis_label && fd.y_axis_label !== '') {
Expand Down

0 comments on commit 0b75b44

Please sign in to comment.