аЯрЁБс>ўџ ўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџRoot Entryџџџџџџџџ pЊ|YЊrЯƒRASH Ї,8ёшХ€ContentsџџџџџџџџџџџџсбPage 1џџџџџџџџџџџџФPage 2џџџџеЅ§џџџџџџџџџџџџџџџџџџџўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџўџџџ§џџџр§џџџ§џџџ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€Root Entryџџџџџџџџ pЊ|YЊrЯƒRASH€пJ1ёшХ€Contentsџџџџџџџџџџџџ•бPage 1џџџџџџџџџџџџФPage 2џџџџеЅџџџџџџџџ§џџџ§џџџўџџџ эўџџџџџџџџџџџрџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџШЩЪЫЬЭЮЯабвгдўџџџжзийклмнопўџџџўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюя№ёђѓєѕіїјљњћќ§ўџPage 3џџџџџџџџЧЊPage 4џџџџџџџџџџџџш\Symbol 1џџџџ {Symbol 2џџџџџџџџ"Symbol 3џџџџџџџџџџџџ*Media 1џџџџzџџџџџџџџџџџџџџџџџџџџџџџџџџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџ)€€€џџџ?џџJavaScriptHandler#Hџ…//This frame responds to JavaScript data. //First, we check if new data has been actually supplied if (isNewData == "1" && (newData != undefined && newData != null)) { //Means new data has been supplied //Get the new data TxmlDataDoc = new XML(); TxmlDataDoc.parseXML(newData); //Clear the real time interval clearInterval(realTimeInterval); //Now, clear the chart objects already rendered (with depth starting from this.Params.bgDepth to _lastLevel) for (tObj in this) { //Get a reference to all objects present in the current timeline var obj = this[tObj]; //If the object is a movieClip and it's depth is between our required depths if ((obj.getDepth()<=_lastLevel) && (obj.getDepth()>=FIChart.Params.bgDepth)) { obj.removeMovieClip(); deleteText(obj.getDepth()); } delete obj; } //Re-set the global counter _lastLevel = FIChart.Params.bgDepth; //Delete FIChart delete FIChart; //If the data is not valid - show error msg and stop if (TxmlDataDoc.status != 0) { //However if the XML Data is not well-formed, Show an error createText(1, "Invalid XML Data", _chartHorCenter, _chartVerCenter, "Verdana", "10", LPBarTextColor, false, "center", "center", null, false); //Stop the control of the movie gotoAndStop("ErrorStop"); } else { //Else, goto and play the first frame - i.e., re-render the chart gotoAndPlay(1); } } else { //Else- just stay normal stop(); } €€€џџџ?џџ ErrorStopО//Just stop stop();€€ JavaScript HandlerџџџџOџџџ€€€€џџџ?џџ„gџX/* This frame is invoked, when the chart .swf file has been downloaded onto the end user's machine and the XML file has also been downloaded. In this frame, we'll: 1. Show a rendering chart message 2. Load the Chart Class 3. Instantiate an object representing the Chart Class */ //Get the default value/value set by the user LNoDataText = getFirstValue(unescape(this.ChartNoDataText), "No data to display."); //Next, we instantiate an object representing the chart class FIChart = new Chart(); //Acquire the data from the global XML document FIChart.acquireData(); //Parse the data into the Chart arrays and variables. FIChart.parseData(); //Now, if there is no data to display if (FIChart.Params.numDs == 0 || FIChart.Params.numSets == 0) { //Display the no data text createText(1, LNoDataText, _chartHorCenter, _chartVerCenter, "Verdana", "10", LPBarTextColor, false, "center", "left", null, false); //And stop stop(); } else { //Now, if we've data to display then carry on. //Calculate the co-ordinates of various elements on the chart FIChart.calculatePoints(); //Move to the next frame. play(); } €€€џџџ?џџсJџ/* This frame is a part of the chart rendering process. It is invoked when the chart class has been loaded, an object representing it initialized and XML data has been parsed. Here, we do the following: 1. Hide the rendering chart textbox. 2. Render the various Chart elements */ //First, we hide the "Rendering Chart" textbox deleteText(1); //Also, delete the size calculate movie clip deleteText(25001); //Allot depths FIChart.allotDepths(); //Render the background FIChart.drawBackground(); //Load Bacgkround swf FIChart.loadBgSWF(); //Draw the canvas FIChart.drawCanvas(); //Draw data grid FIChart.drawDataGrid(); //Draw category grids FIChart.drawCatGrid(); //Draw the trend lines FIChart.drawTrendLines(); //Render the task bars FIChart.drawTask(); //Allot the depths for various objects FIChart.allotConnectorDepths(); //Draw the canvas border FIChart.drawCanvasBorder(); //Render the *raw* hover caption FIChart.renderHoverCap(); //Hide resize cursor MovResizeCursor.swapDepths(FIChart.getLevel()); MovResizeCursor._visible = false; stop(); €€ ActionsџџџџџOџџ€€џџ CPicSpriteвЊ вЊџџџџж,MovResizeCursor€€ўџџџўџџџ ўџџџ ўџџџўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџPage 3џџџџџџџџЧЊPage 4џџџџџџџџџџџџš\Symbol 1џџџџ {Symbol 2џџџџџџџџ"|,џџџџџџxFŽA ‘џ?:RѓP9#‡h6BЩV0Ўз9]RPSВг 3Р™Ю€rг§ћ'Gu=}‚Хjю?кЙЩхњa ХЛџџџџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџЭ3A#initclip 1 #include "../CodeBase/FIProgressBar.as" #endinitclip €€ ClassџџџџO€џџ€€џџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicBitmap€€Bџџџjџџџ€€џџџ?џџ /€€ Layer 1џџџџO€џџ€€џџCPicPageџџ CPicLayerџџ CPicFrameџџCPicText€€ ёџџ;ўџџџƒџ embedText !@#$%^&*()@Verdanaџ"(€€џџџ?џџЇF€€ Layer 1џџџџO€џџ€€џџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџЈ й//If this movie is being loaded from some other movie, we stop here //As the actions of this movie would be controlled from the other movie, including the pre-loader if (_global.FI_LoadMovieMode == true) { stop(); } ‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦўџџџШЩЪЫЬЭЮЯабвгдўџџџжзийклмнопўџџџўџџџтуфхцчшщъыьўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџ)€€€џџџ?џџJavaScriptHandler#Hџ…//This frame responds to JavaScript data. //First, we check if new data has been actually supplied if (isNewData == "1" && (newData != undefined && newData != null)) { //Means new data has been supplied //Get the new data TxmlDataDoc = new XML(); TxmlDataDoc.parseXML(newData); //Clear the real time interval clearInterval(realTimeInterval); //Now, clear the chart objects already rendered (with depth starting from this.Params.bgDepth to _lastLevel) for (tObj in this) { //Get a reference to all objects present in the current timeline var obj = this[tObj]; //If the object is a movieClip and it's depth is between our required depths if ((obj.getDepth()<=_lastLevel) && (obj.getDepth()>=FIChart.Params.bgDepth)) { obj.removeMovieClip(); deleteText(obj.getDepth()); } delete obj; } //Re-set the global counter _lastLevel = FIChart.Params.bgDepth; //Delete FIChart delete FIChart; //If the data is not valid - show error msg and stop if (TxmlDataDoc.status != 0) { //However if the XML Data is not well-formed, Show an error createText(1, "Invalid XML Data", _chartHorCenter, _chartVerCenter, "Verdana", "10", LPBarTextColor, false, "center", "center", null, false); //Stop the control of the movie gotoAndStop("ErrorStop"); } else { //Else, goto and play the first frame - i.e., re-render the chart gotoAndPlay(1); } } else { //Else- just stay normal stop(); } €€€џџџ?џџ ErrorStopО//Just stop stop();€€ JavaScript HandlerџџџџOџџџ€€€€џџџ?џџ„gџX/* This frame is invoked, when the chart .swf file has been downloaded onto the end user's machine and the XML file has also been downloaded. In this frame, we'll: 1. Show a rendering chart message 2. Load the Chart Class 3. Instantiate an object representing the Chart Class */ //Get the default value/value set by the user LNoDataText = getFirstValue(unescape(this.ChartNoDataText), "No data to display."); //Next, we instantiate an object representing the chart class FIChart = new Chart(); //Acquire the data from the global XML document FIChart.acquireData(); //Parse the data into the Chart arrays and variables. FIChart.parseData(); //Now, if there is no data to display if (FIChart.Params.numDs == 0 || FIChart.Params.numSets == 0) { //Display the no data text createText(1, LNoDataText, _chartHorCenter, _chartVerCenter, "Verdana", "10", LPBarTextColor, false, "center", "left", null, false); //And stop stop(); } else { //Now, if we've data to display then carry on. //Calculate the co-ordinates of various elements on the chart FIChart.calculatePoints(); //Move to the next frame. play(); } €€€џџџ?џџсJџ/* This frame is a part of the chart rendering process. It is invoked when the chart class has been loaded, an object representing it initialized and XML data has been parsed. Here, we do the following: 1. Hide the rendering chart textbox. 2. Render the various Chart elements */ //First, we hide the "Rendering Chart" textbox deleteText(1); //Also, delete the size calculate movie clip deleteText(25001); //Allot depths FIChart.allotDepths(); //Render the background FIChart.drawBackground(); //Load Bacgkround swf FIChart.loadBgSWF(); //Draw the canvas FIChart.drawCanvas(); //Draw data grid FIChart.drawDataGrid(); //Draw category grids FIChart.drawCatGrid(); //Draw the trend lines FIChart.drawTrendLines(); //Render the task bars FIChart.drawTask(); //Allot the depths for various objects FIChart.allotConnectorDepths(); //Draw the canvas border FIChart.drawCanvasBorder(); //Render the *raw* hover caption FIChart.renderHoverCap(); //Hide resize cursor MovResizeCursor.swapDepths(FIChart.getLevel()); MovResizeCursor._visible = false; stop(); €€ ActionsџџџџџOџџ€€џџ CPicSpriteвЊ вЊџџџџж,MovResizeCursor€€џџџ?џџl=€€ Resize CursorџџџџџџOџ€€€€џџџ?џџRiџџџ†B//** Chart Class **// //Chart is the base object on which the whole charting model will be based Chart = function () { // Chart.xmlData represents the complete XML data supplied to FusionCharts this.xmlData = new XML(); // Chart.categories is an array to store the category names this.categories = new Array(); // Chart.process would be used to store the processes this.Process = new Array(); // Chart.task would store the list of tasks this.Task = new Array(); // Chart.Milestone would be used to store milestones this.milestone = new Array(); // Chart.Objects would be used to store the co-ordinates of a number of objects this.Objects = new Array(); // Chart.dataColumn would be used to store the data for each data column this.dataColumn = new Array(); // Chart.connectors would be used to store the list of connectors this.connectors = new Array(); // Chart.trendlines would be used to store the details of trendlines this.trendLines = new Array(); // Chart.Params would be used to store the graph properties this.Params = new Object(); // Chart.Constants would be used to store the graph constants this.Constants = new Object(); // ** Initialize objects **/ // Params.numCat indicates the total number of section that we have (count of vertical) this.Params.numCat = 0; // Params.numTask indicates the number of tasks this.Params.numTask = 0; // Params.numProcess indicates the number of processes we need to show this.Params.numProcess = 0; // Params.numDataColumns indicates the total number of data columns we need to draw in the grid (*NOT* including the process name column) this.Params.numDataColumns = 0; // Params.numMileStones indicates the number of milestones this.Params.numMileStones = 0; // Params.numConnectors represents number of connectors this.Params.numConnectors = 0; // Params.numTrendLines indicates the number of trend lines to be plotted on the chart this.Params.numTrendLines = 0; // Store the instance this.instance = this; // Flag this.Params.connectorsRendered = false; // Some constants to be used throughout the movie this.Constants.catTextRotationAngle = Number(getFirstValue(this.catTextRotationAngle, 270)); this.Constants.calcTextXPos = Number(getFirstValue(this.calcTextXPos, -200)); this.Constants.calcTextYPos = Number(getFirstValue(this.calcTextYPos, -200)); this.Constants.CCanvasPadding = Number(getFirstValue(this.CCanvasPadding, 0)); this.Constants.ConnectorExt = Number(getFirstValue(this.ConnectorExt, 10)); }; //** Nested Objects **// /* Nested objects are sub-objects whose instance we'll later create and store in the instance of Chart Object. Basically, we are trying to group the data under various heads. */ Chart.process = function(name, link, id, font, fontColor, fontSize, isBold, isUnderLine, align, vAlign, bgColor, bgAlpha) { //Chart.Process indicates a process object this.name = name; this.link = link; this.id = id; //Font properties this.font = font; this.fontColor = fontColor; this.fontSize = fontSize; //Text bold and underline properties this.isBold = (isBold == 1) ? (true) : (false); this.isUnderLine = (isUnderLine == 1) ? (true) : (false); //Align positions this.align = align; this.vAlign = vAlign; //Background properties this.bgColor = bgColor; this.bgAlpha = bgAlpha; }; Chart.task = function(processId, name, id, link, start, end, animation, font, fontColor, fontSize, color, alpha, showBorder, borderColor, borderThickness, borderAlpha, height, topPadding, showName, showStartDate, showEndDate, hoverText) { //Chart.Task Object represents a task bar //Process id for this task this.processId = processId; //Name and id of this task this.name = name; this.id = id; //Link this.link = link; //Start and end dates for same this.start = start; this.end = end; //Start and end dates (in date format) this.startDate = ""; this.endDate = ""; //Whether to animate or not this.animation = animation; //Font properties this.font = font; this.fontColor = fontColor; this.fontSize = fontSize; //Fill Color and alpha this.color = color; this.alpha = alpha; //Border properties this.showBorder = showBorder; this.borderColor = borderColor; this.borderThickness = borderThickness; this.borderAlpha = borderAlpha; //Height (if explicitly given) this.height = height; //Top padding (vertical) this.topPadding = topPadding; //Whether to show names, start date, and end date this.showName = showName; this.showStartDate = showStartDate; this.showEndDate = showEndDate; //Hover text (additional hover caption text) this.hoverText = hoverText; //Internal positioning properties this.xPos = 0; this.width = 0; this.yPos = 0; //Internal field this.isRendered = false; }; Chart.category = function(bgColor, bgAlpha, name, link, align, vAlign, start, end, isBold, isUnderLine, font, fontSize, fontColor) { //Chart.category indicates a category object //Background properties this.bgColor = bgColor; this.bgAlpha = bgAlpha; //Name of category this.name = name; //Link (if any) this.link = link; //Text align positions this.align = align; this.vAlign = vAlign; //Start and end dates (in string format) this.start = start; this.end = end; //Start and end dates (in date format) this.startDate = ""; this.endDate = ""; //Text bold and underline properties this.isBold = (isBold == 1) ? (true) : (false); this.isUnderLine = (isUnderLine == 1) ? (true) : (false); //Font properties this.font = font; this.fontSize = fontSize; this.fontColor = fontColor; //Internal positioning properties this.xPos = 0; this.yPos = 0; this.width = 0; this.height = 0; }; Chart.dataCell = function(label, link, align, vAlign, isBold, isUnderLine, font, fontSize, fontColor, bgColor, bgAlpha) { //Each data cell represents a cell in the data column //Label this.label = label; //Link (if any) this.link = link; //Text align positions this.align = align; this.vAlign = vAlign; //Text bold and underline properties this.isBold = (isBold == 1) ? (true) : (false); this.isUnderLine = (isUnderLine == 1) ? (true) : (false); //Font properties this.font = font; this.fontSize = fontSize; this.fontColor = fontColor; //Background properties this.bgColor = bgColor; this.bgAlpha = bgAlpha; }; Chart.trendLine = function(start, end, displayValue, color, thickness, alpha, isTrendZone) { //Chart.trendline represents a trend line on the chart //Start and end dates this.start = start; this.end = end; this.displayValue = displayValue; //StartDate and endDate - FIDate objects this.startDate = ""; this.endDate = ""; //Cosmetic properties this.color = color; this.thickness = thickness; this.alpha = alpha; this.isTrendZone = isTrendZone; //Internal positioning properties this.xPos = 0; this.yPos = 0; this.toXPos = 0; this.toYPos = 0; }; Chart.milestone = function(taskId, date, shape, numSides, startAngle, radius, borderColor, borderThickness, color, alpha) { //Chart.milestone represents a milestone object on the chart this.taskId = taskId; this.internalTaskId = 0; //Date this.date = date; //Create the date obj this.mDate = ""; //Milestone shape properties this.shape = shape; this.numSides = numSides; this.startAngle = startAngle; this.radius = radius; //Border properties this.borderColor = borderColor; this.borderThickness = borderThickness; //Color and Alpha this.color = color; this.alpha = alpha; //Internal positioning properties this.xPos = 0; this.yPos = 0; }; Chart.connector = function(fromTaskId, toTaskId, fromTaskConnectStart, toTaskConnectStart, color, thickness, alpha, isDashed) { //Chart.connector represents a connector line this.fromTaskId = fromTaskId; this.toTaskId = toTaskId; //Internal task id indexing this.iFromId = 0; this.iToId = 0; //Whether to connect from start or end. this.fromTaskConnectStart = fromTaskConnectStart; this.toTaskConnectStart = toTaskConnectStart; //Cosmetic properties this.color = color; this.thickness = thickness; this.alpha = alpha; //Dashed line this.isDashed = isDashed; //Internal positioning properties this.fromYPos = 0; this.toYPos = 0; }; Chart.cObject = function(xPos, yPos, objHeight, objWidth) { //Chart.cObject represents an individual element on the chart this.xPos = xPos; this.yPos = yPos; this.height = objHeight; this.width = objWidth; }; Chart.objectParams = function() { //An invisible object used to store the attributes of any object }; //** Methods **// Chart.prototype.acquireData = function() { //This function acquires the data from the global XML object //into the Chart class this.xmlData = TxmlDataDoc; //Delete the global object to free up memory resources delete TxmlDataDoc; }; Chart.prototype.parseData = function() { //This function parses the XML data document, retrieves the //data and stores it into various arrays and objects of the Chart class //levelOneNodes gets reference to the first level nodes - i.e, and associates (if any) var levelOneNodes = this.xmlData.childNodes; //Iterate through each level one node to search for the graph node for (i=0; i<=levelOneNodes.length; i++) { //Check if the node name is Graph if (levelOneNodes[i].nodeName.toUpperCase() == "GRAPH" || levelOneNodes[i].nodeName.toUpperCase() == "CHART") { //The current node is GRAPH/CHART node //So, extract the properties of the graph (which have been provided as attributes of the GRAPH/CHART node) //For each property, we also have a pre-set default value which would //be allotted only if the XML doesn't specify a value for the parameter //Background color of the chart this.Params.bgColor = formatHexColor(getFirstValue(levelOneNodes[i].attributes.bgColor, "FFFFFF")); this.Params.bgAlpha = Number(getFirstValue(levelOneNodes[i].attributes.bgAlpha, 100)); //Background swf this.Params.bgSWF = levelOneNodes[i].attributes.bgSWF; //Canvas background color, border color and border thickness (in pixels) this.Params.canvasBgColor = formatHexColor(getFirstValue(levelOneNodes[i].attributes.canvasBgColor, this.Params.bgColor)); this.Params.canvasBgAlpha = Number(getFirstValue(levelOneNodes[i].attributes.canvasBgAlpha, 100)); this.Params.canvasBorderColor = formatHexColor(getFirstValue(levelOneNodes[i].attributes.canvasBorderColor, "333333")); this.Params.canvasBorderThickness = Number(getFirstValue(levelOneNodes[i].attributes.canvasBorderThickness, 1)); //Configuration to set whether to show task display textboxes this.Params.showTaskStartDate = Number(getFirstValue(levelOneNodes[i].attributes.showTaskStartDate, 0)); this.Params.showTaskEndDate = Number(getFirstValue(levelOneNodes[i].attributes.showTaskEndDate, 0)); this.Params.showTaskNames = Number(getFirstValue(levelOneNodes[i].attributes.showTaskNames, 0)); this.Params.taskDatePadding = Number(getFirstValue(levelOneNodes[i].attributes.taskDatePadding, 3)); //Gantt Area width percent this.Params.ganttWidthPercent = Number(getFirstValue(levelOneNodes[i].attributes.ganttWidthPercent, 65)); //Cannot be more than 100 if (this.Params.ganttWidthPercent>100) { this.Params.ganttWidthPercent = 100; } //Date formatting option this.Params.dateFormat = getFirstValue(levelOneNodes[i].attributes.dateFormat, "mm/dd/yyyy"); //Gantt grid line properties this.Params.ganttLineColor = formatHexColor(getFirstValue(levelOneNodes[i].attributes.ganttLineColor, "CCCCCC")); this.Params.ganttLineAlpha = Number(getFirstValue(levelOneNodes[i].attributes.ganttLineAlpha, 100)); //Grid properties this.Params.gridBorderColor = formatHexColor(getFirstValue(levelOneNodes[i].attributes.gridBorderColor, "CCCCCC")); this.Params.gridBorderAlpha = Number(getFirstValue(levelOneNodes[i].attributes.gridBorderAlpha, 100)); //Grid resize bar properties this.Params.gridResizeBarColor = formatHexColor(getFirstValue(levelOneNodes[i].attributes.gridResizeBarColor, "CCCCCC")); this.Params.gridResizeBarThickness = Number(getFirstValue(levelOneNodes[i].attributes.gridResizeBarThickness, 1)); this.Params.gridResizeBarAlpha = Number(getFirstValue(levelOneNodes[i].attributes.gridResizeBarAlpha, 100)); //Hover Caption - Show/Hide, Background Color, Border Color, Separator Character this.Params.showHoverCap = Number(getFirstValue(levelOneNodes[i].attributes.showHoverCap, 1)); this.Params.hoverCapBgColor = formatHexColor(getFirstValue(levelOneNodes[i].attributes.hoverCapBgColor, levelOneNodes[i].attributes.hoverCapBg, "F1F1F1")); this.Params.hoverCapBorderColor = formatHexColor(getFirstValue(levelOneNodes[i].attributes.hoverCapBorderColor, levelOneNodes[i].attributes.hoverCapBorder, "666666")); this.Params.hoverCapSepChar = getFirstValue(levelOneNodes[i].attributes.hoverCapSepChar, ", "); //Whether to extend the last category background till bottom this.Params.extendCategoryBg = Number(getFirstValue(levelOneNodes[i].attributes.extendCategoryBg, 1)); //Animation this.Params.animation = Number(getFirstValue(levelOneNodes[i].attributes.animation, 1)); //Font Properties this.Params.baseFont = getFirstValue(levelOneNodes[i].attributes.baseFont, "Verdana"); this.Params.baseFontSize = Number(getFirstValue(levelOneNodes[i].attributes.baseFontSize, 11)); this.Params.baseFontColor = formatHexColor(getFirstValue(levelOneNodes[i].attributes.baseFontColor, "000000")); //Chart Margins this.Params.chartLeftMargin = Number(getFirstValue(levelOneNodes[i].attributes.chartLeftMargin, 15)); this.Params.chartRightMargin = Number(getFirstValue(levelOneNodes[i].attributes.chartRightMargin, 15)); this.Params.chartTopMargin = Number(getFirstValue(levelOneNodes[i].attributes.chartTopMargin, 15)); this.Params.chartBottomMargin = Number(getFirstValue(levelOneNodes[i].attributes.chartBottomMargin, 20)); //All the properties have been extracted //Therefore, now we move on to extract the data contained in sibling nodes var levelTwoNodes = levelOneNodes[i].childNodes; for (j=0; j info var colTextNodes = dataTableNodes[k].childNodes; //Now, iterate through each of the text nodes and store the data in the array //Create a counter var cellCount = 0; for (l=0; l<=colTextNodes.length; l++) { //If the node is really a Text node if (colTextNodes[l].nodeName.toUpperCase() == "TEXT") { //Increase the counter cellCount++; var clabel = getFirstValue(colTextNodes[l].attributes.label, ""); var clink = getFirstValue(unescape(colTextNodes[l].attributes.link), ""); var cbgColor = formatHexColor(getFirstValue(colTextNodes[l].attributes.bgColor, this.dataColumn[this.Params.numDataColumns].bgColor)); var cbgAlpha = formatHexColor(getFirstValue(colTextNodes[l].attributes.bgAlpha, this.dataColumn[this.Params.numDataColumns].bgAlpha)); var cfont = getFirstValue(colTextNodes[l].attributes.font, this.dataColumn[this.Params.numDataColumns].font); var cfontColor = formatHexColor(getFirstValue(colTextNodes[l].attributes.fontColor, this.dataColumn[this.Params.numDataColumns].fontColor)); var cfontSize = Number(getFirstValue(colTextNodes[l].attributes.fontSize, this.dataColumn[this.Params.numDataColumns].fontSize)); var cisBold = Number(getFirstValue(colTextNodes[l].attributes.isBold, this.dataColumn[this.Params.numDataColumns].isBold)); var cisUnderLine = Number(getFirstValue(colTextNodes[l].attributes.isUnderLine, this.dataColumn[this.Params.numDataColumns].isUnderLine)); var calign = getFirstValue(colTextNodes[l].attributes.align, this.dataColumn[this.Params.numDataColumns].align); var cvAlign = getFirstValue(colTextNodes[l].attributes.vAlign, this.dataColumn[this.Params.numDataColumns].vAlign); //Create the cell object to represent this cell this.dataColumn[this.Params.numDataColumns].cell[cellCount] = new Chart.dataCell(clabel, clink, calign, cvAlign, cisBold, cisUnderLine, cfont, cfontSize, cfontColor, cbgColor, cbgAlpha); } } //Increment value this.Params.numDataCol++; } } } else if (levelTwoNodes[j].nodeName.toUpperCase() == "TASKS") { //If it's the tasks node, get the attributes var tFont = getFirstValue(levelTwoNodes[j].attributes.font, this.Params.baseFont); var tFontColor = formatHexColor(getFirstValue(levelTwoNodes[j].attributes.fontColor, this.Params.baseFontColor)); var tFontSize = Number(getFirstValue(levelTwoNodes[j].attributes.fontSize, this.Params.baseFontSize)); var tColor = getFirstValue(levelTwoNodes[j].attributes.color, "c6c6c6,ffffff,c6c6c6"); var tAlpha = Number(getFirstValue(levelTwoNodes[j].attributes.alpha, 100)); var tShowBorder = Number(getFirstValue(levelTwoNodes[j].attributes.showBorder, 1)); var tBorderColor = formatHexColor(getFirstValue(levelTwoNodes[j].attributes.borderColor, "333333")); var tBorderThickness = Number(getFirstValue(levelTwoNodes[j].attributes.borderThickness, 1)); var tBorderAlpha = Number(getFirstValue(levelTwoNodes[j].attributes.borderAlpha, 100)); var tShowName = Number(getFirstValue(levelTwoNodes[j].attributes.showName, this.Params.showTaskNames)); var tShowStartDate = Number(getFirstValue(levelTwoNodes[j].attributes.showStartDate, this.Params.showTaskStartDate)); var tShowEndDate = Number(getFirstValue(levelTwoNodes[j].attributes.showEndDate, this.Params.showTaskEndDate)); //Get a reference to task Nodes taskNodes = levelTwoNodes[j].childNodes; //Now, iterate through each of the task nodes and store the data in the array for (k=0; kmaxCatTextHeight) ? (tObj.textHeight) : (maxCatTextHeight); } //Add the padding maxCatTextHeight = maxCatTextHeight+(2*this.categories[i].verticalPadding); //Store it in categories this.categories[i].yPos = this.Objects.Gantt.yPos+this.Params.totalCatHeight; this.categories[i].height = maxCatTextHeight; this.Params.totalCatHeight = this.Params.totalCatHeight+maxCatTextHeight; } //Calculate the width of each category var catWidthReserved = 0; var calcObj = new Object(); for (i=1; i<=this.Params.numCat; i++) { //Initialize catWidthReserved catWidthReserved = 0; for (j=1; j<=this.categories[i].numSubCat; j++) { //Calculate the position of each of the category calcObj = this.getPixelPosition(this.categories[i].category[j].startDate, this.categories[i].category[j].endDate); this.categories[i].category[j].xPos = calcObj.xPos; this.categories[i].category[j].width = calcObj.width; this.categories[i].category[j].yPos = this.categories[i].yPos; this.categories[i].category[j].height = this.categories[i].height; } } //Create an array to store process positions this.Params.processPos = new Array(); //Height of each process = total height left after categories split into number of processes this.Params.processHeight = (this.Objects.Gantt.height-this.Params.totalCatHeight)/this.Params.numProcess; for (i=1; i<=this.Params.numProcess; i++) { this.Params.processPos[i] = this.Objects.Gantt.yPos+this.Params.totalCatHeight+(this.Params.processHeight*(i-1)); } //We now calculate the positions for each task for (i=1; i<=this.Params.numTask; i++) { //Ideally, each task will have 1/3rd height of the task row (until explicity given) this.Task[i].height = int(Number(getFirstValue(this.Task[i].height, this.Params.processHeight/3))); //Now, half of the difference between the process row height and task height is top padding this.Task[i].topPadding = Number(getFirstValue(this.Task[i].topPadding, (this.Params.processHeight-this.Task[i].height)/2)); //Now, get the index of this task based on process Id var processIndex = 1; for (var j = 1; j<=this.Params.numProcess; j++) { //Match the process id of this task with the process id if (this.Task[i].processId == this.Process[j].id) { processIndex = j; break; } } //So, set the y position accordingly this.Task[i].yPos = this.Params.processPos[processIndex]+this.Task[i].topPadding; //Calculate the x position and width too. calcObj = this.getPixelPosition(this.Task[i].startDate, this.Task[i].endDate); this.Task[i].xPos = calcObj.xPos; this.Task[i].width = calcObj.width; } //Calculate the positions of the trendlines for (var i = 1; i<=this.Params.numTrendLines; i++) { //Calculate the x positions. calcObj = this.getPixelPosition(this.trendlines[i].startDate, this.trendlines[i].endDate); this.trendLines[i].xPos = calcObj.xPos; if (this.trendlines[i].isTrendZone == 0) { this.trendLines[i].toXPos = calcObj.xPos; } else { this.trendLines[i].toXPos = calcObj.xPos+calcObj.width; } //Set the y positions this.trendLines[i].yPos = this.Objects.Gantt.yPos+this.Params.totalCatHeight; this.trendLines[i].toYPos = this.Objects.Gantt.yPos+this.Objects.Gantt.height; } //Calculate the radius of milestone var mileStoneRadius = (this.task[1].height/2)+2; //Calculate the various aspects of each milestone for (var i = 1; i<=this.Params.numMileStones; i++) { //First up, match the task id of the milestone and the task to find internal task id (serialized) if (this.milestone[i].taskId != undefined) { for (var j = 1; j<=this.Params.numTask; j++) { if (this.milestone[i].taskId == this.task[j].id) { //If it's the same task id, store the serialized internal task id this.milestone[i].internalTaskId = j; break; } } //Now, set the radius if (this.milestone[i].radius == undefined || IsNan(this.milestone[i].radius) == true) { this.milestone[i].radius = mileStoneRadius; } //Calculate the x position. calcObj = this.getPixelPosition(this.milestone[i].mDate, this.milestone[i].mDate); this.milestone[i].xPos = calcObj.xPos+calcObj.width; //Set the y position this.milestone[i].yPos = this.task[this.milestone[i].internalTaskId].yPos+(this.task[this.milestone[i].internalTaskId].height/2); } } //Calculate the internal task ids for each connector for (var i = 1; i<=this.Params.numConnectors; i++) { //Find the task id for (var j = 1; j<=this.Params.numTask; j++) { if ((this.connectors[i].fromTaskId == this.task[j].id) && (this.connectors[i].iFromId == 0)) { //Set the internal from task bar id this.connectors[i].iFromId = j; } if ((this.connectors[i].toTaskId == this.task[j].id) && (this.connectors[i].iToId == 0)) { //Set the internal from task bar id this.connectors[i].iToId = j; } } //Set the yPositions of the connectors this.connectors[i].fromYPos = this.task[this.connectors[i].iFromId].yPos+(this.task[this.connectors[i].iFromId].height/2); this.connectors[i].toYPos = this.task[this.connectors[i].iToId].yPos+(this.task[this.connectors[i].iToId].height/2); } }; Chart.prototype.getPixelPosition = function(startDate, endDate) { //This function returns the start x point and width of a data based on its startDate and endDate //StartDate and endDate are instances of FIDate //Get the difference in days var dateRange = dateDiff(startDate, endDate); //Get the difference in start date of chart and startDate var dateOffSet = dateDiff(this.Params.chartStartDate, startDate)-1; //Get the starting xPosition var xPos = this.Objects.Gantt.xPos+this.Params.perDayPixels*dateOffSet; //Calculate width var width = this.Params.perDayPixels*dateRange; //Return return {xPos:xPos, width:width}; }; Chart.prototype.getLevel = function() { //This function returns the highest current level in the movie which does not contain an object. //Increase the last depth _lastLevel++; //Return it return _lastLevel; }; Chart.prototype.allotDepths = function() { //Background depth this.Params.bgDepth = this.getLevel(); this.Params.bgSWFDepth = this.getLevel(); //Under chart custom object depth this.Params.CustomObjectsUCDepth = this.getLevel(); //Update global counter _lastLevel += this.Params.numCustomObjectsUC; }; Chart.prototype.allotConnectorDepths = function() { //Depth index for connectors this.Params.connectorDepth = this.getLevel(); _lastLevel = _lastLevel+this.Params.numConnectors; }; //**** Chart Element Rendering Methods ****// Chart.prototype.drawBackground = function() { //This function renders the background of the chart var level = this.getLevel(); this.drawRectangle(this.Params.bgDepth, _xShift, _yShift, _xShift+_chartWidth, _yShift+_chartHeight, this.Params.bgColor, this.Params.bgColor, 0, 0, this.Params.bgAlpha); }; Chart.prototype.loadBgSWF = function() { //This function loads the background chart swf file //First create a container movie clip createEmptyMovieClip("ASMov_bgSWF", this.getLevel()); //Get a reference to the same mcbgSWF = eval("ASMov_bgSWF"); //Load the external movie mcbgSWF.loadMovie(this.Params.bgSWF); }; Chart.prototype.drawCanvas = function() { //This function renders the canvas of the chart //Basically, the canvas is a small rectangle with the specified fill and border color this.drawRectangle(this.getLevel(), this.Objects.Canvas.xPos, this.Objects.Canvas.yPos, this.Objects.Canvas.xPos+this.Objects.Canvas.width, this.Objects.Canvas.yPos+this.Objects.Canvas.height, this.Params.canvasBorderColor, this.Params.canvasBgColor, 0, 0, this.Params.canvasBgAlpha); }; Chart.prototype.drawCatGrid = function() { //This function draws the category grid. //For each vertical category, we draw a grid. for (var i = 1; i endTaskX1 mcConnector.dashTo(startTaskX2, startTaskY, startTaskX2+this.Constants.ConnectorExt, startTaskY, dashLength, dashGap); mcConnector.dashTo(startTaskX2+this.Constants.ConnectorExt, startTaskY, startTaskX2+this.Constants.ConnectorExt, startTaskY+(endTaskY-startTaskY)/2, dashLength, dashGap); mcConnector.dashTo(startTaskX2+this.Constants.ConnectorExt, startTaskY+(endTaskY-startTaskY)/2, endTaskX1-this.Constants.ConnectorExt, startTaskY+(endTaskY-startTaskY)/2, dashLength, dashGap); mcConnector.dashTo(endTaskX1-this.Constants.ConnectorExt, startTaskY+(endTaskY-startTaskY)/2, endTaskX1-this.Constants.ConnectorExt, endTaskY, dashLength, dashGap); mcConnector.dashTo(endTaskX1-this.Constants.ConnectorExt, endTaskY, endTaskX1, endTaskY, dashLength, dashGap); } break; case 2 : //Case 2: End of StartTask to End of EndTask diff = ((endTaskX2-startTaskX2)<0) ? (0) : (endTaskX2-startTaskX2); mcConnector.dashTo(startTaskX2, startTaskY, startTaskX2+this.Constants.ConnectorExt+diff, startTaskY, dashLength, dashGap); mcConnector.dashTo(startTaskX2+this.Constants.ConnectorExt+diff, startTaskY, startTaskX2+this.Constants.ConnectorExt+diff, endTaskY, dashLength, dashGap); mcConnector.dashTo(startTaskX2+this.Constants.ConnectorExt+diff, endTaskY, endTaskX2, endTaskY, dashLength, dashGap); break; case 3 : //Case 3: Start of StartTask to Start of EndTask diff = ((startTaskX1-endTaskX1)<0) ? (0) : (startTaskX1-endTaskX1); mcConnector.dashTo(startTaskX1, startTaskY, startTaskX1-this.Constants.ConnectorExt-diff, startTaskY, dashLength, dashGap); mcConnector.dashTo(startTaskX1-this.Constants.ConnectorExt-diff, startTaskY, startTaskX1-this.Constants.ConnectorExt-diff, endTaskY, dashLength, dashGap); mcConnector.dashTo(startTaskX1-this.Constants.ConnectorExt-diff, endTaskY, endTaskX1, endTaskY, dashLength, dashGap); break; case 4 : //Case 4: Start of StartTask to End of EndTask if (startTaskX1>endTaskX2) { mcConnector.dashTo(startTaskX1, startTaskY, startTaskX1-(startTaskX1-endTaskX2)/2, startTaskY, dashLength, dashGap); mcConnector.dashTo(startTaskX1-(startTaskX1-endTaskX2)/2, startTaskY, startTaskX1-(startTaskX1-endTaskX2)/2, endTaskY, dashLength, dashGap); mcConnector.dashTo(startTaskX1-(startTaskX1-endTaskX2)/2, endTaskY, endTaskX2, endTaskY, dashLength, dashGap); } else { mcConnector.dashTo(startTaskX1, startTaskY, startTaskX1-this.Constants.ConnectorExt, startTaskY, dashLength, dashGap); mcConnector.dashTo(startTaskX1-this.Constants.ConnectorExt, startTaskY, startTaskX1-this.Constants.ConnectorExt, startTaskY+(endTaskY-startTaskY)/2, dashLength, dashGap); mcConnector.dashTo(startTaskX1-this.Constants.ConnectorExt, startTaskY+(endTaskY-startTaskY)/2, endTaskX2+this.Constants.ConnectorExt, startTaskY+(endTaskY-startTaskY)/2, dashLength, dashGap); mcConnector.dashTo(endTaskX2+this.Constants.ConnectorExt, startTaskY+(endTaskY-startTaskY)/2, endTaskX2+this.Constants.ConnectorExt, endTaskY, dashLength, dashGap); mcConnector.dashTo(endTaskX2+this.Constants.ConnectorExt, endTaskY, endTaskX2, endTaskY, dashLength, dashGap); } break; } } } } //Update flag this.Params.connectorsRendered = true; } }; Chart.prototype.drawCanvasBorder = function() { //This function renders the overlay canvas border of the chart this.drawRectangle(this.getLevel(), this.Objects.Canvas.xPos, this.Objects.Canvas.yPos, this.Objects.Canvas.xPos+this.Objects.Canvas.width, this.Objects.Canvas.yPos+this.Objects.Canvas.height, this.Params.canvasBorderColor, this.Params.canvasBgColor, this.Params.canvasBorderThickness, 100, 0); }; Chart.prototype.drawTrendLines = function() { //This function renders the trend lines on the chart for (i=1; i<=this.Params.numTrendLines; i++) { //Draw the trend line only if none of the y values are undefined and the value is between the defined limits //If trend zone is to be made if (this.TrendLines[i].isTrendZone == 1) { this.drawRectangle(this.getLevel(), this.TrendLines[i].xPos, this.TrendLines[i].yPos, this.TrendLines[i].toXPos, this.TrendLines[i].toYPos, this.TrendLines[i].color, this.TrendLines[i].color, this.TrendLines[i].thickness, 0, this.TrendLines[i].alpha); //Also, render the text of this trendzone createText(this.getLevel(), this.TrendLines[i].displayValue, this.TrendLines[i].xPos+(this.TrendLines[i].toXPos-this.TrendLines[i].xPos)/2, this.TrendLines[i].toYPos, this.Params.baseFont, this.Params.baseFontSize, this.TrendLines[i].color, false, "center", "right", null, true); } else { //Create slanted trend line this.drawLine(this.TrendLines[i].xPos, this.TrendLines[i].yPos, this.TrendLines[i].toXPos, this.TrendLines[i].toYPos, this.TrendLines[i].thickness, this.TrendLines[i].color, this.TrendLines[i].alpha, this.getLevel()); //Also, render the text of this trendline line createText(this.getLevel(), this.TrendLines[i].displayValue, this.TrendLines[i].xPos, this.TrendLines[i].toYPos, this.Params.baseFont, this.Params.baseFontSize, this.TrendLines[i].color, false, "center", "right", null, true); } } }; Chart.prototype.linkClick = function(strLink) { //This function navigates to a URL when a column is clicked on the chart. var linkToNav = strLink; if (linkToNav != undefined) { //We determine if a window is to be opened var strLink = new String(linkToNav); if ((strLink.CharAt(0) == "n" && strLink.CharAt(1) == "-") || (strLink.CharAt(0) == "N" && strLink.CharAt(1) == "-")) { //Means we have to open the link in a new window. //First we get the exact Link without n: finalLink = strLink.slice(2); getURL(finalLink, "_blank"); } else { //In the same window getURL(linkToNav, "_self"); } } }; Chart.prototype.renderHoverCap = function() { //This function renders the *raw* hover caption box with un-filled values //First check if Hover Caption box is required ? if (this.Params.showHoverCap == 1) { //Create the text field createTextField("ASMovHoverCaption", 2000+this.getLevel(), 0, 0, w, h); hoverCaption._visible = true; } }; Chart.prototype.setHoverCap = function(taskIndex) { //This function sets the position and the text values of the hover caption box with index as the passed index //Create a new text-format var LHoverCapFormat = new TextFormat(); LHoverCapFormat.align = "left"; LHoverCapFormat.color = parseInt(this.Params.BaseFontColor, 16); LHoverCapFormat.font = this.Params.BaseFont; LHoverCapFormat.size = this.Params.BaseFontSize; LHoverCapFormat.leftMargin = 0; LHoverCapFormat.rightMargin = 0; //Now, make the hover caption textbox visible. ASMovHoverCaption = eval("ASMovHoverCaption"); ASMovHoverCaption._visible = true; //Set its text var sum = 0; var dsVal; //Create the text var strText = this.task[taskIndex].hoverText; strText = strText+this.Params.hoverCapSepChar+this.task[taskIndex].start+" - "+this.task[taskIndex].end; ASMovHoverCaption.html = true; ASMovHoverCaption.htmlText = strText; ASMovHoverCaption.setTextFormat(LHoverCapFormat); ASMovHoverCaption.autoSize = true; ASMovHoverCaption.border = true; ASMovHoverCaption.borderColor = parseInt(this.Params.hoverCapBorderColor, 16); ASMovHoverCaption.background = true; ASMovHoverCaption.backgroundColor = parseInt(this.Params.hoverCapBgColor, 16); ASMovHoverCaption.multiline = true; ASMovHoverCaption.selectable = false; ASMovHoverCaption.tabEnabled = false; ASMovHoverCaption.type = "dynamic"; ASMovHoverCaption.wordWrap = false; //Set the x position if ((_xmouse+(ASMovHoverCaption._width/2))>(_xShift+_chartWidth)) { ASMovHoverCaption._x = _xmouse-ASMovHoverCaption._width; } else { ASMovHoverCaption._x = _xmouse-(ASMovHoverCaption._width/2); } //Set its y pos to the current y mouse pos ASMovHoverCaption._y = _ymouse-ASMovHoverCaption._height-5; }; Chart.prototype.removeHoverCap = function() { //This function hides the hover caption ASMovHoverCaption._visible = false; }; Chart.prototype.resetPositionHoverCap = function() { //This function re-sets the y co-ordinate of the Hover Cap Box if ((_xmouse+(ASMovHoverCaption._width/2))>(_xShift+_chartWidth)) { ASMovHoverCaption._x = _xmouse-ASMovHoverCaption._width; } else { ASMovHoverCaption._x = _xmouse-(ASMovHoverCaption._width/2); } ASMovHoverCaption._y = _ymouse-ASMovHoverCaption._height-5; }; //**** General Methods *****// /* General methods are those methods which can be used with any other Flash movies for some common jobs like font rendering, shapes drawing etc. */ Chart.prototype.drawLine = function(fromX, fromY, toX, toY, lineThickness, lineColor, lineAlpha, depth) { //This function draws a line segment on the canvas based on the arguments //************** PARAMETERS ****************// //fromX - from X point //fromY - from Y point //toX - to X point //toY - to Y point //lineThickness - thickness of the line //lineColor - Color - without # like FFDDDD, 000000 //lineAlpha - Alpha of the line //depth - MC depth //******************************************// //Returns nothing //First, create a movie clip container createEmptyMovieClip("ASMovLine_"+depth, depth); mcLine = eval("ASMovLine_"+depth); mcLine.clear(); //Set the line style mcLine.lineStyle(lineThickness, parseInt(lineColor, 16), lineAlpha); //Move to position fromX, fromY mcLine.moveTo(fromX, fromY); //Draw line mcLine.lineTo(toX, toY); //remove object delete mcLine; }; Chart.prototype.drawRectangle = function(depth, fromX, fromY, toX, toY, borderColor, bgColor, borderThickness, borderAlpha, bgAlpha) { //This function draws a rectangle on the canvas based on the arguments //************** PARAMETERS ****************// //depth - Level in which this rectangle will be rendered //fromX - Starting X Position //fromY - Starting Y Position //toX - Ending X Position //toY - Ending Y Position //borderColor - Border Color of the rectangle //bgColor - Background Color of the rectangle //borderThickness - Thickness of the border of the rectangle (in pixels) //borderAlpha - Alpha (Transparency) of the border //bgAlpha - Alpha (Transparency) of the background //******************************************// //Returns nothing //First, create a movie clip container //This function draws a rectangle based on the parameters passed to it. createEmptyMovieClip("ASMovRect_"+depth, depth); mcRect = eval("ASMovRect_"+depth); mcRect.beginFill(parseInt(bgColor, 16), bgAlpha); mcRect.lineStyle(borderThickness, parseInt(borderColor, 16), borderAlpha); mcRect.moveTo(fromX, fromY); mcRect.lineTo(toX, fromY); mcRect.lineTo(toX, toY); mcRect.lineTo(fromX, toY); mcRect.lineTo(fromX, fromY); mcRect.endFill(); //Clear memory resources delete mcRect; }; €€ Chart Classџџџџ™3Ьџ€€€€џџџ?џџ_џ//Include external relevant files //Utility Functions #include "../CodeBase/FIFunctions.as" //Utility Math routines #include "../CodeBase/FIMath.as" //Movie clip polygon #include "../CodeBase/FIMovieClip_Poly.as" //Movie clip rectangle #include "../CodeBase/FIMovieClip_Rect.as" //Movie clip star #include "../CodeBase/FIMovieClip_Star.as" //Dashed line #include "../CodeBase/FIMovieClip_Dash.as" //Data grid #include "../CodeBase/FIGrid.as" //Custom date object #include "../CodeBase/FIDate.as" //-----------------// €€ External IncludesџџџџOџOџ€€€Cюќџџ Cюќџџџџџџёm€€џџџ?џџI€€ Embedded TextџџџџџOOџ€€€€џџџ?џџЛAџ6/* Scene Name: Chart =========================================================================== This is the main scene of the entire movie where the actual chart is rendered. In this scene, we do the following: 1. Parse the XML data document to retrieve data from it and store in our local objects 2. Do various calculations to get the co-ordinates and values for all elements of the chart. 3. Render all the visual elements of the chart. External Includes in the scene: /CodeBase/FIFunctions.as - Utility Functions /CodeBase/FIMath.as - Utility Math Functions */€€ DescriptionџџџџO€џџ€€€€ DescriptionџџџџO€џџ€€џџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџFџz//Include the external file containing routines to assist in data loading #include "../CodeBase/FIDataLoad.as" /* LboolIsURLProvided is a global scope boolean variable that would maintain the flag indicating whether the data has been provided in URL format or dataXML format. A true value indicates dataURL. */ LboolIsURLProvided = isDataURLProvided(); if (LboolIsURLProvided == false) { //If it's dataXML, send the control to FdataXMLHandler frame gotoAndPlay("FdataXMLHandler"); } else { //Else, transfer the control to FdataURLHandler frame gotoAndPlay("FdataURLHandler"); } //Stop until the scripts invoke some action stop(); €€€џџџ?џџAXџ‘//dataURL handler frame /* This frame handles the data provided via dataURL method. Here, we do the following: 1. Filter the dataURL given to us 2. Load the XML data and store it in TxmlDataDoc XML Object 3. Create the progress bar for XML data 4. If any errors are present in the XML document, show the error. */ //We've been provided with dataURL. So, the first job is to filter the dataURL provided to us. var strXMLDocURL; strXMLDocURL = filterDataURL(this.dataURL); //Text to be displayed to user while the XML data document is loading. var LXMLLoadingText = getFirstValue(unescape(this.XMLLoadingText), "Retrieving Data. Please Wait"); //Create the text to be displayed createText(2, LXMLLoadingText, _chartHorCenter, _chartVerCenter-(LPBarHeight/2), "Verdana", "10", LPBarTextColor, false, "center", "left", null, false); //Global flag to check whether the data size has been determined isDataSizeDetermined = false; //Now, create the progress bar for XML data loading attachMovie("FIProgressBar", "FIPB", 1); FIPB.setPosition(_chartHorCenter-(LPBarWidth/2), _chartVerCenter); FIPB.setSize(LPBarWidth, LPBarHeight); FIPB.setColors(LPBarBgColor, LPBarBorderColor); FIPB.setBorderThickness(LPBarBorderThickness); FIPB.draw(); //We now instantiate the routine to load the XML data from the specified URL. TxmlDataDoc.load(strXMLDocURL); /* We also specify the onLoad event handler for the XML document That is, the control will switch to dataLoaded() function once the data has been downloaded into the clients machine dataLoaded function is defined in FIDataLoad.as */ TxmlDataDoc.onLoad = dataLoaded; //Create the onEnter Frame action this.onEnterFrame = function() { //If the total bytes of the XML document has been detected, //we set the minimum and maximum limits for the progress bar //and update the value. if (TxmlDataDoc.getBytesTotal() != undefined && TxmlDataDoc.getBytesTotal()>0) { if (isDataSizeDetermined == false) { //Set the new limits of the progress bar FIPB.setLimits(0, TxmlDataDoc.getBytesTotal()); //Update the flag isDataSizeDetermined = true; } //Update progess bar FIPB.setValue(TxmlDataDoc.getBytesLoaded()); } }; //Stop here. stop(); €€€џџџ?џџ+]џЙ//data XML handler frame /* This frame handles the data provided via data XML method. Here, we do the following: 1. Parse the XML string provided to us and store it in _global.TxmlDataDoc XML Object 2. If any errors are present in the XML document, show the error. */ //Get the parsing data text var LPParsingDataText = getFirstValue(unescape(this.ParsingDataText), "Reading Data. Please Wait"); //Show the parsing data text createText(2, LPParsingDataText, _chartHorCenter, _chartVerCenter-(LPBarHeight/2), "Verdana", "10", LPBarTextColor, false, "center", "left", null, false); //Parse the XML data as string var strXMLData = new String(this.data); TxmlDataDoc.parseXML(strXMLData); //Check for the validity of the data if (TxmlDataDoc.status == 0) { //if it's valid, we move to the FDataLoadFinalize frame gotoAndPlay("FDataLoadFinalize"); } else { //However if the XML Data is not well-formed, Show an error showDataError("Invalid XML Data"); } €€€џџџ?џџŒcџк/* This frame is invoked when the XML data has been loaded - either via dataURL route or data XML method Here, we hide the progress bar, hide the loading text And finally, move the control to chart frame. */ if (LboolIsURLProvided) { //Delete onEnterFrame event (defined in case of dataURL) delete this.onEnterFrame; //Hide the progress bar (defined in case of dataURL) FIPB.erase(); } //Delete the text deleteText(2); //Move to the Chart scene gotoAndPlay("Chart", 1); €€ ActionsџџџџOџOџ€€€€џџџ?џџFdataLoadInitializeОT€€€џџџ?џџFdataURLHandler‚X€€€џџџ?џџFdataXMLHandlerОf€€€џџџ?џџFDataLoadFinalizeлC€€ LabelsџџџџџOOџ€€€€џџџ?џџMџt/* Scene Name: DataLoad =========================================================================== This entire scene acts as a preloader for the XML Data document. In this scene, we first check whether the XML data has been provided as an entire XML data string or only the URL of the XML provider has been given. Data can be provided to FusionCharts in 2 ways: 1. data way - The whole XML data is present in the HTML Page (Containing FusionCharts) - sort of an XML Island. 2. dataURL way - Only a URI (Uniform Resource Identifier) is provided to FusionCharts. The data source for this XML Data has been provided to us using the OBJECT/EMBED Method. Now, it's the job of FusionCharts to request XML data from that particular source. The parameter will be contained in _root.dataURL (data source URL) or _root.data (full XML data). So, first check what we've been provided with - the complete XML Data or just the data source URL. If it's the former, we parse the string and store it in our system (or display error message if the data contains an error). The actions contained in FdataXMLHandler help us do this. If it's the latter, we first filter the dataURL given to us and then we instantiate the loading of the XML document from that particular URL. Also, we show a preloader for this URL. External Includes in the scene: /CodeBase/FIDataLoad.as - Contains data loading functions. */€€ DescriptionџџџџO€џџ€€џџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџ FInitialize d€€ LabelsџџџџOџOџ€€€€џџџ?џџqxџє//-------------------------// //Chart Initialization here// //-------------------------// //Set the properties of Stage to enable dynamic re-sizing Stage.scaleMode = "noScale"; Stage.align = "TL"; //Set chart width & height LChartWidth = 650; LChartHeight = 350; //Include Global Functions #include "../CodeBase/FIGlobalFunctions.as" //Include Initialization scripts #include "../CodeBase/FIInit.as" //---------------------------------------------------------------------// //----------------- CHART MOVIE PRELOADER BEGINS HERE -----------------// //---------------------------------------------------------------------// /* The pre loader has a lot of cosmetic properties that can be defined. We allow the user to take control of all those properties by specifying certain variables below. Variables that the user can specify in the chart container: PBarHeight - Required height for the progress bar. PBarWidth - Required width for the progress bar. PBarBorderColor - Border color of the progress bar PBarBorderThickness - Border thickness of the progress bar PBarBgColor - Progress bar background color (fill color of the bar) PBarTextColor - Color of the text PBarLoadingText - The actual loading text to be displayed Define local variables to store cosmetic properties */ var LPBarHeight, LPBarWidth, LPBarBorderColor, LPBarBorderThickness, LPBarBgColor, LPBarTextColor, LPBarLoadingText; //Set Progress bar Height LPBarHeight = Number(getFirstValue(this.PBarHeight, "15")); /* Calculate the width of the progress bar :Explanation: How the width of the progress bar is being calculated? Basically, what we are aiming to do here is - Center align the progress bar elements with respect to the chart size. So, the width of the progress bar is set in such a way that is the chart width is greater than 200 pixels, the progress bar width will be 150 pixels. However, if the chart width is less than 200 pixels, then the progress bar width will be 25 pixels less than the chart width. */ LPBarWidth = (_chartWidth>200) ? 150 : (_chartWidth-25); //We also give the user an option to strong-enforce his own progress bar width value in case he wants something on his own. LPBarWidth = getFirstValue(this.PBarWidth, LPBarWidth); LPBarBorderColor = getFirstValue(this.PBarBorderColor, "E2E2E2"); LPBarBorderThickness = Number(getFirstValue(this.PBarBorderThickness, "1")); LPBarBgColor = getFirstValue(this.PBarBgColor, "E2E2E2"); LPBarTextColor = getFirstValue(this.PBarTextColor, "666666"); LPBarLoadingText = getFirstValue(unescape(this.PBarLoadingText), "Loading Chart. Please Wait"); //If the movie is already loaded (playing from local disk or cached), just send the control to DataLoad scene if (getBytesLoaded() == getBytesTotal()) { gotoAndPlay("DataLoad", 1); } else { //If the control is here, it means the movie isn't still loaded - so, we need to build up the preloader. //We now draw the progress bar at the center of the stage. To do this, we create an instance of the FIProgessBar class attachMovie("FIProgressBar", "FIPB", 1); FIPB.setLimits(0, getBytesTotal()); FIPB.setPosition(_chartHorCenter-(LPBarWidth/2), _chartVerCenter); FIPB.setSize(LPBarWidth, LPBarHeight); FIPB.setColors(LPBarBgColor, LPBarBorderColor); FIPB.setBorderThickness(LPBarBorderThickness); FIPB.setValue(getBytesLoaded()); FIPB.draw(); //Create the loading text createText(2, LPBarLoadingText, _chartHorCenter, _chartVerCenter-(LPBarHeight/2), "Verdana", "10", LPBarTextColor, false, "center", "left", null, false); //Create the preloader sequence this.onEnterFrame = function() { if (getBytesLoaded()h colResize.\Old_FI2_Gantt.fla colResizeuHp>Hюo>huHp>џџџџ€Symbol 3 FIProgressBarЭ‚B FIProgressBar.\Old_FI2_Gantt.fla FIProgressBarNАBЭ‚BNАBџџџџџџ CMediaBitsMedia 1 colReiszeˆ..\..\..\..\..\LAN Transfer\Documents and Settings\Administrator\Application Data\Macromedia\ПЊЗЂзЪСЯ-FLASH\tempСйЪБЮФМўМа\colresize.gifYGp>aGp>†џџџџ2Ш2XhhhhhџџџџРРРџxДџџџџќџџ CColorDefџ €џ €џ €3џPя €fџPя0 €™џPяH €ЬџPя` €џџPяx €3џя €33џ(я €3fџ<я0 €3™џCяH €3ЬџFя` €3џџHяx €fџя0 €f3џя0 €ffџ(я0 €f™џ5яH €fЬџ<я` €fџџ@яx €џ €333џ0 €џ €3џ я €33џxя €f3џdя0 €™3џ]яH €Ь3џZя` €џ3џXяx €33џШя €333џ0 €3f3џPPH €3™3џPx` €3Ь3џPx €3џ3џPя €f3џмя0 €f33џPH €ff3џ(PH €f™3џ<x` €fЬ3џCx €fџ3џFя €џ €fffџ` €џ €fџ я0 €3fџŒя0 €ffџxя0 €™fџkяH €Ьfџdя` €џfџ`яx €3fџДя0 €33fџ PH €3ffџxPH €3™fџdx` €3Ьfџ]x €3џfџZя €ffџШя0 €f3fџШPH €fffџ` €f™fџP0x €fЬfџPx €fџfџPяЈ €џ €™™™џ €џ €™џ яH €3™џ“яH €f™џ…яH €™™џxяH €Ь™џnя` €џ™џhяx €3™џ­яH €33™џ x` €3f™џŒx` €3™™џxx` €3Ь™џkx €3џ™џdя €f™џЛяH €f3™џДx` €ff™џ 0x €f™™џx0x €fЬ™џdx €fџ™џ]яЈ €џ €ЬЬЬџР €џ €Ьџ я` €3Ьџ–я` €fЬџŒя` €™Ьџ‚я` €ЬЬџxя` €џЬџpяx €3ЬџЊя` €33Ьџ x €3fЬџ“x €3™Ьџ…x €3ЬЬџxx €3џЬџnя €fЬџДя` €f3Ьџ­x €ffЬџ x €f™ЬџŒx €fЬЬџxx €fџЬџkяЈ €џ €џџџџ№ €џ €џџ яx €3џџ˜яx €fџџяx €™џџˆяx €Ьџџ€яx €џџџxяx €3џџЈяx €33џџ я €3fџџ–я €3™џџŒя €3Ьџџ‚я €3џџџxя €fџџАяx €f3џџЊя €ffџџ яЈ €f™џџ“яЈ €fЬџџ…яЈ €fџџџxяЈ €џ €џџяx €џ €™џяH €™3џ яH €™fџяH €™™џ(яH €™Ьџ2я` €™џџ8яx €Ьџя` €Ь3џ я` €Ьfџя` €Ь™џя` €ЬЬџ(я` €Ьџџ0яx €џџяx €џ3џяx €џfџяx €џ™џяx €џЬџ яx €џџџ(яx €џ €џџPяx €џ €™3џуяH €™33џx` €™f3џx` €™™3џ(x` €™Ь3џ5x €™џ3џ<я €Ь3џця` €Ь33џx €Ьf3џ x €Ь™3џx €ЬЬ3џ(x €Ьџ3џ2я €џ3џшяx €џ33џя €џf3џ я €џ™3џя €џЬ3џя €џџ3џ(я €џ €џџ яx €џ €™fџеяH €™3fџмx` €™ffџ0x €™™fџ(0x €™Ьfџ<x €™џfџCяЈ €Ьfџмя` €Ь3fџуx €Ьffџx €Ь™fџx €ЬЬfџ(x €Ьџfџ5яЈ €џfџряx €џ3fџця €џffџяЈ €џ™fџ яЈ €џЬfџяЈ €џџfџ(яЈ €џ €џџџ(яx €џ €™™џШяH €™3™џШx` €™f™џШ0x €™™™џ €™Ь™џPPЈ €™џ™џPяР €Ь™џвя` €Ь3™џеx €Ьf™џмx €Ь™™џPЈ €ЬЬ™џ(PЈ €Ьџ™џ<яР €џ™џияx €џ3™џмя €џf™џуяЈ €џ™™џяР €џЬ™џяР €џџ™џ(яР €џ €џџџxяx €џ €™ЬџОя` €™3ЬџЛx €™fЬџДx €™™Ьџ PЈ €™ЬЬџxPЈ €™џЬџdяР €ЬЬџШя` €Ь3ЬџШx €ЬfЬџШx €Ь™ЬџШPЈ €ЬЬЬџР €ЬџЬџPяи €џЬџаяx €џ3Ьџвя €џfЬџеяЈ €џ™ЬџмяР €џЬЬџяи €џџЬџ(яи €џ €џџџШяx €џ €™џџИяx €™3џџДя €™fџџ­яЈ €™™џџ яР €™ЬџџŒяР €™џџџxяР €ЬџџРяx €Ь3џџОя €ЬfџџЛяЈ €Ь™џџДяР €ЬЬџџ яи €Ьџџџxяи €џџџШяx €џ3џџШя €џfџџШяЈ €џ™џџШяР €џЬџџШяи €џџџџ№ €џ €џџџџџџџ €џџџџџџџ €џџџџџ €џџџџџ €џџџџџ €џf§џ`џџџџzџџџџ€™fџЊџЬџџџџџџ €џџџ*џџџ]џџџџџЊџџдџџџџџџџџh