mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
feat(timeseries): remove stream style for bar charts (#37532)
This commit is contained in:
@@ -35,7 +35,7 @@ import {
|
||||
minorTicks,
|
||||
richTooltipSection,
|
||||
seriesOrderSection,
|
||||
showValueSection,
|
||||
showValueSectionWithoutStream,
|
||||
truncateXAxis,
|
||||
xAxisBounds,
|
||||
xAxisLabelRotation,
|
||||
@@ -327,7 +327,7 @@ const config: ControlPanelConfig = {
|
||||
...seriesOrderSection,
|
||||
['color_scheme'],
|
||||
['time_shift_color'],
|
||||
...showValueSection,
|
||||
...showValueSectionWithoutStream,
|
||||
[
|
||||
{
|
||||
name: 'stackDimension',
|
||||
@@ -375,11 +375,18 @@ const config: ControlPanelConfig = {
|
||||
],
|
||||
},
|
||||
],
|
||||
formDataOverrides: formData => ({
|
||||
...formData,
|
||||
metrics: getStandardizedControls().popAllMetrics(),
|
||||
groupby: getStandardizedControls().popAllColumns(),
|
||||
}),
|
||||
formDataOverrides: formData => {
|
||||
// Reset stack to null if it's Stream when switching to Bar chart
|
||||
const formDataWithStack = formData as Record<string, unknown>;
|
||||
return {
|
||||
...formData,
|
||||
metrics: getStandardizedControls().popAllMetrics(),
|
||||
groupby: getStandardizedControls().popAllColumns(),
|
||||
...(formDataWithStack.stack === StackControlsValue.Stream && {
|
||||
stack: null,
|
||||
}),
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
||||
Reference in New Issue
Block a user