"+PeriodName+" | "; if (GlobalSheetDataTemp != undefined && GlobalSheetDataTemp != null) { //if (AllPeriodMaxCntListForCharts != undefined && AllPeriodMaxCntListForCharts.length > 0) { // var sheet = AllPeriodMaxCntListForCharts[0].YMaxPeriodcnt.split("|")[1];; //} else { // var sheet = AllPeriodMaxCntListForCharts[0].YMaxPeriodcnt.split("|")[1];; //} for (var v = 0; v < GlobalSheetDataTemp.Period[sheetCode].length; v++) { if (GlobalSheetDataTemp.Period[sheetCode][v].PeriodID > 0) { PeriodNameList.push(GlobalSheetDataTemp.Period[sheetCode][v].PeriodName); PeriodNameWithPeriodIdList.push(sheetCode + "_" + GlobalSheetDataTemp.Period[sheetCode][v].PeriodID + "_" + true); GlobalPeriodNameWithPeriodIdList.push(sheetCode + "_" + GlobalSheetDataTemp.Period[sheetCode][v].PeriodID + "_" + true); } } } for (var p = 0; p < PeriodNameList.length; p++) { Perioditems = Perioditems + ""; } //$("#drpPeriodTypeStart").html(""); //$("#drpPeriodTypeStart").append(Perioditems); //start = GlobalSheetDataTemp.Period[sheetCode][0].PeriodID; //end = GlobalSheetDataTemp.Period[sheetCode][PeriodNameList.length - 1].PeriodID; //$("#drpPeriodTypeStart").val(start); //$("#drpPeriodTypeEnd").html(""); //$("#drpPeriodTypeEnd").append(Perioditems); //$("#drpPeriodTypeEnd").val(end); } else if (PeriodNameList.length != 0 && PeriodNameWithPeriodIdList.length != 0 && GlobalPeriodNameWithPeriodIdList.length != 0 && PeriodMode == "Q") { PeriodNameList = []; PeriodNameWithPeriodIdList = []; GlobalPeriodNameWithPeriodIdList = []; Perioditems = ""; //var str = "
"+PeriodName+" | "; if (GlobalSheetDataTemp != undefined && GlobalSheetDataTemp != null) { for (var v = 0; v < GlobalSheetDataTemp.Period[sheetCode].length; v++) { if (GlobalSheetDataTemp.Period[sheetCode][v].PeriodID>0) { PeriodNameList.push(GlobalSheetDataTemp.Period[sheetCode][v].PeriodName); PeriodNameWithPeriodIdList.push(sheetCode + "_" + GlobalSheetDataTemp.Period[sheetCode][v].PeriodID + "_" + true); GlobalPeriodNameWithPeriodIdList.push(sheetCode + "_" + GlobalSheetDataTemp.Period[sheetCode][v].PeriodID + "_" + true); } } } for (var p = 0; p < PeriodNameList.length; p++) { Perioditems = Perioditems + ""; } if (AllPeriodMaxCntList != undefined && AllPeriodMaxCntList.length > 0 && PeriodNameList[0].indexOf("Q") == 0) { MaxPeriodCntSheet = AllPeriodMaxCntList[0].QMaxPeriodcnt.split("|")[1]; } SelectedStartPeriodIdx = GlobalSheetDataTemp.Period[MaxPeriodCntSheet][0].PeriodID; SelectedEndPeriodIdx = GlobalSheetDataTemp.Period[MaxPeriodCntSheet][GlobalSheetDataTemp.Period[MaxPeriodCntSheet].length - 1].PeriodID; AllPeriodNmList = [] if (GlobalSheetDataTemp != undefined && GlobalSheetDataTemp != null) { for (var v = SelectedStartPeriodIdx; v <= SelectedEndPeriodIdx; v++) { for (var w = 0; w < GlobalSheetDataTemp.Period[MaxPeriodCntSheet].length; w++) { if (GlobalSheetDataTemp.Period[MaxPeriodCntSheet][w].PeriodID == v) { // PeriodNameList.push(GlobalSheetDataTemp.Period[MaxPeriodCntSheet][w].PeriodName); //FilteredElementList.push(MaxPeriodCntSheet + "_" + v + "_" + true); AllPeriodNmList.push(GlobalSheetDataTemp.Period[MaxPeriodCntSheet][w].PeriodName); break; } } } } //$("#drpPeriodTypeStart").html(""); //$("#drpPeriodTypeStart").append(Perioditems); //if (SelectedMinQvalue != undefined) { // start = SelectedMinQvalue; //} else { // start = GlobalSheetDataTemp.Period[sheetCode][0].PeriodID; //} //if (SelectedMaxQvalue != undefined) { // end = SelectedMaxQvalue; //} else { // end = GlobalSheetDataTemp.Period[sheetCode][PeriodNameList.length - 1].PeriodID; //} //$("#drpPeriodTypeStart").val(start); //$("#drpPeriodTypeEnd").html(""); //$("#drpPeriodTypeEnd").append(Perioditems); //$("#drpPeriodTypeEnd").val(end); } else if (PeriodNameList.length != 0 && PeriodNameWithPeriodIdList.length != 0 && GlobalPeriodNameWithPeriodIdList.length != 0 && (PeriodMode == "QYTD" || PeriodMode == "YTD")) { PeriodNameList = []; PeriodNameWithPeriodIdList = []; GlobalPeriodNameWithPeriodIdList = []; Perioditems = ""; //var str = "
"+PeriodName+" | "; if (GlobalSheetDataTemp != undefined && GlobalSheetDataTemp != null) { for (var v = 0; v < GlobalSheetDataTemp.Period[sheetCode].length; v++) { if (GlobalSheetDataTemp.Period[sheetCode][v].PeriodID > 0) { PeriodNameList.push(GlobalSheetDataTemp.Period[sheetCode][v].PeriodName); PeriodNameWithPeriodIdList.push(sheetCode + "_" + GlobalSheetDataTemp.Period[sheetCode][v].PeriodID + "_" + true); GlobalPeriodNameWithPeriodIdList.push(sheetCode + "_" + GlobalSheetDataTemp.Period[sheetCode][v].PeriodID + "_" + true); } } } for (var p = 0; p < PeriodNameList.length; p++) { Perioditems = Perioditems + ""; } //$("#drpPeriodTypeStart").html(""); //$("#drpPeriodTypeStart").append(Perioditems); //if (SelectedMinQYTDvalue != undefined) { // start = SelectedMinQYTDvalue; //} else { // start = GlobalSheetDataTemp.Period[sheetCode][0].PeriodID; //} //if (SelectedMaxQYTDvalue != undefined) { // end = SelectedMaxQYTDvalue; //} else { // end = GlobalSheetDataTemp.Period[sheetCode][PeriodNameList.length - 1].PeriodID; //} //$("#drpPeriodTypeStart").val(start); //$("#drpPeriodTypeEnd").html(""); //$("#drpPeriodTypeEnd").append(Perioditems); //$("#drpPeriodTypeEnd").val(end); } else if (PeriodNameList.length != 0 && PeriodNameWithPeriodIdList.length != 0 && GlobalPeriodNameWithPeriodIdList.length != 0 && PeriodMode == "Y") { PeriodNameList = []; PeriodNameWithPeriodIdList = []; GlobalPeriodNameWithPeriodIdList = []; Perioditems = ""; //var str = "
"+PeriodName+" | "; if (GlobalSheetDataTemp != undefined && GlobalSheetDataTemp != null) { for (var v = 0; v < GlobalSheetDataTemp.Period[sheetCode].length; v++) { if (GlobalSheetDataTemp.Period[sheetCode][v].PeriodID > 0) { PeriodNameList.push(GlobalSheetDataTemp.Period[sheetCode][v].PeriodName); PeriodNameWithPeriodIdList.push(sheetCode + "_" + GlobalSheetDataTemp.Period[sheetCode][v].PeriodID + "_" + true); GlobalPeriodNameWithPeriodIdList.push(sheetCode + "_" + GlobalSheetDataTemp.Period[sheetCode][v].PeriodID + "_" + true); } } } for (var p = 0; p < PeriodNameList.length; p++) { Perioditems = Perioditems + ""; } //$("#drpPeriodTypeStart").html(""); //$("#drpPeriodTypeStart").append(Perioditems); //if (SelectedMinYvalue != undefined) { // start = SelectedMinYvalue; //} else { // start = GlobalSheetDataTemp.Period[sheetCode][0].PeriodID; //} //if (SelectedMaxYvalue != undefined) { // end = SelectedMaxYvalue; //} else { // end = GlobalSheetDataTemp.Period[sheetCode][PeriodNameList.length - 1].PeriodID; //} //$("#drpPeriodTypeStart").val(start); //$("#drpPeriodTypeEnd").html(""); //$("#drpPeriodTypeEnd").append(Perioditems); //$("#drpPeriodTypeEnd").val(end); } //var len = GlobalSheetDataTemp.Content.SheetDetailsData.length; //var Formid = GlobalSheetDataTemp.Content.SheetDetailsData[i].Value[0].FormID; //var PeriodMode = GlobalSheetDataTemp.Content.SheetDetailsData[i].Value[0].PeriodMode; //for (var i = 0; i < len; i++) { // var Formid = GlobalSheetDataTemp.Content.SheetDetailsData[i].Value[0].FormID; // var PeriodMode = GlobalSheetDataTemp.Content.SheetDetailsData[i].Value[0].PeriodMode; // if (Formid == SheetFormID && PeriodMode == SheetPeriodMode) { // selectedSheetData = GlobalSheetDataTemp.Content.SheetDetailsData[i].Value; // sheetDataTemp = GlobalSheetDataTemp.Content.SheetDetailsData[i].Value[0].RawMatrix[0]; // var selectedSheet = eval(sheetDataTemp); // break; // //var sheetDataTemp = GlobalSheetDataTemp.Content.SheetDetailsData[6].Value[0].RawMatrix[0]; // } //} //if (SelectedMode == "Quarterly" && sheetListboxQtr.length > 0) { // spread = GetSpreadForDefaultMode("Q"); // var DefaultChartElementsList = []; // DefaultChartElementsList = GetDefaultChartElements(spread, "Q", 1); // if (DefaultChartElementsList.length == 0) { // DefaultChartElementsList = GetDefaultChartElements(spread, "Q", 2); // } // if (DefaultChartElementsList.length == 0) { // DefaultChartElementsList = GetDefaultChartElements(spread, "Q", 3); // } // if (DefaultChartElementsList.length > 0) { // selectedSheetIndex = DefaultChartElementsList[0].DefalutElementIndex; // selectedSheet = spread.getSheet(DefaultChartElementsList[0].SheetIndex); // } // else { // selectedSheetIndex = sheetListboxQtr[0].value; // selectedSheet = spread.getSheet(0); // DefaultIndex = GetDefaultIndexOfChartElement(selectedSheet); // } //} //else if (SelectedMode == "Semiannual" && sheetListboxSemiAnnual.length > 0) { // spread = GetSpreadForDefaultMode("H"); // var DefaultChartElementsList = []; // DefaultChartElementsList = GetDefaultChartElements(spread, "H", 1); // if (DefaultChartElementsList.length == 0) { // DefaultChartElementsList = GetDefaultChartElements(spread, "H", 2); // } // if (DefaultChartElementsList.length == 0) { // DefaultChartElementsList = GetDefaultChartElements(spread, "H", 3); // } // if (DefaultChartElementsList.length > 0) { // selectedSheetIndex = DefaultChartElementsList[0].DefalutElementIndex; // selectedSheet = spread.getSheet(DefaultChartElementsList[0].SheetIndex); // } // else { // selectedSheetIndex = sheetListboxSemiAnnual[0].value; // selectedSheet = spread.getSheet(0); // DefaultIndex = GetDefaultIndexOfChartElement(selectedSheet); // } //} //else if (SelectedMode == "Annual" && sheetListboxAnnual.length > 0) { // spread = GetSpreadForDefaultMode("Y"); // var DefaultChartElementsList = []; // DefaultChartElementsList = GetDefaultChartElements(spread, "Y", 1); // if (DefaultChartElementsList.length == 0) { // DefaultChartElementsList = GetDefaultChartElements(spread, "Y", 2); // } // if (DefaultChartElementsList.length == 0) { // DefaultChartElementsList = GetDefaultChartElements(spread, "Y", 3); // } // if (DefaultChartElementsList.length > 0) { // selectedSheetIndex = DefaultChartElementsList[0].DefalutElementIndex; // selectedSheet = spread.getSheet(DefaultChartElementsList[0].SheetIndex); // } // else { // selectedSheetIndex = sheetListboxAnnual[0].value; // selectedSheet = spread.getSheet(0); // DefaultIndex = GetDefaultIndexOfChartElement(selectedSheet); // } //} //else if (SelectedMode == "YearToDate" && sheetListboxYTD.length > 0) { // var ActiveIndex = 0; // spread = GetSpreadForDefaultMode("QYTD"); // selectedSheetIndex = sheetListboxYTD[0].value; // selectedSheet = spread.getSheet(GetActiveSheetIndexByMode(spread, "QYTD")); // DefaultIndex = GetDefaultIndexOfChartElement(selectedSheet); //} //else if (SelectedMode == "Monthly" && sheetListboxMonthly.length > 0) { // var ActiveIndex = 0; // spread = GetSpreadForDefaultMode("M"); // selectedSheetIndex = sheetListboxMonthly[0].value; // selectedSheet = spread.getSheet(GetActiveSheetIndexByMode(spread, "M")); // DefaultIndex = GetDefaultIndexOfChartElement(selectedSheet); //} //else if (SelectedMode == "Weekly" && sheetListboxWeekly.length > 0) { // var ActiveIndex = 0; // spread = GetSpreadForDefaultMode("W"); // selectedSheetIndex = sheetListboxWeekly[0].value; // selectedSheet = spread.getSheet(GetActiveSheetIndexByMode(spread, "W")); // DefaultIndex = GetDefaultIndexOfChartElement(selectedSheet); //} //else if (SelectedMode == "Daily" && sheetListboxDaily.length > 0) { // var ActiveIndex = 0; // spread = GetSpreadForDefaultMode("D"); // selectedSheetIndex = sheetListboxDaily[0].value; // selectedSheet = spread.getSheet(GetActiveSheetIndexByMode(spread, "D")); // DefaultIndex = GetDefaultIndexOfChartElement(selectedSheet); //} //for (var i = 0; i < selectedSheet._dataModel.rowCount; i++) { // var Desc = selectedSheet._dataModel.getValue(i, 6); // var IsGraphIconPresent = false; // var ChartsIcon = selectedSheet.getStyle(i, 5); // if (ChartsIcon != undefined && ChartsIcon != null) { // if (ChartsIcon.backgroundImage != undefined) { // IsGraphIconPresent = true; // } // } for (var i = 0; i < selectedSheet.length; i++) { var Desc = selectedSheet[i].Col5; if (GlobalSheetDataTemp.SheetDetailsData[sheetCode].SheetElementInfo[i] != undefined && GlobalSheetDataTemp.SheetDetailsData[sheetCode].SheetElementInfo[i] != null) { var IsGraphIconPresent = GlobalSheetDataTemp.SheetDetailsData[sheetCode].SheetElementInfo[i].DataTypeID; //var IsGraphIconPresent = false; //var ChartsIcon = selectedSheet.getStyle(i, 5); //if (ChartsIcon != undefined && ChartsIcon != null) { // if (ChartsIcon.backgroundImage != undefined) { // IsGraphIconPresent = true; // } //} if (Desc != null && Desc.length > 0 && IsGraphIconPresent != 11) { if (Desc.length > 42) { Desc = Desc.substr(0, 42) + "..."; } //var name = "" + Desc + "" + ""; selectedSheetIndex = sheetListboxFinal[0].value; var id = selectedSheetIndex + "-" + i; var TempId = "#DESC_" + selectedSheetIndex + "-" + i; if (varGlobalEditLegendList != null && varGlobalEditLegendList != undefined && varGlobalEditLegendList.length > 0) { for (var b = 0; b < varGlobalEditLegendList.length; b++) { if (varGlobalEditLegendList[b].ID == TempId) { Desc = varGlobalEditLegendList[b].Description; break; } } } var name = "
" + Desc + " | Y1 |
" + Desc + " | Y1 |
" + Desc + " | Y1 |
" + Desc + " | Y1 |