DCR library is JavaScript library for the DCR graphs. It provides basic functionalities for loading the DCR graphs anywhere and use them, update them or create a new DCR graph with it. DCR library is utilizing jQuery library and XML to JSON App to easily manipulate the graph and its properties without those files DCR library will not work.

Kind: global {Intro}

<!doctype html>
	    <meta charset="utf-8">
	    <title>Demo App</title>
	    <script src="jquery.js"></script>
	    <script src="xml2json.js"></script>
	    <script src="DCR.js"></script>	
      // We can create Apps with the DCR library and can fill out the missing functionalities of DCR Library with these Apps.
		// Example plugin to display Events by Roles in list items fashion
		;(function (DCR) {
			DCR.fn.showEventsByRoles = function (reqContainer) {
				var outPut = '<ul>';
				for (var i = 0; i < this.Roles.length; i++) {
					var curRoleNEvents = this.getEventsByRole(this.Roles[i]);
					outPut += '<li>'+this.Roles[i]+'</li>';
						outPut += '<ul>';
						for (var j = 0; j < curRoleNEvents.length; j++) {
							outPut += '<li>'+curRoleNEvents[j].custom.label+'</li>';
						outPut += '</ul>';
				outPut += '</ul>';
      // Basic Demo application HTML structure and how to include the Library files:
		$(document).ready(function () {
	 		var myApp = new DCR();
			$('#loadGraph').on('click', function () {
				var fileXML = $('#xmlInput').val();
				if(fileXML==" " || fileXML == ""){
					alert('Invalid Input');
				// graph will reset first by default by this function just in case user clicks several time
				// so each time new graph is to be laoded properly
		<textarea id="xmlInput"></textarea>
		<input type="submit" id="loadGraph" value="Load DCR Graph" />
		<div id="result"></div>