INNER CODE UNIT · JavaScript

colorIndex

KeepSafe/dexcount-gradle-plugin · src/main/resources/com/getkeepsafe/dexcount/chart-builder.js:80

        var colorIndex = level == 1 ? 0 : Math.min(level, colors[colorGroupIndex].length - 1);
        children[i].color = colors[colorGroupIndex][colorIndex];
        decorate(children[i], level, colorGroupIndex)
    }
}

// Main function to draw and set up the visualization, once we have the data.
function createVisualization(data) {
    // Basic setup of page elements.
    initializeBreadcrumbTrail();

    // Bounding circle underneath the sunburst, to make it easier to detect when the mouse leaves the parent g.
    vis.append("svg:circle")
        .attr("r", radius)
        .style("opacity", 0);

    // For efficiency, filter nodes to keep only those large enough to see.
    var nodes = partition.nodes(data)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…