I'm try to develop progress bar chart for road construction using appscript. I have a tab for enter the form data.

And in this file have more tabs for multiple roads names.

This is what I am trying to do. After entering the data in the data entry form, colorize the cell range of the specified location in the relevant barchart. This is where I first tried to find out where to start coloring. The following code was used for that.But running the "for loop" in the "if statement". But it does not happen successfully.
var ss = SpreadsheetApp;
var sheet=ss.getActiveSpreadsheet().getSheetByName("AddData");
var actTabName = sheet.getRange("E1").getValue();
var catName = sheet.getRange("B4").getValue();
var start =sheet.getRange("B1").getValue();
var end = sheet.getRange("B2").getValue();
var side = sheet.getRange("B3").getValue();
function setBarChart() {
var markTab = ss.getActiveSpreadsheet().getSheetByName(actTabName);
var lstRw = markTab.getLastRow();
var lstCl = markTab.getLastColumn();
Logger.log(lstRw);
Logger.log(lstCl);
var catList = markTab.getRange(1,3,lstRw-2,1).getValues();
Logger.log(catList)
for(var i=0; i<catList.length; i++){
if(catList[i] == "Chainage"){
var chRNo = i+1;
var chList = markTab.getRange(chRNo,4,1,lstCl-3).getValues();
}
}
Logger.log("chRNo "+chRNo);
if(side == "LHS"){
for(var j=0; j<8; j++){
if(catList[i] == catName){
var catLhRNo = j+1;
Logger.log("catLhRNo = "+catLhRNo);
}
else{
Logger.log("test1");
}
}
}
if(side == "RHS"){
for (var k=8; k<11; k++){
if(catList[0][k] == catName){
var catRhRno = k+1;
Logger.log("catRhRno = "+catRhRno);
}else{
Logger.log("test2");
Logger.log(catList[7]);
}
}
}
}
