Splunk Dev

the event does not work in the Line component in the Splunk dashboard framework

vadychka
Observer

Hello Splunk Community,

I'm encountering a problem with the component from '@splunk/visualizations/Line' in my Splunk dashboard framework. I am trying to set up an event to be triggered when a user clicks on a point in the line chart. Despite using the 'point.click' event, it doesn't seem to work as expected.

Has anyone faced a similar issue or can anyone suggest what might be going wrong here? Any guidance or examples would be greatly appreciated.

Thanks in advance for your help!

 

Here is the relevant part of my code:

import React, { useEffect, useState} from 'react';
import Line from '@splunk/visualizations/Line';


const MemoryUtilizationLine = () => {


const handleEvent = (e)=>{
console.log(e)

}


return <div className=' m-2 pie-border-style'>


<Line


pointClick ={handleEvent}


options={{}}
dataSources={{
primary: {
requestParams: { offset: 0, count: 20 },
data: {
fields: [
{
name: '_time',
},
{
name: 'count',
type_special: 'count',
},
{
name: 'percent',
type_special: 'percent',
},
],
columns: [
[
'2018-05-02T18:10:46.000-07:00',
'2018-05-02T18:11:47.000-07:00',
'2018-05-02T18:12:48.000-07:00',
'2018-05-02T18:13:49.000-07:00',
'2018-05-02T18:15:50.000-07:00',
],
['600', '525', '295', '213', '122', '19'],
['87.966380', '50.381304', '60.023780', '121.183272', '70.250513', '90.194752'],
],
},
meta: { totalCount: 20 },
},
}}
/>
Labels (3)
0 Karma
Get Updates on the Splunk Community!

.conf25 Community Recap

Hello Splunkers, And just like that, .conf25 is in the books! What an incredible few days — full of learning, ...

Splunk App Developers | .conf25 Recap & What’s Next

If you stopped by the Builder Bar at .conf25 this year, thank you! The retro tech beer garden vibes were ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...