//** Chart Class **// //Chart is the base object (root level) on which the whole charting model will be based _root.Chart = function() { //** Initialize the objects within this class **// //Chart.xmlDoc represents the complete XML data supplied to FusionCharts this.xmlDoc = new XML(); //Chart.group is an array which would be used to store the primary groups this.group = new Array(); //Chart.sGroup array would store the secondary group this.sGroup = 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(); //Params.numGroups indicates the number of groups passed to the graph this.Params.numGroups = 0; //Params.numSGroups stores the number of secondary groups passed to the the graph this.Parmas.numSGroups = 0; //Params.flgIsUrlProvided is a flag which indicates the mode in which the data was provided to the graph this.Params.flgIsUrlProvided = 1; //Constants.isLocal indicates the mode in which the graph is running - Local means no-cache this.Constants.isLocal = _root.Functions.getCorrectValue(_root.IsLocal, "0"); //Constants.defaultDataFile indicates the XML file to be searched by default when no data specification has been provided this.Constants.defaultDataFile = _root.Functions.getCorrectValue(_root.defaultDataFile, "Data.xml"); this.Constants.strLoadingMessage = _root.Functions.getCorrectValue(_root.strLoadingMessage, "Loading..."); this.Constants.strProcessingMessageHeading = _root.Functions.getCorrectValue(_root.strProcessingMessageHeading, "Loading Data"); this.Constants.strProcessingMessage = _root.Functions.getCorrectValue(_root.strProcessingMessage, "Please wait while the data is being loaded and processed. It will take just a moment."); this.Constants.strXMLErrorHeading = _root.Functions.getCorrectValue(_root.strXMLErrorHeading, "An error occurred"); this.Constants.strXMLErrorMessage = _root.Functions.getCorrectValue(_root.strXMLErrorMessage, "An error occurred while processing the data. Please refresh the page. If the error persists, please contact the webmaster."); this.Constants.preLoaderBorderColor = _root.Functions.formatHexColor(_root.Functions.getCorrectValue(_root.preLoaderBorderColor, "000080")); this.Constants.preLoaderBgColor = _root.Functions.formatHexColor(_root.Functions.getCorrectValue(_root.preLoaderBgColor, "ADADD1")); this.Constants.shadowDarkIntensity = Number(_root.Functions.getCorrectValue(_root.shadowDarkIntensity, 0.80)); this.Constants.shadowDarkerIntensity = Number(_root.Functions.getCorrectValue(_root.shadowDarkerIntensity, 0.65)); this.Constants.plotAreaWidth = Number(_root.Functions.getCorrectValue(_root.plotAreaWidth, 720)); this.Constants.plotAreaHeight = Number(_root.Functions.getCorrectValue(_root.plotAreaHeight, 540)); this.Constants.originX = Number(_root.Functions.getCorrectValue(_root.pieOriginX, 360)); this.Constants.originY = Number(_root.Functions.getCorrectValue(_root.pieOriginY, 270)); this.Constants.groupTbDistance = Number(_root.Functions.getCorrectValue(_root.groupTbDistance, 50)); this.Constants.sectionTbDistance = Number(_root.Functions.getCorrectValue(_root.sectionTbDistance, 20)); }; //** Nested Objects **// Chart.sectionItem = function(sectionLabel, sectionValue, sectionColor, sectionLink, sectionHoverCapText) { //Chart.sectionItem indicates an object which is gonna contain the data for a particular section this.label = sectionLabel; this.value = sectionValue; this.color = sectionColor; this.link = sectionLink; this.hoverCapText = sectionHoverCapText; this.radius = 0; this.startAngle = 0; this.endAngle = 0; //Position of the label textbox this.labelTbX = 0; this.labelTbY = 0; }; Chart.secSectionItem = function(sectionValue) { //Chart.secSectionItem indicates an object which is gonna contain the data for a secondary section this.value = sectionValue; this.startPointX = 0; this.startPointY = 0; this.endPointX = 0; this.endPointY = 0; this.showLine = true; }; Chart.groupParams = function() { //An invisible object used to store the group attributes }; //** Methods **// Chart.prototype.loadData = function() { //This method is used to load the XML data provided either via dataUrl way or the dataXML way //We intend to create a request for the XML Document(from the server/local disk) //The data source for this XML Data has been provided to us using the OBJECT/EMBED Method //i.e, the data source URL will be contained in _root.dataurl or _root.dataXML //We copy the contents of _root.dataurl into a variable called xmldocurl //We use var to indicate method scope variabales here var xmlDocUrl = _root.dataUrl; //Now we set a flag to indicate whether it was the data url that was provided to us or the complete data xml //By default, it's set to 1, which indicates that the data URL has been provided to us var flgIsUrlProvided = 1; //Now if no data source/data xml has been provided, we simply set the Data Source to the default Data URL if (xmlDocUrl.length<1) { if (_root.dataXml == "" || _root.dataXml == null || _root.dataXml == undefined) { //Set the default XML data doc to the one specified in Constants objects xmlDocUrl = this.Constants.defaultDataFile; } else { //flgIsUrlProvided 2 means that we have been provided the complete XML data flgIsUrlProvided = 2; } } //---------------------------------------------// //Now, if the data URL has been provided, we replace the * in the data url that we had passed from the server side script. //** Filtering process **// if (flgIsUrlProvided == 1) { xmlDocUrl = new String(xmlDocUrl); var arrUrl = new Array(); arrUrl = xmlDocUrl.split("*"); var finUrl = ""; for (loopvar=0; loopvar and elements levelTwoNodes = levelOneNodes[i].childNodes; for (j=0; j<=levelTwoNodes.length; j++) { //If its a primary data node if (levelTwoNodes[j].nodeName.toUpperCase() == "PRIMARY") { levelThreeNodes = levelTwoNodes[j].childNodes; //Now search for all Nodes for (k=0; k<=levelThreeNodes.length; k++) { if (levelThreeNodes[k].nodeName.toUpperCase() == "GROUP") { //If it's a group node //First, incremenet the count this.Params.numGroups++; //Now, extract the attributes of each this.group[this.Params.numGroups] = new Chart.groupParams(); this.group[this.Params.numGroups].label = levelThreeNodes[k].attributes.label; this.group[this.Params.numGroups].color = _root.Functions.formatHexColor(levelThreeNodes[k].attributes.color, "FF5904"); this.group[this.Params.numGroups].showSectionLabels = Number(_root.Functions.getCorrectValue(levelThreeNodes[k].attributes.showSectionLabels, this.Params.showSectionLabels)); //Now get a reference to the section nodes. sectionNode = levelThreeNodes[k].childNodes; //Now, create a data array and assign it this.group[this.Params.numGroups].section = new Array(); //A counter variable var counter = 0; //Iterate through each section node one by one for (l=0; l<=sectionNode.length; l++) { if (sectionNode[l].nodeName.toUpperCase() == "SECTION") { //Increment the counter counter++; //Get the data var sectionLabel = sectionNode[l].attributes.label; var sectionValue = Number(_root.Functions.getCorrectValue(sectionNode[l].attributes.value, "0")); var sectionColor = _root.Functions.formatHexColor(_root.Functions.getCorrectValue(sectionNode[l].attributes.color, this.group[this.Params.numGroups].color)); var sectionLink = sectionNode[l].attributes.link; var sectionHoverCapText = _root.Functions.getCorrectValue(sectionNode[l].attributes.hoverCapText, this.group[this.Params.numGroups].label+this.Params.hoverCapSepChar+sectionLabel+this.Params.hoverCapSepChar+this.Params.numberPrefix+sectionValue+this.Params.numberSuffix); //Create an object to represent it this.group[this.Params.numGroups].section[counter] = new Chart.sectionItem(sectionLabel, sectionValue, sectionColor, sectionLink, sectionHoverCapText); } } this.group[this.Params.numGroups].numSections = counter; } } //Free memory resource delete sectionNode; } else if (levelTwoNodes[j].nodeName.toUpperCase() == "SECONDARY") { //Get a reference to the child nodes levelThreeNodes = levelTwoNodes[j].childNodes; //iterate through each of them to get the group node. for (k=0; k<=levelThreeNodes.length; k++) { if (levelThreeNodes[k].nodeName.toUpperCase() == "GROUP") { //If it's a group node //First, incremenet the count this.Params.numSGroups++; //Now, create a data array and assign it this.sgroup[this.Params.numSGroups] = new Chart.groupParams(); this.sGroup[this.Params.numSGroups].section = new Array(); //A counter variable var counter = 0; //SectionNode sectionNode = levelThreeNodes[k].childNodes; //Iterate through each section node one by one for (l=0; l<=sectionNode.length; l++) { if (sectionNode[l].nodeName.toUpperCase() == "SECTION") { //Increment the counter counter++; //Get the data var sectionValue = Number(_root.Functions.getCorrectValue(sectionNode[l].attributes.value, "0")); //Create an object to represent it this.sGroup[this.Params.numSGroups].section[counter] = new Chart.secSectionItem(sectionValue); } } } } //Free memory resource delete sectionNode; } } } } //Now, remove the unwanted data/objects from memory delete levelThreeNodes; delete levelTwoNodes; delete levelOneNodes; //Call the function to calculate the co-ordinates this.calcPoints(); }; Chart.prototype.getValueInPixels = function(value) { //This method returns the value in pixels of a particular section var pixelValue; pixelValue = this.Params.innerRadius+(value/100)*(this.Params.outerRadius-this.Params.innerRadius); //Return the value return pixelValue; }; Chart.prototype.calcPoints = function() { //This function calculates the various point and co-ordinates aspects //First, we calculate the angle to be swept by each group this.Params.anglePerGroup = (360/this.Params.numGroups); //Now, we calculate the angle to be swept by each section in a particular group for (i=1; i<=this.Params.numGroups; i++) { this.group[i].anglePerSegment = this.Params.anglePerGroup/this.group[i].numSections; } //Now calculate the start angle, end angle, radius etc of each wedge var startAngle = 450; for (i=1; i<=this.Params.numGroups; i++) { for (j=1; j<=this.group[i].numSections; j++) { //Set the start angle this.group[i].section[j].startAngle = startAngle; //Calculate the end angle startAngle = startAngle-this.group[i].anglePerSegment; //Set the end angle this.group[i].section[j].endAngle = startAngle; //Calculate the radius. this.group[i].section[j].radius = this.getValueInPixels(this.group[i].section[j].value); } } //Calculate the points pertaining to sGroup var angle, xPos, yPos, counter; counter = 0; //First, fill in for the blank values for (i=1; i<=this.Params.numGroups; i++) { //If the secondary group matching to the primary group does not exist //then create a place holder for the group first if (this.sGroup[i] == null || this.sGroup[i] == undefined) { this.sgroup[i] = new Chart.groupParams(); this.sGroup[i].section = new Array(); } for (j=1; j<=this.group[i].numSections; j++) { //Now, if a secondary group section matching to a primary group section does not exists //Create an empty section with value as 0. if (this.sGroup[i].section[j].value == null || this.sGroup[i].section[j].value == undefined) { //If a secondary section is missing, then create it. this.sGroup[i].section[j] = new Chart.secSectionItem(0); this.sGroup[i].section[j].showLine = false; } //Now, calculate the x and y position of the start point angle = this.group[i].section[j].startAngle*(Math.PI/180); xPos = (this.Constants.originX+this.getValueInPixels(this.sGroup[i].section[j].value)*Math.cos(angle)); yPos = (this.Constants.originY-this.getValueInPixels(this.sGroup[i].section[j].value)*Math.sin(angle)); //Assign them this.sGroup[i].section[j].startPointX = xPos; this.sGroup[i].section[j].startPointY = yPos; //Now, calculate the x and y position of the end point angle = this.group[i].section[j].endAngle*(Math.PI/180); xPos = (this.Constants.originX+this.getValueInPixels(this.sGroup[i].section[j].value)*Math.cos(angle)); yPos = (this.Constants.originY-this.getValueInPixels(this.sGroup[i].section[j].value)*Math.sin(angle)); //Assign them this.sGroup[i].section[j].endPointX = xPos; this.sGroup[i].section[j].endPointY = yPos; } } }; Chart.prototype.setBackground = function() { //This function sets the background clrbg = new Color("MovBg"); clrbg.setRGB(parseInt(this.Params.bgColor, 16)); }; Chart.prototype.loadBackground = function() { //This function loads the background swf if (this.Params.bgSWF != "") { MovBgHolder.loadMovie(this.Params.bgSWF); } // *** Note *** //Setting the visible property of MovBgHolder to false wont hide the skin //We need to set its alpha to 0 in order to hide it }; Chart.prototype.renderCanvas = function() { //This function renders the canvas base and sets its color //Set the radius setProperty("MovCanvas", _width, this.Params.outerRadius*2); setProperty("MovCanvas", _height, this.Params.outerRadius*2); //Set the center setProperty("MovCanvas", _x, this.Constants.originX); setProperty("MovCanvas", _y, this.Constants.originY); //Set the colors clrCanvas = new Color("MovCanvas.Border"); clrCanvas.setRGB(parseInt(this.Params.canvasBorderColor, 16)); clrCanvas = new Color("MovCanvas.Bg"); clrCanvas.setRGB(parseInt(this.Params.canvasBgColor, 16)); //Set the canvas shadow //Set the radius setProperty("MovCanvasShadow", _width, this.Params.outerRadius*2); setProperty("MovCanvasShadow", _height, this.Params.outerRadius*2); //Set the center setProperty("MovCanvasShadow", _x, this.Constants.originX+this.Params.canvasShadowXOffset); setProperty("MovCanvasShadow", _y, this.Constants.originY+this.Params.canvasShadowYOffset); //Set shadow alpha setProperty("MovCanvasShadow", _alpha, this.Params.canvasShadowAlpha); //Color clrCanvas = new Color("MovCanvasShadow"); clrCanvas.setRGB(parseInt(this.Params.canvasShadowColor, 16)); }; Chart.prototype.renderCenterCircle = function() { //This function renders the center circle and sets its color //Set the radius setProperty("MovCenterCircle", _width, this.Params.innerRadius*2); setProperty("MovCenterCircle", _height, this.Params.innerRadius*2); //Set the center setProperty("MovCenterCircle", _x, this.Constants.originX); setProperty("MovCenterCircle", _y, this.Constants.originY); //Set the colors clrCanvas = new Color("MovCenterCircle.Border"); clrCanvas.setRGB(parseInt(this.Params.centerCircleBorder, 16)); clrCanvas = new Color("MovCenterCircle.Bg"); clrCanvas.setRGB(parseInt(this.Params.centerCircleBg, 16)); }; Chart.prototype.renderDivLines = function() { //This function renders the circular div lines //Iterate through numCircularDivLines for (i=1; i<=this.Params.numCircularDivLines; i++) { //First, duplicate the movie Clip MovDivLine duplicateMovieClip("MovDivLine", "MovDivLine"+i, 6500+i); //Calculate the percent value of the div line var percentValue = (100/(this.Params.numCircularDivLines+1))*i; var radius = this.getValueInPixels(percentValue); //Set the radius setProperty("MovDivLine"+i, _width, radius*2); setProperty("MovDivLine"+i, _height, radius*2); //Set its color clrDivLine = new Color("MovDivLine"+i); clrDivLine.setRGB(parseInt(this.Params.CircularDivLinesColor, 16)); } //Hide the base div line setProperty("MovDivLine", _visible, false); }; Chart.prototype.renderGroupDivLines = function() { //This function renders the group divisional lines //This will be rendered only if groups>1 if (this.Params.numGroups>1) { for (i=1; i<=this.Params.numGroups; i++) { //Duplicate MovGSDivLine duplicateMovieClip("MovGSDivLine", "MovGSDivLine"+i, 6000+i); //Set the width setProperty("MovGSDivLine"+i, _width, this.Params.outerRadius); //Set its center co-ordinates setProperty("MovGSDivLine"+i, _x, this.Constants.originX); setProperty("MovGSDivLine"+i, _y, this.Constants.originY); //Set its height setProperty("MovGSDivLine"+i, _height, this.Params.groupDivLineThickness); //Set its color clrDivLine = new Color("MovGSDivLine"+i); clrDivLine.setRGB(parseInt(this.Params.groupDivLineColor, 16)); //Set the rotation setProperty("MovGSDivLine"+i, _rotation, -(this.group[i].section[1].startAngle)); } } }; Chart.prototype.renderSectionDivLines = function() { //This function renders the section divisional lines for (i=1; i<=this.Params.numGroups; i++) { for (j=1; j<=this.group[i].numSections; j++) { //Calculate the duplication level var dupLevel = 5000+((i-1)*200)+j; //Duplicate MovGSDivLine duplicateMovieClip("MovGSDivLine", "MovSDivLine"+dupLevel, 3000+dupLevel); //Set the width setProperty("MovSDivLine"+dupLevel, _width, this.Params.outerRadius); //Set its center co-ordinates setProperty("MovSDivLine"+dupLevel, _x, this.Constants.originX); setProperty("MovSDivLine"+dupLevel, _y, this.Constants.originY); //Set its height setProperty("MovSDivLine"+dupLevel, _height, this.Params.sectionDivLineThickness); //Set its color clrDivLine = new Color("MovSDivLine"+dupLevel); clrDivLine.setRGB(parseInt(this.Params.sectionDivLineColor, 16)); //Set the rotation setProperty("MovSDivLine"+dupLevel, _rotation, -(this.group[i].section[j].startAngle)); } } //Hide the base line setProperty("MovGSDivLine", _visible, false); }; Chart.prototype.setLabels = function() { //This function sets the text of various chart text boxes MovCenterLabel.tbCenterLabel = this.generateHTML("center", true, this.Params.baseFont, Number(this.Params.BaseFontSize)+2, this.Params.baseFontColor, this.Params.centerLabel); }; Chart.prototype.renderGroupLabels = function() { //This function renders all the group labels if it's to be displayed. if (this.Params.showGroupLabels == 1 && this.Params.numGroups>1) { var bisectorAngle, labelTbX, labelTbY; for (i=1; i<=this.Params.numGroups; i++) { //Calculate the bisector angle where the label will be displayed. bisectorAngle = (this.group[i].section[1].startAngle+(this.group[i].section[this.group[i].numSections].endAngle-this.group[i].section[1].startAngle)/2)*(Math.PI/180); //Calculate the x and y positions of the group label textbox labelTbX = (this.Constants.originX+(this.Params.outerRadius+this.Constants.groupTbDistance)*Math.cos(bisectorAngle)); labelTbY = (this.Constants.originY-(this.Params.outerRadius+this.Constants.groupTbDistance)*Math.sin(bisectorAngle)); //Now duplicate the movie clip MovGrpLabel and set its value property duplicateMovieClip("MovGrpLabel", "MovGrpLabel"+i, 6600+i); //Set it's x and y co-ordinate setProperty("MovGrpLabel"+i, _x, labelTbX); setProperty("MovGrpLabel"+i, _y, labelTbY); //Set value set("MovGrpLabel"+i+".value", this.generateHTML("center", true, this.Params.groupNameFont, this.Params.groupNameFontSize, this.Params.groupNameFontColor, this.group[i].label)); } } }; Chart.prototype.renderSectionLabels = function() { //This function renders the section labels var levelCounter = 0; var bisectorAngle, labelTbX, labelTbY; //Iterate through all groups for (i=1; i<=this.Params.numGroups; i++) { //if the section label for this group is to be displayed //then iterate through all sections if (this.group[i].showSectionLabels == 1) { for (j=1; j<=this.group[i].numSections; j++) { //Increment the counter var levelCounter++; //Calculate the bisector angle where the label will be displayed. bisectorAngle = (this.group[i].section[j].startAngle+(this.group[i].section[j].endAngle-this.group[i].section[j].startAngle)/2)*(Math.PI/180); //Calculate the x and y positions of the group label textbox labelTbX = (this.Constants.originX+(this.Params.outerRadius+this.Constants.sectionTbDistance)*Math.cos(bisectorAngle)); labelTbY = (this.Constants.originY-(this.Params.outerRadius+this.Constants.sectionTbDistance)*Math.sin(bisectorAngle)); //Now duplicate the movie clip MovGrpLabel and set its value property duplicateMovieClip("MovSecLabel", "MovSecLabel"+levelCounter, 7000+levelCounter); //Set it's x and y co-ordinate setProperty("MovSecLabel"+levelCounter, _x, labelTbX); setProperty("MovSecLabel"+levelCounter, _y, labelTbY); //Set value set("MovSecLabel"+levelCounter+".value", this.generateHTML("center", true, this.Params.labelNameFont, this.Params.labelNameFontSize, this.Params.labelNameFontColor, this.group[i].section[j].label)); } } } // }; Chart.prototype.renderSecData = function() { //This function renders the secondary data set //The secondary data set will only be rendered if numSGroups>0 if (this.Params.numSGroups>0) { //Create a place holder for the line movSec = _root.createEmptyMovieClip("MovSecData", 21000); //Set the line style movSec.lineStyle(this.Params.secondaryDataLineThickness, parseInt(this.Params.secondaryDataLineColor, 16), this.Params.secondaryDataLineAlpha); //Iterate through all items in the sGroup to render for (i=1; i<=this.Params.numGroups; i++) { for (j=0; j<=this.group[i].numSections; j++) { //If the line of this group is to be shown if (this.sGroup[i].section[j].showLine) { //Move the pointer to start Point movSec.moveTo(this.sGroup[i].section[j].startPointX, this.sGroup[i].section[j].startPointY); //Line from start point to end point movSec.lineTo(this.sGroup[i].section[j].endPointX, this.sGroup[i].section[j].endPointY); //If last item if (j == this.group[i].numSections) { if (i == this.Params.numGroups) { movSec.lineTo(this.sGroup[1].section[1].startPointX, this.sGroup[1].section[1].startPointY); } else { movSec.lineTo(this.sGroup[i+1].section[1].startPointX, this.sGroup[i+1].section[1].startPointY); } } else { //Line from end point to the start point of next point movSec.lineTo(this.sGroup[i].section[j+1].startPointX, this.sGroup[i].section[j+1].startPointY); } } } } delete movSec; } }; 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("hoverCaption", 28001, 0, 0, w, h); hoverCaption._visible = true; } }; Chart.prototype.setHoverCap = function(groupIndex, sectionIndex) { //This function sets the position and the text values //of the hover caption box with index as the passed index if (this.Params.showHoverCap == 1) { //If hover cap is to be shown. //Create a new text-format var tf = new TextFormat(); tf.align = "center"; tf.color = this.Params.BaseFontColor; tf.font = this.Params.BaseFont; tf.size = this.Params.BaseFontSize; tf.leftMargin = 0; tf.rightMargin = 0; //First make it visible. hoverCaption._visible = true; //Set its text hoverCaption.htmlText = this.group[groupIndex].section[sectionIndex].hoverCapText; hoverCaption.setTextFormat(tf); hoverCaption.autoSize = true; hoverCaption.border = true; hoverCaption.borderColor = parseInt(this.Params.hoverCapBorder, 16); hoverCaption.background = true; hoverCaption.backgroundColor = parseInt(this.Params.hoverCapBg, 16); hoverCaption.html = true; hoverCaption.multiline = true; hoverCaption.selectable = false; hoverCaption.tabEnabled = false; hoverCaption.type = "dynamic"; hoverCaption.wordWrap = false; //Set its x pos to the current x mouse pos hoverCaption._x = _xmouse - (hoverCaption._width/2); //Set its y pos to the current y mouse pos hoverCaption._y = _ymouse-20; } }; Chart.prototype.removeHoverCap = function() { //This function hides the hover caption hoverCaption._visible = false; }; Chart.prototype.resetPositionHoverCap = function() { //This function re-sets the x and y co-ordinate of the Hover Cap Box //Set the x position hoverCaption._x = _xmouse - (hoverCaption._width/2); //Set the y-position hoverCaption._y = _ymouse-20; }; Chart.prototype.navigateToUrl = function(groupIndex, sectionIndex) { //This function navigates to a URL when a column is clicked on the chart. var linkToNav = this.group[groupIndex].section[sectionIndex].link; 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.generateHTML = function(alignPosition, isBold, fontFace, fontSize, fontColor, strText) { //This function generates the HTML code for text based on the parameters passed to it var strHTML; //Generate

tags strHTML = "

"; //Render starting tags if applicable if (isBold) { strHTML = strHTML+""; } //Generate the actual tag strHTML = strHTML+""+strText+""; //Render closing tags if applicable if (isBold) { strHTML = strHTML+""; } //Render closing

tags strHTML = strHTML+"

"; //return the value return strHTML; }; //****** LEVELs *******// //Canvas - 10 //Wedges - 1001 - 5000 //Section Division Lines - 5001 - 3000 //Group Division Lines - 6001-3500 //Circular Divisional Lines - 6501 - 6600 //Group Labels - 6601-7000 //Section Labels - 7000-10000 //Center Circle - 20001 //Center Circle Label - 20002 //Secondary data - 21000 //Div Lines - 5 to 99 -- has to be at the bottom that's why //Zero Plane Text - 27001 //Hover Caption Box - 28001 -- Needs to be at the top //****** ----- *******//