View this code at http://livecoding.io/3981538
Created
October 30, 2012 17:00
-
-
Save c4urself/3981538 to your computer and use it in GitHub Desktop.
created by http://livecoding.io
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "libraries": [ | |
| "d3" | |
| ], | |
| "mode": "javascript", | |
| "layout": "sketchpad mode" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| svg { | |
| position: absolute; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <svg></svg> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // from http://mbostock.github.com/d3/ex/chord.html | |
| // from http://mbostock.github.com/d3/ex/chord.html | |
| var svgcanvas = d3.select('svg'); | |
| var group1 = svgcanvas.append("svg:g") | |
| .attr("stroke", "white") | |
| .attr("stroke-width", 0) | |
| .attr("fill", "#CDC869"); | |
| var frame1 = group1.append("svg:rect") | |
| .attr("x", 25) | |
| .attr("y", 25) | |
| .attr("width", 160) | |
| .attr("height", 100) | |
| .attr('class', 'frame'); | |
| var icon1 = group1.append('svg:rect') | |
| .attr('x', 35) | |
| .attr('y', 35) | |
| .attr('width', 40) | |
| .attr('height', 40) | |
| .attr('stroke-width', 0) | |
| .attr('class', 'icon'); | |
| var tab1 = group1.append('svg:rect') | |
| .attr('x', 25) | |
| .attr('y', 125) | |
| .attr('width', 40) | |
| .attr('height', 40) | |
| .attr('stroke-width', 1) | |
| .attr('class', 'tab'); | |
| var tab2 = group1.append('svg:rect') | |
| .attr('x', 65) | |
| .attr('y', 125) | |
| .attr('width', 40) | |
| .attr('height', 40) | |
| .attr('stroke-width', 1) | |
| .attr('class', 'tab'); | |
| var tab3 = group1.append('svg:rect') | |
| .attr('x', 105) | |
| .attr('y', 125) | |
| .attr('width', 40) | |
| .attr('height', 40) | |
| .attr('stroke-width', 1) | |
| .attr('class', 'tab'); | |
| var tab3 = group1.append('svg:rect') | |
| .attr('x', 105) | |
| .attr('y', 125) | |
| .attr('width', 40) | |
| .attr('height', 40) | |
| .attr('stroke-width', 1) | |
| .attr('class', 'tab'); | |
| var tab4 = group1.append('svg:rect') | |
| .attr('x', 145) | |
| .attr('y', 125) | |
| .attr('width', 40) | |
| .attr('height', 40) | |
| .attr('stroke-width', 1) | |
| .attr('class', 'tab'); | |
| var group2 = svgcanvas.append("svg:g") | |
| .attr("stroke", "white") | |
| .attr("stroke-width", 0) | |
| .attr("fill", "#CDC869"); | |
| var frame2 = group2.append("svg:rect") | |
| .attr("x", 225) | |
| .attr("y", 25) | |
| .attr("width", 160) | |
| .attr("height", 100) | |
| .attr('class', 'frame'); | |
| var icon2 = group2.append('svg:rect') | |
| .attr('x', 235) | |
| .attr('y', 35) | |
| .attr('width', 40) | |
| .attr('height', 40) | |
| .attr('stroke-width', 0) | |
| .attr('class', 'icon'); | |
| var tab1 = group1.append('svg:rect') | |
| .attr('x', 225) | |
| .attr('y', 125) | |
| .attr('width', 40) | |
| .attr('height', 40) | |
| .attr('stroke-width', 1) | |
| .attr('class', 'tab'); | |
| var tab2 = group1.append('svg:rect') | |
| .attr('x', 265) | |
| .attr('y', 125) | |
| .attr('width', 40) | |
| .attr('height', 40) | |
| .attr('stroke-width', 1) | |
| .attr('class', 'tab'); | |
| var tab3 = group1.append('svg:rect') | |
| .attr('x', 305) | |
| .attr('y', 125) | |
| .attr('width', 40) | |
| .attr('height', 40) | |
| .attr('stroke-width', 1) | |
| .attr('class', 'tab'); | |
| var tab3 = group1.append('svg:rect') | |
| .attr('x', 305) | |
| .attr('y', 125) | |
| .attr('width', 40) | |
| .attr('height', 40) | |
| .attr('stroke-width', 1) | |
| .attr('class', 'tab'); | |
| var tab4 = group1.append('svg:rect') | |
| .attr('x', 345) | |
| .attr('y', 125) | |
| .attr('width', 40) | |
| .attr('height', 40) | |
| .attr('stroke-width', 1) | |
| .attr('class', 'tab'); | |
| $('.icon').css('fill', 'blue'); | |
| $('.frame').css('fill-opacity', 0.40); | |
| $('.tab').css('fill', 'red'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment