this.data.length) {\n this.data.push([])\n }\n var x = this.data[0].length ;\n this.data.forEach(function(row, index) {\n row.push({x: x, y: data[index]})\n })\n\n this.render();\n}","funcProperties":{"__isSmartRef__":true,"id":670},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"669":{"this":{"__isSmartRef__":true,"id":450}},"670":{},"671":{"varMapping":{"__isSmartRef__":true,"id":672},"source":"function maxYofData(data) {\n // this.maxYofData([[{x: 1, y:1}]])\n // this.maxYofData([[{x: 1, y:1}, {x: 2, y:2}],[{x: 1, y:2},{x: 2, y:3}]])\n // this.maxYofData(this.data)\n // data = this.data\n\n if (!data) return undefined;\n\n var xlength = data[0].length\n var ylength = data.length\n var sums = []\n // when the data collections are layed out weired I have to do it manually..\n for(var i=0; i < xlength; i++) {\n var s = 0;\n for(var j=0; j < ylength; j++) {\n s += data[j][i].y\n };\n sums.push(s)\n }\n return pv.max(sums)\n}","funcProperties":{"__isSmartRef__":true,"id":673},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"672":{"this":{"__isSmartRef__":true,"id":450}},"673":{},"674":{"converter":{"__isSmartRef__":true,"id":675}},"675":{"originalFunc":null,"varMapping":{"__isSmartRef__":true,"id":676},"source":"function converter(s) {\n idleValues = Strings.tableize(s).slice(3,5).invoke('last')\n return idleValues.collect(function(ea) {return 100 - ea})\n}\n\n","funcProperties":{"__isSmartRef__":true,"id":677},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"676":{},"677":{},"678":{"sourceObj":{"__isSmartRef__":true,"id":226},"sourceAttrName":"globalTransform","targetObj":{"__isSmartRef__":true,"id":224},"targetMethodName":"alignToMagnet","__SourceModuleName__":"Global.lively.bindings","__LivelyClassName__":"AttributeConnection"},"679":{"exec":{"__isSmartRef__":true,"id":680},"serverResult":{"__isSmartRef__":true,"id":681}},"680":{},"681":{},"682":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"683":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"684":{"morphMenuItems":{"__isSmartRef__":true,"id":685}},"685":{"varMapping":{"__isSmartRef__":true,"id":686},"source":"function morphMenuItems() {\n var visualConnector = this, con = this.con, world = this.world();\n var items = [\n ['edit converter', function() {\n var source = con.converterString || 'function converter(value) {\\n return value\\n}',\n editor = new lively.morphic.Text(new Rectangle(0,0, 400, 200), source);\n editor.doitContext = con;\n connect(editor, 'savedTextString', con, 'converterString', {updater:\n function($upd, source) { this.targetObj.converter = null; $upd(source) }});\n connect(editor, 'savedTextString', world, 'alertOK', {converter: \n function() { return 'setting new converter' }})\n editor.applyStyle({syntaxHighlighting: true, fontFamily: 'Courier', resizeWidth: true, resizeHeight: true});\n var title = con.targetObj.name && con.sourceObj.name ?\n 'Editor for ' + con.targetObj.name + ' -> ' + con.sourceObj.name :\n 'Editor for converter function';\n var window = world.addFramedMorph(editor, title)\n window.align(window.bounds().topCenter(), visualConnector.bounds().bottomCenter())\n }],\n ['hide', function() {\n visualConnector.disconnectFromMagnets();\n visualConnector.remove();\n }],\n ['disconnect', function() {\n alertOK('Disconnected ' + visualConnector.con);\n visualConnector.con.visualDisconnect();\n }],\n ['cancel', function() {}],\n ];\n return items;\n }","funcProperties":{"__isSmartRef__":true,"id":691},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"686":{"this":{"__isSmartRef__":true,"id":212},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":687}},"687":{"$super":{"__isSmartRef__":true,"id":688}},"688":{"varMapping":{"__isSmartRef__":true,"id":689},"source":"function () {\n try {\n return obj.constructor.prototype[name].apply(obj, arguments)\n } catch(e) {\n alert('Error in $super call: ' + e + '\\n' + e.stack);\n return null;\n }\n }","funcProperties":{"__isSmartRef__":true,"id":690},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"689":{"obj":{"__isSmartRef__":true,"id":212},"name":"morphMenuItems"},"690":{},"691":{},"692":{"sourceObj":{"__isSmartRef__":true,"id":196},"sourceAttrName":"globalTransform","targetObj":{"__isSmartRef__":true,"id":211},"targetMethodName":"alignToMagnet","__SourceModuleName__":"Global.lively.bindings","__LivelyClassName__":"AttributeConnection"},"693":{"reset":{"__isSmartRef__":true,"id":694},"addDataColumnAndRender":{"__isSmartRef__":true,"id":696}},"694":{"time":{"__isSmartRef__":true,"id":695},"user":"robertkrahn"},"695":{"isSerializedDate":true,"string":"Mon Jul 04 2011 16:18:56 GMT+0200 (CEST)"},"696":{"time":{"__isSmartRef__":true,"id":697},"user":"robertkrahn"},"697":{"isSerializedDate":true,"string":"Mon Jul 04 2011 16:48:24 GMT+0200 (CEST)"},"698":{"draw":{"__isSmartRef__":true,"id":699},"prepareForNewRenderContext":{"__isSmartRef__":true,"id":710},"addDataAndRender":{"__isSmartRef__":true,"id":717},"reset":{"__isSmartRef__":true,"id":720},"setChartType":{"__isSmartRef__":true,"id":723},"drawStackChart":{"__isSmartRef__":true,"id":706},"setupStackExample":{"__isSmartRef__":true,"id":726},"addDataColumnAndRender":{"__isSmartRef__":true,"id":729},"maxYofData":{"__isSmartRef__":true,"id":732}},"699":{"varMapping":{"__isSmartRef__":true,"id":700},"source":"function drawStackChart(w, h) {\n w = w - 30;\n h = h - 25;\n \n var maxX = this.data[0].length,\n maxY = this.maxYofData(this.data) || 10;\n\n var x = pv.Scale.linear(0, maxX).range(0, w),\n y = pv.Scale.linear(0, maxY).range(0, h);\n\n var vis = new pv.Panel()\n .width(w)\n .height(h)\n .bottom(20)\n .left(20)\n .right(10)\n .top(5);\n\n /* X-axis and ticks. */\n vis.add(pv.Rule)\n .data(x.ticks())\n .visible(function(d){return d})\n .left(x)\n .bottom(-5)\n .height(5)\n .anchor(\"bottom\").add(pv.Label)\n .text(x.tickFormat);\n\n /* The stack layout. */\n vis.add(pv.Layout.Stack)\n .layers(this.data)\n .x(function(d){return x(d.x)})\n .y(function(d){return y(d.y)})\n .layer.add(pv.Area);\n\n /* Y-axis and ticks. */\n vis.add(pv.Rule)\n .data(y.ticks(3))\n .bottom(y)\n .strokeStyle(function(d){return d ? \"rgba(128,128,128,.2)\" : \"#000\"})\n .anchor(\"left\").add(pv.Label)\n .text(y.tickFormat);\n\n return vis;\n}","funcProperties":{"__isSmartRef__":true,"id":705},"__SourceModuleName__":"Global","__serializedLivelyClosures__":{"__isSmartRef__":true,"id":709},"__LivelyClassName__":"lively.Closure"},"700":{"this":{"__isSmartRef__":true,"id":196},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":701}},"701":{"$super":{"__isSmartRef__":true,"id":702}},"702":{"varMapping":{"__isSmartRef__":true,"id":703},"source":"function () {\n try {\n return obj.constructor.prototype[name].apply(obj, arguments)\n } catch(e) {\n alert('Error in $super call: ' + e + '\\n' + e.stack);\n return null;\n }\n }","funcProperties":{"__isSmartRef__":true,"id":704},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"703":{"obj":{"__isSmartRef__":true,"id":196},"name":"draw"},"704":{},"705":{"hasLivelyClosure":true,"livelyClosure":{"__isSmartRef__":true,"id":706}},"706":{"varMapping":{"__isSmartRef__":true,"id":707},"source":"function drawStackChart(w, h) {\n w = w - 30;\n h = h - 25;\n \n var maxX = this.data[0].length,\n maxY = this.maxYofData(this.data) || 10;\n\n var x = pv.Scale.linear(0, maxX).range(0, w),\n y = pv.Scale.linear(0, maxY).range(0, h);\n\n var vis = new pv.Panel()\n .width(w)\n .height(h)\n .bottom(20)\n .left(20)\n .right(10)\n .top(5);\n\n /* X-axis and ticks. */\n vis.add(pv.Rule)\n .data(x.ticks())\n .visible(function(d){return d})\n .left(x)\n .bottom(-5)\n .height(5)\n .anchor(\"bottom\").add(pv.Label)\n .text(x.tickFormat);\n\n /* The stack layout. */\n vis.add(pv.Layout.Stack)\n .layers(this.data)\n .x(function(d){return x(d.x)})\n .y(function(d){return y(d.y)})\n .layer.add(pv.Area);\n\n /* Y-axis and ticks. */\n vis.add(pv.Rule)\n .data(y.ticks(3))\n .bottom(y)\n .strokeStyle(function(d){return d ? \"rgba(128,128,128,.2)\" : \"#000\"})\n .anchor(\"left\").add(pv.Label)\n .text(y.tickFormat);\n\n return vis;\n}","funcProperties":{"__isSmartRef__":true,"id":708},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"707":{"this":{"__isSmartRef__":true,"id":196}},"708":{},"709":{"originalFunc":{"__isSmartRef__":true,"id":706}},"710":{"varMapping":{"__isSmartRef__":true,"id":711},"source":"function prepareForNewRenderContext(renderCtx) {\n $super(renderCtx);\n lively.bindings.callWhenNotNull(Global, 'pv', this, 'render');\n}","funcProperties":{"__isSmartRef__":true,"id":716},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"711":{"this":{"__isSmartRef__":true,"id":196},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":712}},"712":{"$super":{"__isSmartRef__":true,"id":713}},"713":{"varMapping":{"__isSmartRef__":true,"id":714},"source":"function () {\n\t\t\t\ttry {\n\t\t\t\t\treturn obj.constructor.prototype[name].apply(obj, arguments)\n\t\t\t\t} catch(e) {\n\t\t\t\t\talert('Error in $super call: ' + e + '\\n' + e.stack);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}","funcProperties":{"__isSmartRef__":true,"id":715},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"714":{"obj":{"__isSmartRef__":true,"id":196},"name":"prepareForNewRenderContext"},"715":{},"716":{},"717":{"varMapping":{"__isSmartRef__":true,"id":718},"source":"function addDataAndRender(data) {\n if (data == null) return;\n\n if ((typeof data == 'object') && !(data instanceof Array))\n data = [data.x, data.y];\n\n if (!this.data)\n this.data = [data];\n else\n this.data.push(data);\n\n\n this.render();\n}","funcProperties":{"__isSmartRef__":true,"id":719},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"718":{"this":{"__isSmartRef__":true,"id":196}},"719":{},"720":{"varMapping":{"__isSmartRef__":true,"id":721},"source":"function reset() {\n this.connections = {addDataColumnAndRender: {}}\n this.setupStackExample()\n this.maxDataLength = 100;\n // this.setChartType('stack');\n}","funcProperties":{"__isSmartRef__":true,"id":722},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"721":{"this":{"__isSmartRef__":true,"id":196}},"722":{},"723":{"varMapping":{"__isSmartRef__":true,"id":724},"source":"function setChartType(cType) {\n\tvar chart = this;\n\t// if (!chart.vis) {\n\t\t// alert('Chart type could not be set. Chart is missing!');\n\t\t// chart.render();\n\t\t// return;\n\t// }\n\n\tswitch (cType.toLowerCase()) {\n\tcase 'stack':\n\t\tchart.drawStackChart.asScriptOf(chart, 'draw');\n\t\tbreak;\n\n\tdefault:\n\t\talert('The chart type \"' + cType + '\" is unknown!');\n\t\treturn;\n\t}\n this.render()\n}","funcProperties":{"__isSmartRef__":true,"id":725},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"724":{"this":{"__isSmartRef__":true,"id":196}},"725":{},"726":{"varMapping":{"__isSmartRef__":true,"id":727},"source":"function setupStackExample() {\n // this.setupStackExample()\n \n this.data = pv.range(4).map(function() {\n return pv.range(0, 10, .1).map(function(x) {\n return {x: x, y: Math.sin(x) + Math.random() * .5 + 2};\n });\n });\n // this.data = [\n // [{x:0, y:0}, { x: 1, y: 1}]\n // ]\n this.setChartType('stack')\n\n // this.render();\n}","funcProperties":{"__isSmartRef__":true,"id":728},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"727":{"this":{"__isSmartRef__":true,"id":196}},"728":{},"729":{"varMapping":{"__isSmartRef__":true,"id":730},"source":"function addDataColumnAndRender(data) {\n if (data == null) return;\n \n if (!this.data || data.length !== this.data.length) {\n this.data = []; // reset because of data changed\n }\n\n if (this.maxDataLength) {\n this.data = this.data.slice(\n this.data.length-this.maxDataLength,this.data.length);\n }\n\n while (data.length > this.data.length) {\n this.data.push([])\n }\n var x = this.data[0].length ;\n this.data.forEach(function(row, index) {\n row.push({x: x, y: data[index]})\n })\n\n this.render();\n}","funcProperties":{"__isSmartRef__":true,"id":731},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"730":{"this":{"__isSmartRef__":true,"id":196}},"731":{},"732":{"varMapping":{"__isSmartRef__":true,"id":733},"source":"function maxYofData(data) {\n // this.maxYofData([[{x: 1, y:1}]])\n // this.maxYofData([[{x: 1, y:1}, {x: 2, y:2}],[{x: 1, y:2},{x: 2, y:3}]])\n // this.maxYofData(this.data)\n // data = this.data\n\n if (!data) return undefined;\n\n var xlength = data[0].length\n var ylength = data.length\n var sums = []\n // when the data collections are layed out weired I have to do it manually..\n for(var i=0; i < xlength; i++) {\n var s = 0;\n for(var j=0; j < ylength; j++) {\n s += data[j][i].y\n };\n sums.push(s)\n }\n return pv.max(sums)\n}","funcProperties":{"__isSmartRef__":true,"id":734},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"733":{"this":{"__isSmartRef__":true,"id":196}},"734":{},"735":{"submorphs":[{"__isSmartRef__":true,"id":736}],"scripts":[],"id":570,"shape":{"__isSmartRef__":true,"id":750},"grabbingEnabled":false,"droppingEnabled":false,"showsMorphMenu":true,"halosEnabled":true,"registeredForMouseEvents":true,"_Position":{"__isSmartRef__":true,"id":765},"value":false,"toggle":false,"isActive":true,"normalFill":{"__isSmartRef__":true,"id":753},"lighterFill":{"__isSmartRef__":true,"id":766},"label":{"__isSmartRef__":true,"id":736},"attributeConnections":[{"__isSmartRef__":true,"id":775},{"__isSmartRef__":true,"id":777}],"doNotSerialize":["$$fire"],"doNotCopyProperties":["$$fire"],"showsHalos":false,"__SourceModuleName__":"Global.lively.morphic.Widgets","padding":{"__isSmartRef__":true,"id":782},"name":"resetButton","partsBinMetaInfo":{"__isSmartRef__":true,"id":783},"renderContextTable":{"__isSmartRef__":true,"id":784},"eventHandler":{"__isSmartRef__":true,"id":785},"owner":{"__isSmartRef__":true,"id":195},"priorExtent":{"__isSmartRef__":true,"id":786},"distanceToDragEvent":{"__isSmartRef__":true,"id":787},"_Rotation":0,"_Scale":1.089423869470782,"__LivelyClassName__":"lively.morphic.Button"},"736":{"submorphs":[],"scripts":[],"id":571,"shape":{"__isSmartRef__":true,"id":737},"grabbingEnabled":false,"droppingEnabled":false,"showsMorphMenu":false,"halosEnabled":true,"fixedWidth":true,"_MaxTextWidth":66,"_MaxTextHeight":19,"fixedHeight":true,"allowsInput":false,"_OverflowMode":"visible","registeredForMouseEvents":true,"_Position":{"__isSmartRef__":true,"id":742},"textColor":{"__isSmartRef__":true,"id":740},"owner":{"__isSmartRef__":true,"id":735},"eventsAreIgnored":true,"__SourceModuleName__":"Global.lively.morphic.TextCore","textChunks":[{"__isSmartRef__":true,"id":743}],"padding":{"__isSmartRef__":true,"id":745},"_Padding":{"__isSmartRef__":true,"id":746},"prevScroll":[0,0],"priorExtent":{"__isSmartRef__":true,"id":747},"_FontFamily":"Helvetica, Sans-Serif","renderContextTable":{"__isSmartRef__":true,"id":748},"eventHandler":{"__isSmartRef__":true,"id":749},"_HandStyle":"default","_PointerEvents":"none","_ClipMode":"hidden","_WhiteSpaceHandling":"pre-wrap","_Align":"center","attributeConnections":[],"doNotSerialize":[],"doNotCopyProperties":[],"__LivelyClassName__":"lively.morphic.Text"},"737":{"borderWidth":0,"fill":null,"__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":{"__isSmartRef__":true,"id":738},"_Extent":{"__isSmartRef__":true,"id":739},"_BorderColor":{"__isSmartRef__":true,"id":740},"renderContextTable":{"__isSmartRef__":true,"id":741},"__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"738":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"739":{"x":66,"y":19,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"740":{"r":0,"g":0,"b":0,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"741":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML"},"742":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"743":{"style":{"__isSmartRef__":true,"id":744},"chunkOwner":{"__isSmartRef__":true,"id":736},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"reset","__LivelyClassName__":"lively.morphic.TextChunk"},"744":{"__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.TextEmphasis"},"745":{"x":5,"y":0,"width":0,"height":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"746":{"x":0,"y":0,"width":0,"height":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"747":{"x":66,"y":19,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"748":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","setOrigin":"setOriginHTML","setClipMode":"setClipModeHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML","updateText":"updateTextHTML","setTextExtent":"setTextExtentHTML","setMaxTextWidth":"setMaxTextWidthHTML","setMaxTextHeight":"setMaxTextHeightHTML","getTextExtent":"getTextExtentHTML","getTextString":"getTextStringHTML","ignoreTextEvents":"ignoreTextEventsHTML","enableTextEvents":"enableTextEventsHTML","setFontFamily":"setFontFamilyHTML","setFontSize":"setFontSizeHTML","setTextColor":"setTextColorHTML","setPadding":"setPaddingHTML","setAlign":"setAlignHTML","setVerticalAlign":"setVerticalAlignHTML","setDisplay":"setDisplayHTML","setWhiteSpaceHandling":"setWhiteSpaceHandlingHTML"},"749":{"morph":{"__isSmartRef__":true,"id":736},"__SourceModuleName__":"Global.lively.morphic.Events","__LivelyClassName__":"lively.morphic.EventHandler"},"750":{"__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":{"__isSmartRef__":true,"id":751},"_Extent":{"__isSmartRef__":true,"id":752},"_Fill":{"__isSmartRef__":true,"id":753},"_BorderWidth":1,"_BorderColor":{"__isSmartRef__":true,"id":763},"_BorderRadius":5,"renderContextTable":{"__isSmartRef__":true,"id":764},"__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"751":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"752":{"x":66,"y":19,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"753":{"stops":[{"__isSmartRef__":true,"id":754},{"__isSmartRef__":true,"id":756},{"__isSmartRef__":true,"id":758},{"__isSmartRef__":true,"id":760}],"vector":{"__isSmartRef__":true,"id":762},"__SourceModuleName__":"Global.lively.morphic.Shapes","__LivelyClassName__":"lively.morphic.LinearGradient"},"754":{"offset":0,"color":{"__isSmartRef__":true,"id":755}},"755":{"r":0.9600000000000001,"g":0.9600000000000001,"b":0.9600000000000001,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"756":{"offset":0.4,"color":{"__isSmartRef__":true,"id":757}},"757":{"r":0.8200000000000001,"g":0.8200000000000001,"b":0.8200000000000001,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"758":{"offset":0.6,"color":{"__isSmartRef__":true,"id":759}},"759":{"r":0.8200000000000001,"g":0.8200000000000001,"b":0.8200000000000001,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"760":{"offset":1,"color":{"__isSmartRef__":true,"id":761}},"761":{"r":0.94,"g":0.94,"b":0.94,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"762":{"x":0,"y":0,"width":0,"height":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"763":{"r":0.839,"g":0.839,"b":0.839,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"764":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML"},"765":{"x":211.1532711522109,"y":-154.3809293801562,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"766":{"stops":[{"__isSmartRef__":true,"id":767},{"__isSmartRef__":true,"id":769},{"__isSmartRef__":true,"id":771},{"__isSmartRef__":true,"id":773}],"vector":{"__isSmartRef__":true,"id":762},"__SourceModuleName__":"Global.lively.morphic.Shapes","__LivelyClassName__":"lively.morphic.LinearGradient"},"767":{"offset":0,"color":{"__isSmartRef__":true,"id":768}},"768":{"r":0.98,"g":0.98,"b":0.98,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"769":{"offset":0.4,"color":{"__isSmartRef__":true,"id":770}},"770":{"r":0.91,"g":0.91,"b":0.91,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"771":{"offset":0.6,"color":{"__isSmartRef__":true,"id":772}},"772":{"r":0.91,"g":0.91,"b":0.91,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"773":{"offset":1,"color":{"__isSmartRef__":true,"id":774}},"774":{"r":0.97,"g":0.97,"b":0.97,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"775":{"sourceObj":{"__isSmartRef__":true,"id":735},"sourceAttrName":"fire","targetObj":{"__isSmartRef__":true,"id":196},"targetMethodName":"reset","__SourceModuleName__":"Global.lively.bindings","converter":null,"converterString":null,"updater":null,"updaterString":null,"varMapping":{"__isSmartRef__":true,"id":776},"__LivelyClassName__":"AttributeConnection"},"776":{"source":{"__isSmartRef__":true,"id":735},"target":{"__isSmartRef__":true,"id":196}},"777":{"sourceObj":{"__isSmartRef__":true,"id":735},"sourceAttrName":"fire","targetObj":{"__isSmartRef__":true,"id":196},"targetMethodName":"render","converter":null,"converterString":null,"updaterString":"function ($upd) { this.targetObj.data = [[{x:0, y:0}]]; $upd() }","varMapping":{"__isSmartRef__":true,"id":778},"__SourceModuleName__":"Global.lively.bindings","__serializedLivelyClosures__":{"__isSmartRef__":true,"id":779},"__LivelyClassName__":"AttributeConnection"},"778":{"source":{"__isSmartRef__":true,"id":735},"target":{"__isSmartRef__":true,"id":196}},"779":{"updater":{"__isSmartRef__":true,"id":780}},"780":{"originalFunc":null,"varMapping":{"__isSmartRef__":true,"id":778},"source":"function ($upd) { this.targetObj.data = [[{x:0, y:0}]]; $upd() }","funcProperties":{"__isSmartRef__":true,"id":781},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"781":{},"782":{"x":5,"y":0,"width":0,"height":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Rectangle"},"783":{"partsSpaceName":"PartsBin/Inputs/","__SourceModuleName__":"Global.lively.PartsBin","migrationLevel":2,"comment":"Simple button. Connect to 'fire' to trigger actions when the button is pressed.","partName":"Button","__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo"},"784":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","setOrigin":"setOriginHTML","setClipMode":"setClipModeHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML"},"785":{"morph":{"__isSmartRef__":true,"id":735},"__SourceModuleName__":"Global.lively.morphic.Events","__LivelyClassName__":"lively.morphic.EventHandler"},"786":{"x":67,"y":19,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"787":{"x":79.41537641589571,"y":-18.890662891776913,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"788":{"position":{"__isSmartRef__":true,"id":789},"_Extent":{"__isSmartRef__":true,"id":790},"_BorderWidth":1,"_BorderColor":{"__isSmartRef__":true,"id":791},"_Fill":{"__isSmartRef__":true,"id":792},"__SourceModuleName__":"Global.lively.morphic.Shapes","renderContextTable":{"__isSmartRef__":true,"id":793},"_BorderRadius":0,"_Opacity":1,"_BorderStyle":"solid","_Position":{"__isSmartRef__":true,"id":794},"__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"789":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"790":{"x":565.1704110039991,"y":359.0546128281011,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"791":{"r":0,"g":0,"b":0,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"792":{"r":1,"g":1,"b":1,"a":1,"__LivelyClassName__":"Color","__SourceModuleName__":"Global"},"793":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML"},"794":{"x":-267.4522979760118,"y":-166.80382227593293,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"795":{"x":656.000000000002,"y":337.000000000001,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"796":{"migrationLevel":2,"partsSpaceName":"PartsBin/Visualization/","__SourceModuleName__":"Global.lively.PartsBin","partName":"ProtovisStackDrawing","__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo"},"797":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","setOrigin":"setOriginHTML","setClipMode":"setClipModeHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML"},"798":{"morph":{"__isSmartRef__":true,"id":195},"__SourceModuleName__":"Global.lively.morphic.Events","__LivelyClassName__":"lively.morphic.EventHandler"},"799":{},"800":{"x":565.1704110039991,"y":361.0546128281011,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"801":{"addDataAndRender":{"__isSmartRef__":true,"id":802}},"802":{},"803":{"x":195,"y":-244,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"804":{"addDataAndRender":{"__isSmartRef__":true,"id":805},"reset":{"__isSmartRef__":true,"id":808},"setupConnections":{"__isSmartRef__":true,"id":811}},"805":{"varMapping":{"__isSmartRef__":true,"id":806},"source":"function addDataAndRender(data) {\n this.get('ProtovisMorph').addDataAndRender(data)\n}","funcProperties":{"__isSmartRef__":true,"id":807},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"806":{"this":{"__isSmartRef__":true,"id":195}},"807":{},"808":{"varMapping":{"__isSmartRef__":true,"id":809},"source":"function reset() {\n this.connections = {addDataAndRender: {}}\n this.get('ProtovisMorph').reset();\n}","funcProperties":{"__isSmartRef__":true,"id":810},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"809":{"this":{"__isSmartRef__":true,"id":195}},"810":{},"811":{"varMapping":{"__isSmartRef__":true,"id":812},"source":"function setupConnections() {\n connect(this.get('resetButton'), 'fire', this.get('ProtovisMorph'), 'render',\n {updater: function($upd) { this.targetObj.data = []; $upd() }})\n}","funcProperties":{"__isSmartRef__":true,"id":813},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"812":{"this":{"__isSmartRef__":true,"id":195}},"813":{},"814":{"submorphs":[{"__isSmartRef__":true,"id":815},{"__isSmartRef__":true,"id":829},{"__isSmartRef__":true,"id":875},{"__isSmartRef__":true,"id":908}],"scripts":[],"shape":{"__isSmartRef__":true,"id":942},"id":953,"renderContextTable":{"__isSmartRef__":true,"id":953},"eventHandler":{"__isSmartRef__":true,"id":954},"droppingEnabled":true,"halosEnabled":true,"layout":{"__isSmartRef__":true,"id":955},"_Position":{"__isSmartRef__":true,"id":956},"windowMorph":{"__isSmartRef__":true,"id":177},"label":{"__isSmartRef__":true,"id":815},"closeButton":{"__isSmartRef__":true,"id":829},"menuButton":{"__isSmartRef__":true,"id":875},"collapseButton":{"__isSmartRef__":true,"id":908},"priorExtent":{"__isSmartRef__":true,"id":957},"owner":{"__isSmartRef__":true,"id":177},"__SourceModuleName__":"Global.lively.morphic.Widgets","__LivelyClassName__":"lively.morphic.TitleBar"},"815":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":816},"id":954,"renderContextTable":{"__isSmartRef__":true,"id":821},"textChunks":[{"__isSmartRef__":true,"id":822}],"eventHandler":{"__isSmartRef__":true,"id":824},"grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"_Padding":{"__isSmartRef__":true,"id":825},"_ClipMode":"hidden","fixedWidth":true,"_WhiteSpaceHandling":"pre-wrap","fixedHeight":true,"allowInput":false,"_FontFamily":"Helvetica","_FontSize":10,"evalEnabled":false,"isLabel":true,"_HandStyle":"default","layout":{"__isSmartRef__":true,"id":826},"_Align":"center","eventsAreIgnored":true,"_PointerEvents":"none","owner":{"__isSmartRef__":true,"id":814},"priorExtent":{"__isSmartRef__":true,"id":827},"_MaxTextWidth":441,"_MaxTextHeight":17,"_Position":{"__isSmartRef__":true,"id":828},"__SourceModuleName__":"Global.lively.morphic.TextCore","__LivelyClassName__":"lively.morphic.Text"},"816":{"_Position":{"__isSmartRef__":true,"id":817},"renderContextTable":{"__isSmartRef__":true,"id":818},"_Extent":{"__isSmartRef__":true,"id":819},"_BorderWidth":0,"_BorderColor":{"__isSmartRef__":true,"id":820},"_Fill":null,"_BorderRadius":0,"__SourceModuleName__":"Global.lively.morphic.Shapes","__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"817":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"818":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML"},"819":{"x":441,"y":17,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"820":{"r":0,"g":0,"b":0,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"821":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","setOrigin":"setOriginHTML","setClipMode":"setClipModeHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML","updateText":"updateTextHTML","setTextExtent":"setTextExtentHTML","setMaxTextWidth":"setMaxTextWidthHTML","setMaxTextHeight":"setMaxTextHeightHTML","getTextExtent":"getTextExtentHTML","getTextString":"getTextStringHTML","ignoreTextEvents":"ignoreTextEventsHTML","enableTextEvents":"enableTextEventsHTML","setFontFamily":"setFontFamilyHTML","setFontSize":"setFontSizeHTML","setTextColor":"setTextColorHTML","setPadding":"setPaddingHTML","setAlign":"setAlignHTML","setVerticalAlign":"setVerticalAlignHTML","setDisplay":"setDisplayHTML","setWhiteSpaceHandling":"setWhiteSpaceHandlingHTML"},"822":{"style":{"__isSmartRef__":true,"id":823},"chunkOwner":{"__isSmartRef__":true,"id":815},"__SourceModuleName__":"Global.lively.morphic.TextCore","storedString":"Inspector for