Update dependency @elastic/charts to v46.9.0 (main) (#133705)

* Update dependency @elastic/charts to v46.9.0

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Marco Vettorello <marco.vettorello@elastic.co>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
This commit is contained in:
renovate[bot] 2022-06-08 18:27:38 +02:00 committed by GitHub
parent a580b1e961
commit 9aba345020
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 18 deletions

View file

@ -106,7 +106,7 @@
"@elastic/apm-rum": "^5.11.1",
"@elastic/apm-rum-react": "^1.4.1",
"@elastic/apm-synthtrace": "link:bazel-bin/packages/elastic-apm-synthtrace",
"@elastic/charts": "46.0.1",
"@elastic/charts": "46.9.0",
"@elastic/datemath": "5.0.3",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.2.0-canary.2",
"@elastic/ems-client": "8.3.3",

View file

@ -18,6 +18,7 @@ import {
TooltipProps,
TooltipType,
SeriesIdentifier,
PartitionElementEvent,
} from '@elastic/charts';
import { useEuiTheme } from '@elastic/eui';
import type { PaletteRegistry } from '@kbn/coloring';
@ -397,9 +398,11 @@ const PartitionVisComponent = (props: PartitionVisComponentProps) => {
flatLegend={flatLegend}
tooltip={tooltip}
showLegendExtra={visParams.showValuesInLegend}
onElementClick={(args) => {
onElementClick={([elementEvent]) => {
// this cast is safe because we are rendering a partition chart
const [layerValues] = elementEvent as PartitionElementEvent;
handleSliceClick(
args[0][0] as LayerValue[],
layerValues,
bucketColumns,
visData,
splitChartDimension,

View file

@ -12,8 +12,6 @@ import {
Settings,
Axis,
Position,
GeometryValue,
XYChartSeriesIdentifier,
VerticalAlignment,
HorizontalAlignment,
LayoutDirection,
@ -27,6 +25,7 @@ import {
TooltipType,
Placement,
Direction,
XYChartElementEvent,
} from '@elastic/charts';
import { IconType } from '@elastic/eui';
import { PaletteRegistry } from '@kbn/coloring';
@ -406,10 +405,9 @@ export function XYChart({
valueLabels !== ValueLabelModes.HIDE &&
getValueLabelsStyling(shouldRotate);
const clickHandler: ElementClickListener = ([[geometry, series]]) => {
// for xyChart series is always XYChartSeriesIdentifier and geometry is always type of GeometryValue
const xySeries = series as XYChartSeriesIdentifier;
const xyGeometry = geometry as GeometryValue;
const clickHandler: ElementClickListener = ([elementEvent]) => {
// this cast is safe because we are rendering a cartesian chart
const [xyGeometry, xySeries] = elementEvent as XYChartElementEvent;
const layerIndex = dataLayers.findIndex((l) =>
xySeries.seriesKeys.some((key: string | number) =>

View file

@ -19,9 +19,9 @@ import {
TooltipValue,
niceTimeFormatter,
ElementClickListener,
GeometryValue,
RectAnnotation,
RectAnnotationDatum,
XYChartElementEvent,
} from '@elastic/charts';
import { EuiFlexItem } from '@elastic/eui';
import { EuiFlexGroup } from '@elastic/eui';
@ -138,10 +138,11 @@ export const Timeline: React.FC<Props> = ({ interval, yAxisFormatter, isVisible
: { max: 0, min: 0 };
const onClickPoint: ElementClickListener = useCallback(
([[geometryValue]]) => {
if (!Array.isArray(geometryValue)) {
// casting to GeometryValue as we are using cartesian charts
const { x: timestamp } = geometryValue as GeometryValue;
([elementEvent]) => {
// casting to GeometryValue as we are using cartesian charts
const [geometryValue] = elementEvent as XYChartElementEvent;
if (geometryValue && !Array.isArray(geometryValue)) {
const { x: timestamp } = geometryValue;
jumpToTime(timestamp);
stopAutoReload();
}

View file

@ -1429,12 +1429,13 @@
dependencies:
object-hash "^1.3.0"
"@elastic/charts@46.0.1":
version "46.0.1"
resolved "https://registry.yarnpkg.com/@elastic/charts/-/charts-46.0.1.tgz#2d3bd3de9e4f294ddd9d9969dca1dc1ed5c6f278"
integrity sha512-CWiyEHaxEk9zKOPOm4ISyAluXSxu6pqLdG+ARBu4jQx0t1ROe93vssICHq6JIrQdiMHn44pleQnWZzKzanZtDw==
"@elastic/charts@46.9.0":
version "46.9.0"
resolved "https://registry.yarnpkg.com/@elastic/charts/-/charts-46.9.0.tgz#45a615eb84c81d8cc5219eaa4eef8f4761c9fc05"
integrity sha512-RVDNgg9bZIZoq/8sfRg6n9gXHPzs4n8bAJogxnzv73f4sLcdytGqjNbdDpbDO2MPRKnA7nN92/L0Ewkp7SiU0Q==
dependencies:
"@popperjs/core" "^2.4.0"
bezier-easing "^2.1.0"
chroma-js "^2.1.0"
classnames "^2.2.6"
d3-array "^1.2.4"
@ -9466,6 +9467,11 @@ better-opn@^2.1.1:
dependencies:
open "^7.0.3"
bezier-easing@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/bezier-easing/-/bezier-easing-2.1.0.tgz#c04dfe8b926d6ecaca1813d69ff179b7c2025d86"
integrity sha512-gbIqZ/eslnUFC1tjEvtz0sgx+xTK20wDnYMIA27VA04R7w6xxXQPZDbibjA9DTWZRA2CXtwHykkVzlCaAJAZig==
big-integer@^1.6.16:
version "1.6.48"
resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.48.tgz#8fd88bd1632cba4a1c8c3e3d7159f08bb95b4b9e"