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:
+21
-28
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user