You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/09/12 06:15:51 UTC
[GitHub] kristw closed pull request #5867: [bugfix] Fix slice width
calculation in dashboard
kristw closed pull request #5867: [bugfix] Fix slice width calculation in dashboard
URL: https://github.com/apache/incubator-superset/pull/5867
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/superset/assets/src/dashboard/components/gridComponents/ChartHolder.jsx b/superset/assets/src/dashboard/components/gridComponents/ChartHolder.jsx
index 0598635c35..366d3fede8 100644
--- a/superset/assets/src/dashboard/components/gridComponents/ChartHolder.jsx
+++ b/superset/assets/src/dashboard/components/gridComponents/ChartHolder.jsx
@@ -12,6 +12,7 @@ import {
GRID_MIN_COLUMN_COUNT,
GRID_MIN_ROW_UNITS,
GRID_BASE_UNIT,
+ GRID_GUTTER_SIZE,
} from '../../util/constants';
const CHART_MARGIN = 32;
@@ -131,8 +132,14 @@ class ChartHolder extends React.Component {
>
<Chart
id={component.meta.chartId}
- width={widthMultiple * columnWidth - CHART_MARGIN / 2}
- height={component.meta.height * GRID_BASE_UNIT - CHART_MARGIN}
+ width={Math.floor(
+ widthMultiple * columnWidth +
+ (widthMultiple - 1) * GRID_GUTTER_SIZE -
+ CHART_MARGIN,
+ )}
+ height={Math.floor(
+ component.meta.height * GRID_BASE_UNIT - CHART_MARGIN,
+ )}
sliceName={component.meta.sliceName || ''}
updateSliceName={this.handleUpdateSliceName}
/>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org