feat(timeseries): remove stream style for bar charts (#37532)

This commit is contained in:
Luis Sánchez
2026-02-11 14:25:03 -03:00
committed by GitHub
parent 255a0ada81
commit 5f0001affc
4 changed files with 235 additions and 185 deletions

View File

@@ -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;