Skip to content

Commit

Permalink
[bugfix] BigNumber crash, Horizon indent and Myanmar geojson (#5746)
Browse files Browse the repository at this point in the history
* fix myanmar geojson

* fix indent of horizon in dashboard

* Fix bignumber crash when color_picker is undefined
  • Loading branch information
kristw authored and hughhhh committed Aug 27, 2018
1 parent 8d01c84 commit 0781cf2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions superset/assets/src/visualizations/BigNumber.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,17 @@ BigNumberVis.defaultProps = defaultProps;
function adaptor(slice, payload) {
const { formData, containerId } = slice;
const { data, subheader, compare_suffix: compareSuffix } = payload.data;
const { r, g, b } = formData.color_picker;
const compareLag = Number(payload.data.compare_lag);
const supportTrendline = formData.viz_type === 'big_number';
const showTrendline = supportTrendline && formData.show_trend_line;
const startYAxisAtZero = formData.start_y_axis_at_zero;
const formatValue = d3FormatPreset(formData.y_axis_format);
const bigNumber = supportTrendline ? data[data.length - 1][1] : data[0][0];
const userColor = color.rgb(r, g, b).hex();
let userColor;
if (formData.color_picker) {
const { r, g, b } = formData.color_picker;
userColor = color.rgb(r, g, b).hex();
}

let percentChange = 0;
let formattedSubheader = subheader;
Expand Down
3 changes: 2 additions & 1 deletion superset/assets/src/visualizations/HorizonChart.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
margin: 0px;
}

.horizon-row span {
.horizon-row span.title {
position: absolute;
color: #333;
font-size: 0.8em;
margin: 0;
text-shadow: 1px 1px rgba(255, 255, 255, 0.75);
}
Loading

0 comments on commit 0781cf2

Please sign in to comment.