Skip to content

Instantly share code, notes, and snippets.

@petrowsky
Last active November 16, 2022 08:06
Show Gist options
  • Save petrowsky/54060b8ae9c6b2cebaa4 to your computer and use it in GitHub Desktop.
Save petrowsky/54060b8ae9c6b2cebaa4 to your computer and use it in GitHub Desktop.
chart.selectAll("rect")
.data(counts)
.enter().append("rect")
.attr("id", function (d, i) {return keys[i];})
.attr("x", legendWidth)
.attr("y", function (d, i) {return i * bar_height;})
.attr("width", x)
.attr("height", bar_height - gap)
.attr("fill", "url(#gradient)")
.on("click", fmpurl);
function fmpurl() {
var url = 'fmp://$/«DATABASE»?script=Load&param=' + this.id;
window.location = url;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment