Removing Value Labels And Markers From A Specific Series
When toggling the "value labels" switch of a widget's design pane, the labels are enabled or disabled for the entire chart.

In case you have multiple series and you want to disable just one of them (typical when it gets too crowded on the plot), it is possible to do by adding the following code to the widget's script:
/******* user configuration **********/
var seriesName = "MySeries";
/*************************************/
widget.on('processresult', function(sender, ev){
var data = _.find(ev.result.series, function (ser) {return ser.name == seriesName}).data
_.each(data, function(value){
value.dataLabels = {enabled:false}
})
})
Just replace the series name with the desired measure you want to remove the labels from.
For hiding the value labels of multiple series, use the following script:
/******* user configuration **********/
var seriesNames = ["MySeries1", "MySeries2"];
/*************************************/
widget.on('processresult', function(sender, ev){
seriesNames.forEach(function(e, i, a){
var data = _.find(ev.result.series, function (ser) {return ser.name == e}).data
_.each(data, function(value){
value.dataLabels = {enabled:false}
})
})
})
BREAK-BY
In case your measure is "Broken By" some field, each series name will be as the specific value of that field. See this example, where only the "orange" labels are shown:
We enabled 'value labels' and configured in the script:
var seriesName = "apple";
The result:

If you are using Markers signs which you would like to remove you can use the following script:
widget.on("beforeviewloaded",function(w,args){
var seriesToRemoveMarkerFrom = ["seriesName"];
var seriesWithoutMarkers = _.filter(args.options.series,function(ser){
return (seriesToRemoveMarkerFrom.indexOf(ser.name) > -1);
})
if(seriesWithoutMarkers.length > 0){
seriesWithoutMarkers.forEach(function(s){
s.marker = {enabled : false};
})
}

Enjoy!
Updated 03-02-2023
intapiuser
Admin
Joined December 15, 2022