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

@@ -31,7 +31,7 @@ import {
useComponentDidMount,
usePrevious,
} from '@superset-ui/core';
import { debounce, omit, pick } from 'lodash';
import { debounce, isEqual, isObjectLike, omit, pick } from 'lodash';
import { Resizable } from 're-resizable';
import { usePluginContext } from 'src/components/DynamicPlugins';
import { Global } from '@emotion/react';
@@ -460,15 +460,21 @@ function ExploreViewContainer(props) {
const chartIsStale = useMemo(() => {
if (lastQueriedControls) {
const changedControlKeys = Object.keys(props.controls).filter(
key =>
typeof lastQueriedControls[key] !== 'undefined' &&
!areObjectsEqual(
props.controls[key].value,
lastQueriedControls[key].value,
{ ignoreFields: ['datasourceWarning'] },
),
);
const { controls } = props;
const changedControlKeys = Object.keys(controls).filter(key => {
const lastControl = lastQueriedControls[key];
if (typeof lastControl === 'undefined') {
return false;
}
const { value: value1 } = controls[key];
const { value: value2 } = lastControl;
if (isObjectLike(value1) && isObjectLike(value2)) {
return !areObjectsEqual(value1, value2, {
ignoreFields: ['datasourceWarning'],
});
}
return !isEqual(value1, value2);
});
return changedControlKeys.some(
key =>