Getting useful information from $eventdata in UDChart onclick

You could use the label to look up your data in your set since it should be unique. The problem with including the whole object is currently, the client-side chart data does not include the entire object and would require some work to serialize the entire object down to the client. The problem with including an entire object is that you are potentially sending a ton of unnecessary data to the client without the user really understanding that it’s happening. The chart really only needs to know about the label and data properties.

In your on click, you could do something like:

$Item = $Data | Where-Object { $_.Timestamp -eq ([DateTime]$EventData.Label) } 
Invoke-UDRedirect -Url "/error/$($Item.Id)"
1 Like