javascript - zoomcharts 1.5.1 - how to display multiple colors/multiple hover on a single link -
i want know if zoomcharts has following features in latest update (1.5.1):
i want 1 single link between 2 nodes able colored 2 colors (left-half red , right-half black). also, want able hover on these 2 different colored single-split-link differently??
if copy paste following code here, can see can't done right now...
<script> var data = { "nodes":[ {"id":"n1", "loaded":true, "style":{"label":"node1"}}, {"id":"n2", "loaded":true, "style":{"label":"node2"}} ], "links":[ {"id":"l1","from":"n1", "to":"n2", "style":{"fillcolor":"red", "todecoration":"arrow"}} ] }; var t = new netchart({ container: document.getelementbyid("demo"), area: { height: 350 }, data: { preloaded: data }, info: {enabled: true, linkcontentsfunction: function(data, link, callback) { return link.id; }} }); </script>
it seems right not possible split single link , hover each of parts separately.
but here "nasty" version how make using linedash , fixed node positions.
<script> var data = { "nodes":[ {"id":"n1", "loaded":true, x:100, y:0, "style":{"label":"node1"}}, {"id":"n2", "loaded":true, x:0, y:0, "style":{"label":"node2"}} ], "links":[ {"id":"l1","from":"n1", "to":"n2", "style":{"fillcolor":"red", "todecoration":"arrow", "length":3}}, {"id":"l11","from":"n1", "to":"n2", "style":{"fillcolor":"black","linedash":[100,300]}} ] }; var t = new netchart({ container: document.getelementbyid("demo"), area: { height: 350 }, data: { preloaded: data }, info: {enabled: true, linkcontentsfunction: function(data, link, callback) { return link.id; }}, "style": { "multilinkspacing": 0 } }); </script>
Comments
Post a Comment