How to get Z value of chart3D in lightningchart on mouseClick?

44 Views Asked by At

I have created a Chart3D plot, and I am looking for a way to obtain the z-value of the plot when a mouse click occurs.

  1. This is the 3D chart I created.
...
const chart3D = dashboard
      .createChart3D({...})
...
const surfaceSeries3D = chart3D
      .addSurfaceScrollingGridSeries({ ...})

enter image description here

  1. Here is my mouse click event listener. The event parameter only provides the x and y values on the client side, but there is no way to obtain the z value.
const clickListener = surfaceSeries3D.onMouseClick((_, event) => {
     console.log(event);
     const location = chart3D.translateCoordinate(event, chart3D.coordsRelative)
     console.log('locationAxis3D', location)
})

enter image description here

I tried the click event of the Chart3D, but it only returns the x and y values, making it impossible to obtain the values on the z-axis of the chart. My goal is to obtain the z-value of the highest yellow shape in the chart upon a click event.

1

There are 1 best solutions below

0
On

There is currently no method of finding which data point is interacted on in 3D charts.

This feature is however in active development and will be introduced in the next version release most likely. This would mean February 2024.

If you are a commercial user, then private beta access might be arrangeable ahead of time. https://lightningchart.com/js-charts/docs/contact/