Forum Discussion

Silutions's avatar
01-09-2022
Solved

Set Opacity of columns in a column chart

Anyone have a script to do this?

I've tried the script below but it does not function for series0 on my widget:

widget.on("beforeviewloaded", function(w, args){
args.options.series[0].fillOpacity: 0.5
}
);
 
I've also tried just "opacity" without success.  Works on the HightCharts demo, but not in Sisense.
Grateful for any assistance., Jim
  • Silutions Here is an alternate way to set opacity of column/bar chart

     

    widget.on('ready', function(se,ev){
    	
     opacity = '0.3'
    
     $('.highcharts-series-group .highcharts-series', element).css('fill-opacity', opacity) //change opacity of bars
     $('.highcharts-legend .highcharts-legend-item', element).css('fill-opacity', opacity) //change opacity of legend
    
    });

     

     

  • Silutions's avatar
    Silutions
    01-10-2022

    harikm007,

    Works like a champ.  Thanks so much.

    Regards, Jim

6 Replies

Replies have been turned off for this discussion
  • harikm007's avatar
    harikm007
    Data Warehouse

    Silutions Here is an alternate way to set opacity of column/bar chart

     

    widget.on('ready', function(se,ev){
    	
     opacity = '0.3'
    
     $('.highcharts-series-group .highcharts-series', element).css('fill-opacity', opacity) //change opacity of bars
     $('.highcharts-legend .highcharts-legend-item', element).css('fill-opacity', opacity) //change opacity of legend
    
    });

     

     

    • Silutions's avatar
      Silutions
      ETL

      harikm007,

      Works like a champ.  Thanks so much.

      Regards, Jim

      • harikm007's avatar
        harikm007
        Data Warehouse

        cartercjb ,

        Please try this updated script

        widget.on('ready', function(se,ev){
        	
         opacity = '0.3'
        
         $('.highcharts-series-group .highcharts-series rect', element).css('fill-opacity', opacity) //change opacity of bars
         $('.highcharts-legend .highcharts-legend-item rect', element).css('fill-opacity', opacity) //change opacity of legend
        
        });

        -Hari