How to create a dash line in line chart

Comments

4 comments

  • Avatar
    Leon asd

    This is great for showing past year values. Is it possible to insert more than one variable? In our case we have about three variables which can be shown with past year comparison.

    Thanks

    0
    Comment actions Permalink
  • Avatar
    Kobbi Gal

    Hi Leon,

    Sure is possible.

    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 Permalink
  • Avatar
    Pradeep Rupakula

    Hi there,

    Is there a Dashboard script that would affect all the line charts in the Dashboard with the same variable name so that i can save time going into individual widgets and pasting the scripts.

    0
    Comment actions Permalink
  • Avatar
    Sherif El-Sabbahy

    Is it possible to modify the above to change Line Width Rather than Style?

    0
    Comment actions Permalink

Please sign in to leave a comment.