mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
[bugfix] BigNumber crash, Horizon indent and Myanmar geojson (#5746)
* fix myanmar geojson * fix indent of horizon in dashboard * Fix bignumber crash when color_picker is undefined
This commit is contained in:
parent
8d01c84c54
commit
0781cf2cfb
@ -231,14 +231,17 @@ BigNumberVis.defaultProps = defaultProps;
|
|||||||
function adaptor(slice, payload) {
|
function adaptor(slice, payload) {
|
||||||
const { formData, containerId } = slice;
|
const { formData, containerId } = slice;
|
||||||
const { data, subheader, compare_suffix: compareSuffix } = payload.data;
|
const { data, subheader, compare_suffix: compareSuffix } = payload.data;
|
||||||
const { r, g, b } = formData.color_picker;
|
|
||||||
const compareLag = Number(payload.data.compare_lag);
|
const compareLag = Number(payload.data.compare_lag);
|
||||||
const supportTrendline = formData.viz_type === 'big_number';
|
const supportTrendline = formData.viz_type === 'big_number';
|
||||||
const showTrendline = supportTrendline && formData.show_trend_line;
|
const showTrendline = supportTrendline && formData.show_trend_line;
|
||||||
const startYAxisAtZero = formData.start_y_axis_at_zero;
|
const startYAxisAtZero = formData.start_y_axis_at_zero;
|
||||||
const formatValue = d3FormatPreset(formData.y_axis_format);
|
const formatValue = d3FormatPreset(formData.y_axis_format);
|
||||||
const bigNumber = supportTrendline ? data[data.length - 1][1] : data[0][0];
|
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 percentChange = 0;
|
||||||
let formattedSubheader = subheader;
|
let formattedSubheader = subheader;
|
||||||
|
@ -9,9 +9,10 @@
|
|||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.horizon-row span {
|
.horizon-row span.title {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
color: #333;
|
color: #333;
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
|
margin: 0;
|
||||||
text-shadow: 1px 1px rgba(255, 255, 255, 0.75);
|
text-shadow: 1px 1px rgba(255, 255, 255, 0.75);
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user