mirror of
https://github.com/apache/superset.git
synced 2026-04-17 07:05:04 +00:00
fix: Drill to detail blocked by tooltip (#22082)
Co-authored-by: Ville Brofeldt <ville.brofeldt@apple.com>
This commit is contained in:
committed by
GitHub
parent
1809d2b957
commit
3bc0865d90
@@ -31,6 +31,7 @@ export default function EchartsBoxPlot(props: BoxPlotChartTransformedProps) {
|
||||
groupby,
|
||||
selectedValues,
|
||||
formData,
|
||||
refs,
|
||||
} = props;
|
||||
const handleChange = useCallback(
|
||||
(values: string[]) => {
|
||||
@@ -72,6 +73,7 @@ export default function EchartsBoxPlot(props: BoxPlotChartTransformedProps) {
|
||||
|
||||
return (
|
||||
<Echart
|
||||
refs={refs}
|
||||
height={height}
|
||||
width={width}
|
||||
echartOptions={echartOptions}
|
||||
|
||||
@@ -36,9 +36,11 @@ import {
|
||||
sanitizeHtml,
|
||||
} from '../utils/series';
|
||||
import { convertInteger } from '../utils/convertInteger';
|
||||
import { defaultGrid, defaultTooltip, defaultYAxis } from '../defaults';
|
||||
import { defaultGrid, defaultYAxis } from '../defaults';
|
||||
import { getPadding } from '../Timeseries/transformers';
|
||||
import { OpacityEnum } from '../constants';
|
||||
import { getDefaultPosition } from '../utils/tooltip';
|
||||
import { Refs } from '../types';
|
||||
|
||||
export default function transformProps(
|
||||
chartProps: EchartsBoxPlotChartProps,
|
||||
@@ -71,6 +73,7 @@ export default function transformProps(
|
||||
yAxisTitlePosition,
|
||||
sliceId,
|
||||
} = formData as BoxPlotQueryFormData;
|
||||
const refs: Refs = {};
|
||||
const colorFn = CategoricalColorNamespace.getScale(colorScheme as string);
|
||||
const numberFormatter = getNumberFormatter(numberFormat);
|
||||
const metricLabels = metrics.map(getMetricLabel);
|
||||
@@ -270,7 +273,7 @@ export default function transformProps(
|
||||
nameLocation: yAxisTitlePosition === 'Left' ? 'middle' : 'end',
|
||||
},
|
||||
tooltip: {
|
||||
...defaultTooltip,
|
||||
position: getDefaultPosition(refs),
|
||||
show: !inContextMenu,
|
||||
trigger: 'item',
|
||||
axisPointer: {
|
||||
@@ -291,5 +294,6 @@ export default function transformProps(
|
||||
groupby,
|
||||
selectedValues,
|
||||
onContextMenu,
|
||||
refs,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -16,12 +16,14 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { QueryFormData } from '@superset-ui/core';
|
||||
import {
|
||||
ChartDataResponseResult,
|
||||
ChartProps,
|
||||
QueryFormData,
|
||||
} from '@superset-ui/core';
|
||||
import { EchartsTitleFormData, EChartTransformedProps } from '../types';
|
||||
BaseChartProps,
|
||||
BaseTransformedProps,
|
||||
ContextMenuTransformedProps,
|
||||
CrossFilterTransformedProps,
|
||||
TitleFormData,
|
||||
} from '../types';
|
||||
import { DEFAULT_TITLE_FORM_DATA } from '../constants';
|
||||
|
||||
export type BoxPlotQueryFormData = QueryFormData & {
|
||||
@@ -29,7 +31,7 @@ export type BoxPlotQueryFormData = QueryFormData & {
|
||||
whiskerOptions?: BoxPlotFormDataWhiskerOptions;
|
||||
xTickLayout?: BoxPlotFormXTickLayout;
|
||||
emitFilter: boolean;
|
||||
} & EchartsTitleFormData;
|
||||
} & TitleFormData;
|
||||
|
||||
export type BoxPlotFormDataWhiskerOptions =
|
||||
| 'Tukey'
|
||||
@@ -51,10 +53,11 @@ export const DEFAULT_FORM_DATA: BoxPlotQueryFormData = {
|
||||
};
|
||||
|
||||
export interface EchartsBoxPlotChartProps
|
||||
extends ChartProps<BoxPlotQueryFormData> {
|
||||
extends BaseChartProps<BoxPlotQueryFormData> {
|
||||
formData: BoxPlotQueryFormData;
|
||||
queriesData: ChartDataResponseResult[];
|
||||
}
|
||||
|
||||
export type BoxPlotChartTransformedProps =
|
||||
EChartTransformedProps<BoxPlotQueryFormData>;
|
||||
BaseTransformedProps<BoxPlotQueryFormData> &
|
||||
CrossFilterTransformedProps &
|
||||
ContextMenuTransformedProps;
|
||||
|
||||
Reference in New Issue
Block a user