Update dependency @elastic/charts to v37 (master) (#113968)

This commit is contained in:
Marco Vettorello 2021-10-12 16:36:18 +02:00 committed by GitHub
parent d5d364724b
commit ff1b014c7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 205 additions and 143 deletions

View file

@ -20,6 +20,7 @@ import {
ScaleType,
Settings,
XYChartElementEvent,
XYBrushEvent,
} from '@elastic/charts';
import moment from 'moment';
import { useDataVisualizerKibana } from '../../../../kibana_context';
@ -91,7 +92,7 @@ export const DocumentCountChart: FC<Props> = ({
[data]
);
const onBrushEnd: BrushEndListener = ({ x }) => {
const onBrushEnd = ({ x }: XYBrushEvent) => {
if (!x) {
return;
}
@ -117,7 +118,11 @@ export const DocumentCountChart: FC<Props> = ({
height: 120,
}}
>
<Settings xDomain={xDomain} onBrushEnd={onBrushEnd} onElementClick={onElementClick} />
<Settings
xDomain={xDomain}
onBrushEnd={onBrushEnd as BrushEndListener}
onElementClick={onElementClick}
/>
<Axis
id="bottom"
position={Position.Bottom}