mirror of https://github.com/apache/superset.git
Merge 6b311f8f79
into f5843fe588
This commit is contained in:
commit
830ffe04e0
|
@ -22,9 +22,23 @@ import { allEventHandlers } from '../utils/eventHandlers';
|
|||
import { BoxPlotChartTransformedProps } from './types';
|
||||
|
||||
export default function EchartsBoxPlot(props: BoxPlotChartTransformedProps) {
|
||||
const { height, width, echartOptions, selectedValues, refs } = props;
|
||||
const { height, width, echartOptions, selectedValues, refs, formData } =
|
||||
props;
|
||||
|
||||
const eventHandlers = allEventHandlers(props);
|
||||
if (formData.showRangeFilter) {
|
||||
echartOptions.dataZoom = [
|
||||
{
|
||||
show: true,
|
||||
type: 'slider',
|
||||
left: '0rem', // Adjust the left position as needed
|
||||
yAxisIndex: [0],
|
||||
width: '20rem', // Adjust the width as needed
|
||||
filterMode: 'filter',
|
||||
labelFormatter: () => '', // Hide labels on the data zoom slider
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
return (
|
||||
<Echart
|
||||
|
|
|
@ -127,6 +127,23 @@ const config: ControlPanelConfig = {
|
|||
},
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
name: 'show_range_filter',
|
||||
config: {
|
||||
type: 'SelectControl',
|
||||
label: t('SHOW FILTER RANGE'),
|
||||
choices: [
|
||||
[true, t('Yes')],
|
||||
[false, t('No')],
|
||||
],
|
||||
default: false,
|
||||
clearable: false,
|
||||
renderTrigger: true,
|
||||
description: t('Range slider'),
|
||||
},
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
name: 'number_format',
|
||||
|
|
Loading…
Reference in New Issue