diff --git a/index.js b/index.js index a5c5586..be37e17 100644 --- a/index.js +++ b/index.js @@ -971,6 +971,16 @@ function flameGraph (opts) { return getNodeRect(node) } + chart.select = function (node, color) { + node.highlight = color || true + update() + } + + chart.deselect = function (node) { + node.highlight = false + update() + } + chart.on = dispatch.on.bind(dispatch) exclude.forEach(chart.typeHide)