Scroll

Action Event: Selectively hide point labels

Action events can help give you some finer control over how your visualizations display. Attach this event to a chart to hide the point labels for a specified series.

Note: In this example, the client-side javascript is in separate file to improve readability.

Event Type: Load

Code

string actionString = File.ReadAllText(@"{filepath}\actionString.js");
sessionInfo.JavascriptAction.SetJsCode(actionString);
return sessionInfo.JavascriptAction;

actionString.js

/*
    Setting the showValues attribute to 0 hides the values
    of the specified series defined in your chart wizard. 

    To select the series for which you'd like to hide labels,
    modify the number between the brackets[] (...dataset[CHANGE_ME]).  

    As this value has a BASE OF ZERO, the 0th element corresponds to 
    the first series, the 1st element corresponds to the second, etc.
*/
clientInfo.chartData.dataset[1].showValues = 0;

Watch this video to see this event in "action"!


Hidden Article Information

Article Author
Exago Development
created 2017-05-23 14:11:54 UTC
updated 2017-06-19 19:47:32 UTC

Labels
visualization, chart, SAE, action, event, labels, points, SingleSeriesDisplayValues,
Have more questions? Submit a request