Jump to content
We've recently updated our Privacy Statement, available here. ×

How to enable marking in JsViz Sankey chart

Michael Kalada 2

Recommended Posts

Using the Sankey chart example that comes with JsViz the ability to mark or drill through is not enabled. On this wiki page


Dave Leigh says "The Sankey sample does not have Marking implemented. Each implementation of Marking is specific to the visualization and how the customer wants to use it."

Can someone please expand on this answer, would really love to be able to use markings inside this visual.


Thank you and best regards

Link to comment
Share on other sites

Hi Michael,

Implementing marking is pretty involved. Each visualisation type will work in a different way and it's not possible to provide a single solution for each and every JSViz. Implementing marking in all the sample visualisations wasn't possible given time constraints.

How handy are you with JavaScript (and D3)

Take a look at the Doughnut [sic] example file. It shows how marking can be implemented. The basic premise is to figure out which SVG elements fall within the bounds of the (user-drawn) marking rectangle and send the row IDs of those elements back to Spotfire.

TIBCO does provide consulting services if you have a specific need to produce a fully-functioning visualisation complete with marking.

Andrew Berridge (TIBCO Data Science)

View my book on Spotfire!

Link to comment
Share on other sites

Thanks Andrew.

For anyone following this, I've found you can implement a non interactive marking that will highlight only the selected node and its connections, makes the more complex sankey much more useful. In JsViz go into the library and edit the GoogleSankey.js

in the var options section, just set the interactivity to true, something like the below

var options = {

width: window.innerWidth - 10,

height: window.innerHeight - 10,

sankey: { node: {

nodePadding: _nodepadding,

interactivity: true,} },

more options/customizations can be found here


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...