Skip to content

Commit

Permalink
[frontend] fix (#6268)
Browse files Browse the repository at this point in the history
  • Loading branch information
Archidoit committed Mar 7, 2024
1 parent 651cf20 commit 1756cb8
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions opencti-platform/opencti-front/src/utils/Charts.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,20 +358,24 @@ export const horizontalBarsChartOptions = (
}
},
mouseMove: (event, chartContext, config) => {
if (
redirectionUtils
&& config.dataPointIndex >= 0
&& (
(config.seriesIndex >= 0
&& redirectionUtils[config.dataPointIndex].series?.[config.seriesIndex]?.entity_type
&& resolveLink(
redirectionUtils[config.dataPointIndex].series?.[config.seriesIndex]?.entity_type,
))
|| (
!config.seriesIndex >= 0
&& redirectionUtils[config.dataPointIndex].entity_type
&& resolveLink(redirectionUtils[config.dataPointIndex].entity_type)
))
if (redirectionUtils
&& (
(config.dataPointIndex >= 0 // case click on a bar
&& (
(config.seriesIndex >= 0
&& redirectionUtils[config.dataPointIndex].series?.[config.seriesIndex]?.entity_type
&& resolveLink(
redirectionUtils[config.dataPointIndex].series?.[config.seriesIndex]?.entity_type,
))
|| (
!config.seriesIndex >= 0
&& redirectionUtils[config.dataPointIndex].entity_type
&& resolveLink(redirectionUtils[config.dataPointIndex].entity_type)
)
)
)
|| event.target.parentNode.className.baseVal === 'apexcharts-text apexcharts-yaxis-label ' // case click on a label
)
) {
// for clickable parts of the graphs
// eslint-disable-next-line no-param-reassign
Expand Down

0 comments on commit 1756cb8

Please sign in to comment.