{"id":0,"registry":{"0":{"shape":{"__isSmartRef__":true,"id":1},"submorphs":[{"__isSmartRef__":true,"id":2}],"scripts":[],"_ClipMode":"visible","derivationIds":["AB2CD9B1-B8A7-488A-8677-EF55AEBC35C7","E6003058-4623-47B9-84B3-2455E1235474","9668B417-0690-4B52-8E2F-8024C3EEF8DD","947F0AB2-E2E5-44F1-BC34-480B220A8931"],"id":"0F31FF6F-5B8A-401A-ACF5-FBCEC8F68510","droppingEnabled":true,"halosEnabled":true,"_StyleClassNames":["Morph","HtmlWrapperMorph","selectable"],"name":"InputGraph","eventHandler":{"__isSmartRef__":true,"id":17},"layout":{"__isSmartRef__":true,"id":18},"showsHalos":false,"isBeingDragged":false,"prevScroll":[0,0],"_StyleSheet":{"__isSmartRef__":true,"id":19},"canvasId":"d3-9668B41706904B528E2F8024C3EEF8DD","partsBinMetaInfo":{"__isSmartRef__":true,"id":40},"data":[{"__isSmartRef__":true,"id":45},{"__isSmartRef__":true,"id":46},{"__isSmartRef__":true,"id":47},{"__isSmartRef__":true,"id":48},{"__isSmartRef__":true,"id":49},{"__isSmartRef__":true,"id":50},{"__isSmartRef__":true,"id":51},{"__isSmartRef__":true,"id":52},{"__isSmartRef__":true,"id":53},{"__isSmartRef__":true,"id":54},{"__isSmartRef__":true,"id":55}],"_Rotation":0,"_Scale":1,"__serializedExpressions__":["_Position","distanceToDragEvent"],"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":56},"__LivelyClassName__":"lively.morphic.HtmlWrapperMorph","__SourceModuleName__":"Global.lively.morphic.AdditionalMorphs","_Position":"lively.pt(0.0,0.0)","distanceToDragEvent":"lively.pt(672.0,-13.0)"},"1":{"_BorderWidth":0,"stringifiedShapeNode":"<div xmlns=\"http://www.w3.org/1999/xhtml\" data-lively-morphid=\"0F31FF6F-5B8A-401A-ACF5-FBCEC8F68510\" class=\"Morph HtmlWrapperMorph selectable\" id=\"null\" style=\"overflow: visible; border: 0px solid rgb(95, 94, 95); padding: 0px; width: 467px; height: 177px; position: absolute; left: 0px; top: 0px; background-color: rgb(255, 255, 255);\"><div id=\"d3-9668B41706904B528E2F8024C3EEF8DD\"></div><div data-lively-node-type=\"origin-node\" style=\"top: 0px !important; left: 0px !important; position: absolute !important; margin-top: 0px !important; margin-left: 0px !important;\"><div class=\"morphNode\" touch-action=\"none\" data-lively-node-type=\"morph-node\" style=\"position: absolute; left: -2px; top: 468px;\"><div id=\"null\" class=\"Morph Text\" data-lively-morphid=\"C89EC2CF-C283-43A2-9674-8FDDF99E1513\" style=\"position: absolute; left: 0px; top: 0px; width: 327.7px; height: 20px; opacity: 1; border: 2.072px solid rgb(0, 0, 0); padding: 2px 4px; border-top-left-radius: 2.22px; border-top-right-radius: 2.22px; border-bottom-right-radius: 2.22px; border-bottom-left-radius: 2.22px; overflow: visible; background: rgb(255, 255, 255);\"><div class=\"visibleSelection\" tabindex=\"-1\" contenteditable=\"true\" style=\"position: absolute; word-wrap: break-word; font-size: 14pt; font-family: Arial, sans-serif; white-space: pre-wrap; color: rgb(0, 0, 0); word-break: normal; min-width: calc(100% - 8px);\"><span id=\"_100\">Some Text</span></div></div></div></div><div data-lively-node-type=\"origin-node\" style=\"top: 0px !important; left: 0px !important; position: absolute !important; margin-top: 0px !important; margin-left: 0px !important;\"><div class=\"morphNode\" touch-action=\"none\" data-lively-node-type=\"morph-node\" style=\"position: absolute; left: -2px; top: 468px;\"><div id=\"null\" class=\"Morph Text\" data-lively-morphid=\"C89EC2CF-C283-43A2-9674-8FDDF99E1513\" style=\"position: absolute; left: 0px; top: 0px; width: 446.7px; height: 24.144px; opacity: 1; border: 2.072px solid rgb(0, 0, 0); padding: 2px 4px; border-top-left-radius: 2.22px; border-top-right-radius: 2.22px; border-bottom-right-radius: 2.22px; border-bottom-left-radius: 2.22px; overflow: visible; background: rgb(255, 255, 255);\"><div class=\"visibleSelection\" tabindex=\"-1\" contenteditable=\"true\" style=\"position: absolute; word-wrap: break-word; font-size: 14pt; font-family: Arial, sans-serif; white-space: pre-wrap; color: rgb(0, 0, 0); word-break: normal; min-width: calc(100% - 8px);\"><span id=\"_100\">http://142.104.17.134:10002<br /></span></div></div></div></div><div data-lively-node-type=\"origin-node\" style=\"top: 0px !important; left: 0px !important; position: absolute !important; margin-top: 0px !important; margin-left: 0px !important;\"><div class=\"morphNode\" touch-action=\"none\" data-lively-node-type=\"morph-node\" style=\"position: absolute; left: -2px; top: 183px;\"><div id=\"null\" class=\"Morph Text\" data-lively-morphid=\"C89EC2CF-C283-43A2-9674-8FDDF99E1513\" style=\"position: absolute; left: 0px; top: 0px; width: 446.7px; height: 24.144px; opacity: 1; border: 2.072px solid rgb(0, 0, 0); padding: 2px 4px; border-top-left-radius: 2.22px; border-top-right-radius: 2.22px; border-bottom-right-radius: 2.22px; border-bottom-left-radius: 2.22px; overflow: visible; background: rgb(255, 255, 255);\"><div class=\"visibleSelection\" tabindex=\"-1\" contenteditable=\"true\" style=\"position: absolute; word-wrap: break-word; font-size: 14pt; font-family: Arial, sans-serif; white-space: pre-wrap; color: rgb(0, 0, 0); word-break: normal; min-width: calc(100% - 8px);\"><span id=\"_100\">http://142.104.17.134:10002<br /></span></div></div></div></div></div>","__serializedExpressions__":["_Padding","_BorderColor","_Fill","_Position","_Extent","extent"],"__LivelyClassName__":"lively.morphic.Shapes.External","__SourceModuleName__":"Global.lively.morphic.Shapes","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(95,94,95)","_Fill":"Color.rgb(255,255,255)","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(467.0,177.0)","extent":"lively.pt(467.0,177.0)"},"2":{"submorphs":[],"scripts":[],"id":"C89EC2CF-C283-43A2-9674-8FDDF99E1513","shape":{"__isSmartRef__":true,"id":3},"grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"fixedWidth":true,"fixedHeight":false,"allowsInput":true,"_FontFamily":"Arial, sans-serif","registeredForMouseEvents":true,"_MaxTextWidth":120.695652,"_MaxTextHeight":null,"showsHalos":false,"_FontSize":14,"name":"IP_address","partsBinMetaInfo":{"__isSmartRef__":true,"id":4},"textChunks":[{"__isSmartRef__":true,"id":13}],"charsReplaced":"Some Text","lastFindLoc":36,"prevScroll":[0,0],"eventHandler":{"__isSmartRef__":true,"id":15},"_ClipMode":"visible","derivationIds":[355,"1EB1674F-8BF2-419B-B054-86129ED70335","63698904-DC05-4341-A9B6-5CC4A219CD04","F6A714BA-4735-41ED-8A2A-45CB153FBDF8","F1D26890-7392-487D-B5DE-97C772B4E79E","59440FC5-E676-4B9B-A828-C150A05765C0"],"_WhiteSpaceHandling":"pre-wrap","_MinTextWidth":120.695652,"_MinTextHeight":null,"previousSelection":[21,21],"isBeingDragged":false,"moved":true,"layout":{"__isSmartRef__":true,"id":16},"owner":{"__isSmartRef__":true,"id":0},"_Rotation":0,"_Scale":1,"__serializedExpressions__":["_Position","textColor","_Padding","distanceToDragEvent"],"__LivelyClassName__":"lively.morphic.Text","__SourceModuleName__":"Global.lively.morphic.TextCore","_Position":"lively.pt(-2.0,183.0)","textColor":"Color.rgb(0,0,0)","_Padding":"lively.rect(5,5,0,0)","distanceToDragEvent":"lively.pt(312.0,-21.0)"},"3":{"fill":null,"_BorderWidth":2.072,"_ClipMode":"visible","_BorderRadius":2.22,"_Opacity":1,"_BorderStyle":"solid","_AppearanceStylingMode":false,"_BorderStylingMode":false,"__serializedExpressions__":["_Fill","_Position","_Extent","_BorderColor","_Padding"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Fill":"Color.rgb(255,255,255)","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(458.7,32.1)","_BorderColor":"Color.rgb(0,0,0)","_Padding":"lively.rect(4,2,0,0)"},"4":{"partsSpaceName":"PartsBin/Basic","migrationLevel":8,"comment":"a simple text morph","partName":"Text","changes":[{"__isSmartRef__":true,"id":5},{"__isSmartRef__":true,"id":6},{"__isSmartRef__":true,"id":7},{"__isSmartRef__":true,"id":8},{"__isSmartRef__":true,"id":9},{"__isSmartRef__":true,"id":10},{"__isSmartRef__":true,"id":11},{"__isSmartRef__":true,"id":12}],"__serializedExpressions__":["lastModifiedDate"],"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin","lastModifiedDate":"new Date(\"Sat Apr 05 2014 01:51:52 GMT-0700 (Pacific Daylight Time)\")"},"5":{"author":"jenslincke","message":"no comment","id":"A3BA0C1E-7E83-43BF-9EC6-4F4BB3835D62","__serializedExpressions__":["date"],"date":"new Date(\"Tue Mar 12 2013 09:31:56 GMT-0700 (Pacific Daylight Time)\")"},"6":{"author":"timfelgentreff","message":"better text","id":"B904F9AC-6EA0-4A8A-83C9-AFC85AADC194","__serializedExpressions__":["date"],"date":"new Date(\"Tue May 08 2012 05:18:18 GMT-0700 (Pacific Daylight Time)\")"},"7":{"author":"tessi","message":"TextBubble calls its disappear() function after showBubbleTime() milliseconds now","id":"785D95BD-7858-43EB-90E6-A1C085E2F2B9","__serializedExpressions__":["date"],"date":"new Date(\"Fri Apr 20 2012 22:32:09 GMT-0700 (Pacific Daylight Time)\")"},"8":{"author":"tessi","message":"TextBubble calls its disappear() function after showBubbleTime() milliseconds now","id":"0F4DE333-A551-4961-B29D-70270977EBEF","__serializedExpressions__":["date"],"date":"new Date(\"Fri Apr 20 2012 22:31:43 GMT-0700 (Pacific Daylight Time)\")"},"9":{"author":"undefined","message":"Set the inset as: this.setPadding(Rectangle.inset(4,2)).  This gives it a more pleasing appearance with a border, and also makes it easier to select near the bounds.","id":"BD5B0E4C-4830-4863-A013-35BB66D5AD6F","__serializedExpressions__":["date"],"date":"new Date(\"Sun Feb 26 2012 21:20:38 GMT-0800 (Pacific Standard Time)\")"},"10":{"author":"robertkrahn","message":"text click was broken?","id":"9D065E14-9653-4B2A-9A2E-3AD84EBBC3E0","__serializedExpressions__":["date"],"date":"new Date(\"Sat Apr 21 2012 07:30:30 GMT-0700 (Pacific Daylight Time)\")"},"11":{"author":"jenslincke","message":"no comment","id":"9E495E1B-6E6D-4A89-9F9E-85AF618DC598","__serializedExpressions__":["date"],"date":"new Date(\"Tue Mar 12 2013 10:36:22 GMT-0700 (Pacific Daylight Time)\")"},"12":{"author":"robertkrahn","message":"resizeWidth = true","id":"E402462A-7AB2-487B-82BD-A3369C1C1F75","__serializedExpressions__":["date"],"date":"new Date(\"Sat Apr 05 2014 01:58:52 GMT-0700 (Pacific Daylight Time)\")"},"13":{"style":{"__isSmartRef__":true,"id":14},"morph":{"__isSmartRef__":true,"id":2},"chunkOwner":{"__isSmartRef__":true,"id":2},"storedString":"http://142.104.17.134:10002","_id":"_100","__LivelyClassName__":"lively.morphic.TextChunk","__SourceModuleName__":"Global.lively.morphic.TextCore"},"14":{"__LivelyClassName__":"lively.morphic.TextEmphasis","__SourceModuleName__":"Global.lively.morphic.TextCore"},"15":{"morph":{"__isSmartRef__":true,"id":2},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"16":{"resizeWidth":true},"17":{"morph":{"__isSmartRef__":true,"id":0},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"18":{"resizeWidth":true,"resizeHeight":true},"19":{"rules":[{"__isSmartRef__":true,"id":20},{"__isSmartRef__":true,"id":23},{"__isSmartRef__":true,"id":27},{"__isSmartRef__":true,"id":29},{"__isSmartRef__":true,"id":33},{"__isSmartRef__":true,"id":35},{"__isSmartRef__":true,"id":37}],"originMorph":{"__isSmartRef__":true,"id":0},"__LivelyClassName__":"lively.morphic.StyleSheet","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"20":{"declarations":[{"__isSmartRef__":true,"id":21},{"__isSmartRef__":true,"id":22}],"styleSheet":{"__isSmartRef__":true,"id":19},"selector":".Morph","__LivelyClassName__":"lively.morphic.StyleSheetRule","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"21":{"values":["10px","sans-serif"],"rule":{"__isSmartRef__":true,"id":20},"property":"font","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"22":{"values":["0"],"rule":{"__isSmartRef__":true,"id":20},"property":"margin","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"23":{"declarations":[{"__isSmartRef__":true,"id":24},{"__isSmartRef__":true,"id":25},{"__isSmartRef__":true,"id":26}],"styleSheet":{"__isSmartRef__":true,"id":19},"selector":".Morph path.line","__LivelyClassName__":"lively.morphic.StyleSheetRule","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"24":{"values":["none"],"rule":{"__isSmartRef__":true,"id":23},"property":"fill","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"25":{"values":["#666"],"rule":{"__isSmartRef__":true,"id":23},"property":"stroke","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"26":{"values":["1.5px"],"rule":{"__isSmartRef__":true,"id":23},"property":"stroke-width","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"27":{"declarations":[{"__isSmartRef__":true,"id":28}],"styleSheet":{"__isSmartRef__":true,"id":19},"selector":".Morph .axis","__LivelyClassName__":"lively.morphic.StyleSheetRule","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"28":{"values":["crispEdges"],"rule":{"__isSmartRef__":true,"id":27},"property":"shape-rendering","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"29":{"declarations":[{"__isSmartRef__":true,"id":30},{"__isSmartRef__":true,"id":31},{"__isSmartRef__":true,"id":32}],"styleSheet":{"__isSmartRef__":true,"id":19},"selector":".Morph .x.axis line","__LivelyClassName__":"lively.morphic.StyleSheetRule","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"30":{"values":["#fff"],"rule":{"__isSmartRef__":true,"id":29},"property":"stroke","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"31":{"comment":"/*stroke: #000;*/","values":[""],"rule":{"__isSmartRef__":true,"id":29},"property":"","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetInlineComment","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"32":{"comment":"/*fill: none;*/","values":[""],"rule":{"__isSmartRef__":true,"id":29},"property":"","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetInlineComment","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"33":{"declarations":[{"__isSmartRef__":true,"id":34}],"styleSheet":{"__isSmartRef__":true,"id":19},"selector":".Morph .x.axis .minor","__LivelyClassName__":"lively.morphic.StyleSheetRule","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"34":{"values":[".5"],"rule":{"__isSmartRef__":true,"id":33},"property":"stroke-opacity","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"35":{"declarations":[{"__isSmartRef__":true,"id":36}],"styleSheet":{"__isSmartRef__":true,"id":19},"selector":".Morph .x.axis path","__LivelyClassName__":"lively.morphic.StyleSheetRule","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"36":{"values":["none"],"rule":{"__isSmartRef__":true,"id":35},"property":"display","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"37":{"declarations":[{"__isSmartRef__":true,"id":38},{"__isSmartRef__":true,"id":39}],"styleSheet":{"__isSmartRef__":true,"id":19},"selector":".Morph .y.axis line, .y.axis path","__LivelyClassName__":"lively.morphic.StyleSheetRule","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"38":{"values":["none"],"rule":{"__isSmartRef__":true,"id":37},"property":"fill","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"39":{"values":["#000"],"rule":{"__isSmartRef__":true,"id":37},"property":"stroke","priority":false,"__LivelyClassName__":"lively.morphic.StyleSheetDeclaration","__SourceModuleName__":"Global.lively.morphic.StyleSheetRepresentation"},"40":{"partName":"InputGraph","requiredModules":[],"partsSpaceName":"PartsBin/Charlie/","comment":"no comment","changes":[{"__isSmartRef__":true,"id":41},{"__isSmartRef__":true,"id":42},{"__isSmartRef__":true,"id":43},{"__isSmartRef__":true,"id":44}],"migrationLevel":8,"__serializedExpressions__":["lastModifiedDate"],"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin","lastModifiedDate":"new Date(\"Sat Jun 14 2014 19:46:41 GMT-0700 (Pacific Daylight Time)\")"},"41":{"author":"robertkrahn","message":"no comment","id":"B49F8D2A-09C9-40C6-9E16-238C484F5C45","__serializedExpressions__":["date"],"date":"new Date(\"Sat Jun 14 2014 19:57:00 GMT-0700 (Pacific Daylight Time)\")"},"42":{"author":"robertkrahn","message":"no comment","id":"2C3083B5-AEBA-4315-9796-CFCA7DD0AA99","__serializedExpressions__":["date"],"date":"new Date(\"Thu May 01 2014 00:18:03 GMT-0700 (Pacific Daylight Time)\")"},"43":{"author":"robertkrahn","message":"no comment","id":"DA7483BC-7F0D-47A5-84B4-1D5C4D84A365","__serializedExpressions__":["date"],"date":"new Date(\"Thu May 01 2014 00:11:03 GMT-0700 (Pacific Daylight Time)\")"},"44":{"__serializedExpressions__":["date"],"author":"cmagnuso","message":"no comment","id":"0E419A23-4A9E-434F-9967-4E42BFBFAEFA","date":"new Date(\"Fri Sep 26 2014 07:30:18 GMT-0700 (Pacific Daylight Time)\")"},"45":{"x":0,"y":99.6109401738325},"46":{"x":1,"y":132.14522858621675},"47":{"x":2,"y":94.45553352535394},"48":{"x":3,"y":72.8268529520197},"49":{"x":4,"y":121.12910135296005},"50":{"x":5,"y":93.67436111162138},"51":{"x":6,"y":82.76723981741961},"52":{"x":7,"y":96.75621829362721},"53":{"x":8,"y":90.90185498384628},"54":{"x":9,"y":107.93840186037974},"55":{"x":10,"y":99.03676309062119},"56":{"loadD3":{"__isSmartRef__":true,"id":57},"render":{"__isSmartRef__":true,"id":60},"reset":{"__isSmartRef__":true,"id":63},"onLoad":{"__isSmartRef__":true,"id":66},"testTick":{"__isSmartRef__":true,"id":69},"getData":{"__isSmartRef__":true,"id":72},"timer":{"__isSmartRef__":true,"id":75},"stopTimer":{"__isSmartRef__":true,"id":78},"clearGraph":{"__isSmartRef__":true,"id":81},"onMouseDown":{"__isSmartRef__":true,"id":84},"setMain":{"__isSmartRef__":true,"id":91},"setExtent":{"__isSmartRef__":true,"id":94}},"57":{"varMapping":{"__isSmartRef__":true,"id":58},"source":"function loadD3(loadAttemptCount, thenDo) {\n    var self = this;\n    var maxLoadAttemptCount = 5;\n    var d3URL = '//cdnjs.cloudflare.com/ajax/libs/d3/3.4.6/d3.js';\n    if (!loadAttemptCount) loadAttemptCount = 1;\n    $('script[src=\"' + d3URL + '\"]').remove();\n    JSLoader.loadJs(d3URL);\n    Functions.waitFor(\n        5*1000,\n        function() { return typeof d3 !== 'undefined'; },\n        function(err) {\n            var msg;\n            if (err && loadAttemptCount < maxLoadAttemptCount) {\n                msg = Strings.format(\n                    \"Loading d3, attempt %s timed out.\\nTrying again...\",\n                    loadAttemptCount);\n                $world.setStatusMessage(msg, Color.yellow, 5);\n                self.loadD3(loadAttemptCount + 1);\n                return;\n            }\n            if (err) {\n                msg = Strings.format(\n                    \"Cannot load d3 library.\\nSorry, d3 isn't available right now.\",\n                    loadAttemptCount);\n                $world.setStatusMessage(msg, Color.red, 10);\n                return;\n            }\n            msg = Strings.format(\n                \"d3 loaded!\",\n                loadAttemptCount);\n            $world.setStatusMessage(msg, Color.green, 4);\n            thenDo && thenDo();\n            lively.bindings.signal(this, 'd3Loaded');\n        });\n}","funcProperties":{"__isSmartRef__":true,"id":59},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"58":{"this":{"__isSmartRef__":true,"id":0}},"59":{"user":"robertkrahn","tags":[],"__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Wed Apr 30 2014 19:42:03 GMT-0700 (Pacific Daylight Time)\")"},"60":{"varMapping":{"__isSmartRef__":true,"id":61},"source":"function render(data) {\n    \n    var data_window = Math.round(data.length / 3600); \n\n    // Sets the size of the svg port from the size of the enclosing morph\n    var morphBounds = this.innerBounds();\n    var margin = {top: 30, right: 30, bottom: 50, left: 35};\n    var width = morphBounds.width - margin.left - margin.right;\n    var height = morphBounds.height - margin.top - margin.bottom;\n    var y_window =  Math.round(100 * $morph(\"Slider_y\").value);\n    \n    // Add an SVG element with the desired dimensions and margin.\n    Global.d3.select(\"#\" + this.canvasId + \" svg\").remove();\n\n    // similar to d3.select(\"body\")\n    var svg = Global.d3.select(\"#\" + this.canvasId)\n        .append(\"svg\")\n            .attr(\"width\", width + margin.left + margin.right)\n            .attr(\"height\", height + margin.top + margin.bottom)\n            .append(\"g\")\n            .attr(\"transform\", \"translate(\" + margin.left + \",\" + margin.top + \")\")\n\n    // Scales and axes. Note the inverted domain for the y-scale: bigger is up!\n    var x = Global.d3.time.scale()\n        .domain([new Date, new Date])\n        .nice(Global.d3.time.second) \n        .range([0, width]);\n        \n    var y = Global.d3.scale.linear()\n        .range([height, 0]);\n        \n    var xAxis = Global.d3.svg.axis()\n        .scale(x)\n        .ticks(6)\n        .tickSize(-height)\n        .tickSubdivide(true)\n        .tickFormat(Global.d3.time.format(\"%H:%M:%S\"));\n        \n    var yAxis = Global.d3.svg.axis()\n        .scale(y)\n        .ticks(4)\n        .orient(\"left\");\n\n\n    // Compute the minimum and maximum x, and the maximum y.\n    x.domain([data[0].x, data[data.length - 1].x]);\n    //y.domain([0, d3.max(data, function(d) { return d.y; })]).nice();\n    \n    // Made the y axis constant\n    y.domain([0, y_window]).nice();\n\n    // Add the x-axis.\n    svg.append(\"g\")\n        .attr(\"class\", \"x axis\")\n        .attr(\"transform\", \"translate(0,\" + height + \")\")\n        .call(xAxis);\n     \n    // x-axis label   \n    svg.append(\"text\")\n        .attr(\"class\", \"x label\")\n        .attr(\"text-anchor\", \"end\")\n        .attr(\"x\", (width / 2 + margin.left))\n        .attr(\"y\", (height + margin.top))\n        .style(\"font-weight\", \"bold\")\n        .text(\"Time Window - \" + data_window + \" Hours\");\n    \n    // Add the y-axis.\n    svg.append(\"g\")\n        .attr(\"class\", \"y axis\")\n        .call(yAxis);\n        \n    // y-axis label    \n    svg.append(\"text\")\n        .attr(\"class\", \"y label\")\n        .attr(\"text-anchor\", \"end\")\n        .attr(\"x\", -(height / 2))\n        .attr(\"y\", -(margin.left / 1.5))\n        .attr(\"transform\", \"rotate(-90)\")\n        .style(\"font-weight\", \"bold\")\n        .text(\"Percent CPU Load\");\n\n    svg.selectAll(\"rect\").remove()\n    \n    svg.selectAll(\"rect\")\n       .data(data)\n       .enter()\n       .append(\"rect\")\n       //.attr(\"x\", function(d, i) { return i * (width / data.length) + 5; })\n       .attr(\"x\", function(d, i) { return i * (width / data.length); })\n       .attr(\"y\", function(d) { return y(d.y); })\n       //.attr(\"width\", function(d) { return (width / data.length) - 5; })\n       .attr(\"width\", function(d) { return (width / data.length); })\n       .attr(\"height\", function(d) { return y(0) - y(d.y) })\n       .attr(\"fill\", \"black\");\n\n        //     .append(\"div\")\n        //     .attr('class', 'chartElement')\n        //     .style('background-color', Color.darkGray.toCSSString())\n\n        // chartElements\n        //     .style(\"height\", yScale.wrap(function($p, d, i) { return $p(d.y) }))\n        //     .style(\"left\", xScale.wrap(function($p, d, i) { return $p(d.x) + 'px' }))\n        //     .style('width', xScale.rangeBand.wrap(function($p, d, i) { return $p(d.x) + 'px' }))\n        //     .style(\"bottom\",  yScale.range()[0])\n        //     .style('text-align', 'center')\n        //     .style('position', 'absolute')\n        //     // .text(function(d) { return d; });\n\n\n}","funcProperties":{"__isSmartRef__":true,"id":62},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"61":{"this":{"__isSmartRef__":true,"id":0}},"62":{"user":"cmagnuso","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Sep 16 2014 22:11:58 GMT-0700 (Pacific Daylight Time)\")"},"63":{"varMapping":{"__isSmartRef__":true,"id":64},"source":"function reset() {\n    this.data = []\n    this.stopStepping();\n    this.canvasId = 'd3-' + this.id.replace(/-/g, '');\n    this.setHTML('<div id=\"' + this.canvasId + '\"></div>')\n    this.setClipMode('visible');\n}","funcProperties":{"__isSmartRef__":true,"id":65},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"64":{"this":{"__isSmartRef__":true,"id":0}},"65":{"user":"robertkrahn","tags":[],"__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Thu May 01 2014 00:12:54 GMT-0700 (Pacific Daylight Time)\")"},"66":{"varMapping":{"__isSmartRef__":true,"id":67},"source":"function onLoad() {\n    this.loadD3();\n}","funcProperties":{"__isSmartRef__":true,"id":68},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"67":{"this":{"__isSmartRef__":true,"id":0}},"68":{"user":"robertkrahn","tags":[],"__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Wed Apr 30 2014 22:04:12 GMT-0700 (Pacific Daylight Time)\")"},"69":{"varMapping":{"__isSmartRef__":true,"id":70},"source":"function testTick() {\n    // this.data = Array.range(0, 300).map(function(n) { return  })\n    // this.data = []\n    // this.startStepping(1000, 'testTick')\n    \n    this.data = this.data.slice(-5);\n    // data.push({x: data.last() ? data.last().x + 1 : 0, y: Numbers.normalRandom(100, 20)})\n    this.data.push({x: new Date(), y: Numbers.normalRandom(100, 20)})\n    this.render(this.data)\n}","funcProperties":{"__isSmartRef__":true,"id":71},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"70":{"this":{"__isSmartRef__":true,"id":0}},"71":{"user":"robertkrahn","tags":[],"__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Thu May 01 2014 00:12:49 GMT-0700 (Pacific Daylight Time)\")"},"72":{"varMapping":{"__isSmartRef__":true,"id":73},"source":"function getData() {\n    \n    var x_window = $morph(\"Slider_x\").value;\n    // Lively server\n    var ip = $morph(\"IP_address\").getTextString();\n    //var url = new Global.URL(\"http://142.104.17.134:10002\");\n    var url = new Global.URL(ip);\n    \n    \n     // VM server\n    //var url = new Global.URL(\"http://142.104.17.139:10002\");\n    \n    var resource = url.asWebResource();\n    var rawData = resource.get().content; // string containing comma separated list of numbers\n    var dataArray = rawData.split(',');\n    \n    var bars = Array.range(0, dataArray.length - 1).collect(function(i) \n           {\n                return {x: i, y: (100 - dataArray[i])}\n           });\n    \n    // bars = Array.range(0,300).collect(function(i) {\n    //            return {x: i, y: (100 - dataArray[i])}\n    //       });\n    \n    var x_window = Math.round($morph(\"Slider_x\").value * dataArray.length)\n    this.get('Testing').textString = x_window;\n    this.render(bars.splice(x_window));\n}","funcProperties":{"__isSmartRef__":true,"id":74},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"73":{"this":{"__isSmartRef__":true,"id":0}},"74":{"user":"cmagnuso","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Wed Sep 24 2014 11:05:30 GMT-0700 (Pacific Daylight Time)\")"},"75":{"varMapping":{"__isSmartRef__":true,"id":76},"source":"function timer() {\n    this.startStepping(3000, \"getData\");\n}","funcProperties":{"__isSmartRef__":true,"id":77},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"76":{"this":{"__isSmartRef__":true,"id":0}},"77":{"user":"cmagnuso","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Fri Sep 12 2014 12:24:42 GMT-0700 (Pacific Daylight Time)\")"},"78":{"varMapping":{"__isSmartRef__":true,"id":79},"source":"function stopTimer() {\n    this.stopStepping()     \n}","funcProperties":{"__isSmartRef__":true,"id":80},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"79":{"this":{"__isSmartRef__":true,"id":0}},"80":{"user":"cmagnuso","tags":[],"__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Fri Sep 12 2014 10:39:52 GMT-0700 (Pacific Daylight Time)\")"},"81":{"varMapping":{"__isSmartRef__":true,"id":82},"source":"function clearGraph() {\n    Global.d3.select(\"#\" + this.canvasId + \" svg\").remove();\n}","funcProperties":{"__isSmartRef__":true,"id":83},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"82":{"this":{"__isSmartRef__":true,"id":0}},"83":{"user":"cmagnuso","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Sep 16 2014 10:49:44 GMT-0700 (Pacific Daylight Time)\")"},"84":{"varMapping":{"__isSmartRef__":true,"id":85},"source":"function onMouseDown() \n{\n    var old_size = this.getExtent();\n    var main_size = this.get('Main').getExtent();\n    \n    if (this.name != \"Main\") \n    {\n        // Switch morph with main morph\n        \n        var old_size = this.getExtent();\n        var main_size = this.get('Main').getExtent();\n    \n        this.setMain();\n        this.get('Main').setExtent(old_size);\n        this.get('Main').name = this.name;\n        this.name = \"Main\";\n        this.setExtent(main_size);\n    }\n    \n}","funcProperties":{"__isSmartRef__":true,"id":90},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"85":{"this":{"__isSmartRef__":true,"id":0},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":86}},"86":{"$super":{"__isSmartRef__":true,"id":87}},"87":{"varMapping":{"__isSmartRef__":true,"id":88},"source":"function () {\n                try {\n                    // FIXME super is supposed to be static\n                    return Object.getPrototypeOf(obj)[name].apply(obj, arguments);\n                } catch (e) {\n                    if ($world)\n                        $world.logError(e, 'Error in $super call')\n                    else\n                        alert('Error in $super call: ' + e + '\\n' + e.stack);\n                    return null;\n                }\n            }","funcProperties":{"__isSmartRef__":true,"id":89},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"88":{"obj":{"__isSmartRef__":true,"id":0},"name":"onMouseDown"},"89":{},"90":{"user":"cmagnuso","tags":[],"__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Wed Sep 24 2014 11:10:07 GMT-0700 (Pacific Daylight Time)\")"},"91":{"varMapping":{"__isSmartRef__":true,"id":92},"source":"function setMain() {\n    var x_new = this.get('Main').getPosition().x;\n    var y_new = this.get('Main').getPosition().y;\n    var x_old = this.getPosition().x;\n    var y_old = this.getPosition().y;\n    \n    this.setPosition(pt(x_new, y_new))\n    this.get('Main').setPosition(pt(x_old, y_old));\n\n    //this.get('Text1').textString = x_new;\n}","funcProperties":{"__isSmartRef__":true,"id":93},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"92":{"this":{"__isSmartRef__":true,"id":0}},"93":{"user":"cmagnuso","tags":[],"__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Wed Sep 24 2014 11:10:52 GMT-0700 (Pacific Daylight Time)\")"},"94":{"varMapping":{"__isSmartRef__":true,"id":95},"source":"function setExtent(newExtent) \n{\n    this.cachedBounds = null;\n\n    var min = this.getMinExtent();\n    newExtent.maxPt(min,newExtent);\n    this.priorExtent = this.getExtent();\n    this.shape.setExtent(newExtent);\n    var origin = this.getOrigin();\n    if (!origin.eqPt(pt(0, 0))) {  // Adjust origin, especially for ellipses\n        var scalePt = pt(newExtent.x/this.priorExtent.x, newExtent.y/this.priorExtent.y);\n        this.adjustOrigin(origin.scaleByPt(scalePt), true);  // moveSubmorphs too\n    }\n    if (this.layout && (this.layout.adjustForNewBounds || this.layout.layouter))\n        this.adjustForNewBounds();\n    if (this.owner && (typeof this.owner.submorphResized == 'function')) {\n        this.owner.submorphResized(this);\n    }\n    return newExtent;\n    \n}","funcProperties":{"__isSmartRef__":true,"id":100},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"95":{"this":{"__isSmartRef__":true,"id":0},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":96}},"96":{"$super":{"__isSmartRef__":true,"id":97}},"97":{"varMapping":{"__isSmartRef__":true,"id":98},"source":"function () {\n                try {\n                    // FIXME super is supposed to be static\n                    return Object.getPrototypeOf(obj)[name].apply(obj, arguments);\n                } catch (e) {\n                    if ($world)\n                        $world.logError(e, 'Error in $super call')\n                    else\n                        alert('Error in $super call: ' + e + '\\n' + e.stack);\n                    return null;\n                }\n            }","funcProperties":{"__isSmartRef__":true,"id":99},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"98":{"obj":{"__isSmartRef__":true,"id":0},"name":"setExtent"},"99":{},"100":{"__serializedExpressions__":["timestamp"],"user":"cmagnuso","tags":[],"timestamp":"new Date(\"Fri Sep 26 2014 07:25:24 GMT-0700 (Pacific Daylight Time)\")"},"isSimplifiedRegistry":true}}