cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member
As a user sometimes I would like to change the format of one line to a dash line.
To apply the dash file enter the "Edit Script" within the widget editor and insert the script bellow.
Change in the 1st line of the code the "name of value" to the name you gave the formula you wish to change in the widget.

in our case var name = "Number of likes";
var name = "Name of Value";

widget.on("beforeviewloaded", function(w, args){
 
 for (var i = 0 ; i < args.options.series.length; i++){
 if (args.options.series[i].name === name){
 args.options.series[i].dashStyle = "dash"
 }
 }
 
});
To insert more than one variable:
For N variables, you'd need N variables and N for loops:
var series1 = "Total Revenue";
var series2 = "Total Quantity";
var seriesN = "Name of Nth series"

widget.on("beforeviewloaded", function(w, args){

for (var i = 0 ; i < args.options.series.length; i++){
if (args.options.series[i].name === series1){
args.options.series[i].dashStyle = "dash"
}
}

for (var i = 0 ; i < args.options.series.length; i++){
if (args.options.series[i].name === series2){
args.options.series[i].dashStyle = "dash"
}
}

....

for (var i = 0 ; i < args.options.series.length; i++){
if (args.options.series[i].name === seriesN){
args.options.series[i].dashStyle = "dash"
}
}


});

0
Comment actions
Version history
Last update:
‎03-02-2023 09:09 AM
Updated by:
Contributors
Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email [email protected]

Share this page: