Version

VisualizationDataPointClicked Event

Event indicating data in a visualiation was clicked (might be a cell in a table or a column/bar in a chart).
Syntax
'Declaration
 
Public Event VisualizationDataPointClicked As EventHandler(Of VisualizationClickedEventArgs)
public event EventHandler<VisualizationClickedEventArgs> VisualizationDataPointClicked
Event Data

The event handler receives an argument of type VisualizationClickedEventArgs containing data related to this event. The following VisualizationClickedEventArgs properties provide information specific to this event.

PropertyDescription
Cell The clicked cell
Row The row containing the clicked cell, can be used to get the values of other cells in the same row, for example to get the CustomerId even if the cell clicked was "Sales Amount".
Visualization The visualization containing the clicked cell
Example
private void RevealView_VisualizationDataPointClicked(object sender, VisualizationClickedEventArgs e)
{
    var vizTitle = e.Visualization.Title;
    var column = e.Cell.ColumnName;
    var formattedValue = e.Cell.FormattedValue;
    var value = e.Cell.Value;
    foreach (var c in e.Row)
    {
        var cValue = c.Value;
        //TODO: use value from column c.ColumnName
    }
}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also