feat: Adds the ECharts Histogram chart (#28652)

This commit is contained in:
Michael S. Molina
2024-06-04 09:35:18 -03:00
committed by GitHub
parent bc9eab9902
commit 896fe854dc
30 changed files with 1061 additions and 34 deletions

View File

@@ -74,6 +74,7 @@ interface ColumnSelectPopoverProps {
label: string;
isTemporal?: boolean;
setDatasetModal?: Dispatch<SetStateAction<boolean>>;
disabledTabs?: Set<string>;
}
const getInitialColumnValues = (
@@ -102,6 +103,7 @@ const ColumnSelectPopover = ({
onClose,
setDatasetModal,
setLabel,
disabledTabs = new Set<'saved' | 'simple' | 'sqlExpression'>(),
}: ColumnSelectPopoverProps) => {
const datasourceType = useSelector<ExplorePageState, string | undefined>(
state => state.explore.datasource.type,
@@ -299,7 +301,11 @@ const ColumnSelectPopover = ({
width: ${width}px;
`}
>
<Tabs.TabPane key="saved" tab={t('Saved')}>
<Tabs.TabPane
key="saved"
tab={t('Saved')}
disabled={disabledTabs.has('saved')}
>
{calculatedColumns.length > 0 ? (
<FormItem label={savedExpressionsLabel}>
<StyledSelect
@@ -375,7 +381,11 @@ const ColumnSelectPopover = ({
/>
)}
</Tabs.TabPane>
<Tabs.TabPane key="simple" tab={t('Simple')}>
<Tabs.TabPane
key="simple"
tab={t('Simple')}
disabled={disabledTabs.has('simple')}
>
{isTemporal && simpleColumns.length === 0 ? (
<EmptyStateSmall
image="empty.svg"
@@ -419,7 +429,11 @@ const ColumnSelectPopover = ({
)}
</Tabs.TabPane>
<Tabs.TabPane key="sqlExpression" tab={t('Custom SQL')}>
<Tabs.TabPane
key="sqlExpression"
tab={t('Custom SQL')}
disabled={disabledTabs.has('sqlExpression')}
>
<SQLEditor
value={
adhocColumn?.sqlExpression ||