+
+ css`
+ margin-top: ${theme.gridUnit}px;
+ `
+ }
+ >
{' '}
{t('This visualization type is not supported.')}
@@ -76,9 +72,11 @@ const UnpaddedModal = styled(Modal)`
`;
/** Manages the viz type and the viz picker modal */
-const VizTypeControl = (props: VizTypeControlProps) => {
- const { value: initialValue, onChange, isModalOpenInit, labelType } = props;
- const { mountedPluginMetadata } = usePluginContext();
+const VizTypeControl = ({
+ value: initialValue,
+ onChange = noOp,
+ isModalOpenInit,
+}: VizTypeControlProps) => {
const [showModal, setShowModal] = useState(!!isModalOpenInit);
// a trick to force re-initialization of the gallery each time the modal opens,
// ensuring that the modal always opens to the correct category.
@@ -101,30 +99,32 @@ const VizTypeControl = (props: VizTypeControlProps) => {
setSelectedViz(initialValue);
}, [initialValue]);
- const labelContent = initialValue
- ? mountedPluginMetadata[initialValue]?.name || `${initialValue}`
- : t('Select Viz Type');
-
return (
-
-
-
+ css`
+ min-width: ${theme.gridUnit * 72}px;
+ max-width: fit-content;
+ `}
>
- <>
-
- {initialValue && }
- >
-
-
+
+ {initialValue && }
+
+
+ css`
+ display: flex;
+ justify-content: flex-end;
+ margin-top: ${theme.gridUnit * 3}px;
+ color: ${theme.colors.grayscale.base};
+ text-decoration: underline;
+ `
+ }
+ >
+
+ {t('View all charts')}
+
+
{
onChange={setSelectedViz}
/>
-
+ >
);
};
-VizTypeControl.propTypes = propTypes;
-VizTypeControl.defaultProps = defaultProps;
-
export default VizTypeControl;
diff --git a/superset-frontend/src/explore/controlPanels/sections.tsx b/superset-frontend/src/explore/controlPanels/sections.tsx
index be21747ed..78815215d 100644
--- a/superset-frontend/src/explore/controlPanels/sections.tsx
+++ b/superset-frontend/src/explore/controlPanels/sections.tsx
@@ -29,7 +29,7 @@ export const druidTimeSeries: ControlPanelSectionConfig = {
};
export const datasourceAndVizType: ControlPanelSectionConfig = {
- label: t('Chart type'),
+ label: t('Visualization type'),
expanded: true,
controlSetRows: [
['datasource'],