Release line chart and pie chart (#16166)

- Remove the feature flag for these two charts.
- Reorder the charts
- Hide gauge chart
This commit is contained in:
Raphaël Bosi
2025-11-28 11:17:03 +01:00
committed by GitHub
parent eb362c6d5f
commit 9bc58a4ef9
3 changed files with 45 additions and 54 deletions
@@ -9,9 +9,9 @@ import { MenuPicker } from 'twenty-ui/navigation';
const graphTypeOptions = [
GraphType.VERTICAL_BAR,
GraphType.HORIZONTAL_BAR,
GraphType.AGGREGATE,
GraphType.PIE,
GraphType.LINE,
GraphType.PIE,
GraphType.AGGREGATE,
GraphType.GAUGE,
];
@@ -36,32 +36,25 @@ export const ChartTypeSelectionSection = ({
return (
<StyledChartTypeSelectionContainer>
{graphTypeOptions.map((graphType) => {
const isChartV2Type = [
GraphType.PIE,
GraphType.LINE,
GraphType.GAUGE,
].includes(graphType);
const isDisabled = isChartV2Type && !isDashboardV2Enabled;
return (
<MenuPicker
id={graphType}
selected={currentGraphType === graphType}
key={graphType}
icon={GRAPH_TYPE_INFORMATION[graphType].icon}
onClick={() => {
setCurrentGraphType(graphType);
}}
showLabel
disabled={isDisabled}
tooltipContent={
isDisabled ? t`Soon` : t(GRAPH_TYPE_INFORMATION[graphType].label)
}
/>
);
})}
{graphTypeOptions
.filter(
(graphType) => isDashboardV2Enabled || graphType !== GraphType.GAUGE,
)
.map((graphType) => {
return (
<MenuPicker
id={graphType}
selected={currentGraphType === graphType}
key={graphType}
icon={GRAPH_TYPE_INFORMATION[graphType].icon}
onClick={() => {
setCurrentGraphType(graphType);
}}
showLabel
tooltipContent={t(GRAPH_TYPE_INFORMATION[graphType].label)}
/>
);
})}
</StyledChartTypeSelectionContainer>
);
};