Skip to content

Commit

Permalink
Cambio en la paleta de colores
Browse files Browse the repository at this point in the history
  • Loading branch information
caev03 committed May 15, 2018
1 parent e81534c commit 33a1642
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,19 @@ var width = Math.max(document.documentElement.clientWidth, window.innerWidth ||
var y = d3.scale.sqrt()
.range([0, radius]);

var color = d3.scale.category20c();
var color = d3.scale.category10();

var coolor = d3.scale.category20();
// {
// "Data Leaks":"#FFFFFF",
// "Cryptography":"",
// "Permission Misuse":"",
// "Vulnerabilities":"",
// "Code Verification":"",
// "Energy Consumption":"",
// "Clone Detection":"",
// "Test Case Generation":""
// }

var svg = d3.select("#mySVG")
.attr("width", width)
Expand Down Expand Up @@ -36,7 +48,9 @@ d3.json("data.json", function(error, root) {
.data(partition.nodes)
.enter().append("path")
.attr("d", arc)
.style("fill", function(d) { return color((d.children ? d : d.parent).name); })
.style("fill", function(d) { return color(d.name)})//(d.children)?color(d.name):coolor(d.name) })
.style('stroke', 'white')
.style('stroke-width', 3)
.on("click", click)
.on("mouseover", hover)
.each(stash);
Expand Down

0 comments on commit 33a1642

Please sign in to comment.