Showing results for 
Search instead for 
Did you mean: 
Community Team Member
Community Team Member
Use this script to add a range area or a range bar to a line chart. e.g. When plotting the metric you can superimpose it over a range area.
Create a line chart, add the 2  fields which comprise the lower and upper limits of the range followed by the field which is to be plotted at a line.

Area Range
Column Range
Copy / Paste the following script in the script area of the chart. Edit the first line to choose the range type columnrange or arearange
//set the range type columnrange , arearange
var rangeType = 'columnrange'; 

widget.on('processresult', function(w, args) {
 var chartS = args.result.series;
 var ch = args.result.chart;
 var smin = chartS[0];
 var smax = chartS[1];

 //set the min max ranges
 var ranges = [];
 for(var d = 0; d <; d++) {
 // create a new range series
 var rangeSeries = $$.object.clone(smin, true); = ranges;
 rangeSeries.type = rangeType,
 rangeSeries.zIndex = -100;
 rangeSeries.pointWidth = 30; = 'Range';
 rangeSeries.marker = {};
 rangeSeries.marker.enabled = false;

 //remove the first 2 individual series for min max
 chartS.splice(0, 2);
 //add the range series

Version history
Last update:
‎03-02-2023 09:22 AM
Updated by:
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: