-
JohnJune 28, 2016 at 8:25 am #6262
I’m modifying your Halo example.
The datatips seem to require exactly 3 data points. Trying to remove one will cause and ‘undefined’ to display and trying to add a 4th will just bump other out. Where is the number of data points in the data tip controlled?
vizulyJune 28, 2016 at 9:29 am #6263Hi John,
The datatips in the test file are just an example of how you could implement your own data tips.
Take a look at the createDataTip() function in halo_test.js. It takes a set of parameters and makes a little HTML on the fly.
function createDataTip(x,y,h1,h2,h3) { var html = datatip.replace("HEADER1", h1); html = html.replace("HEADER2", h2); html = html.replace("HEADER3", h3); d3.select("body") .append("div") .attr("class", "vz-halo-label") .style("position", "absolute") .style("top", y + "px") .style("left", (x - 125) + "px") .style("opacity",0) .html(html) .transition().style("opacity",1); }
You can modify the parameters that come in to that function and how they get displayed to make your own custom HTML/datatip
– Tom
-
|
Viewing 1 reply thread
You must be logged in to reply to this topic.