javascript - Add additional scale parallel to x-axis -
(Not sure that the scale
is the correct word here.) I want to add an additional scale (AP1CLL, AP2WHO, ..)
as a snapshot below the parallel X-axis:
How do I get it? A column named
"post-text" itemprop = "
label
has been added and the axis parallel axis has been added.
has been created.
Step 1 : Define d3.scale.ordinal ()
and d3.map Get a unique value using ()
.
var x2 = d3.scale.ordinal () .domain (data.map (function (d) {return d.lL;}) ). Color ring band ([0, width], 0.05);
step 2 : d3.svg.axis ()
.
var xAxis2 = d3.svg .xis () .scale (X2) .orient ("bottom")
step 3 : Add a g
for the new axis and call axis was created.
svg.append ("g") .attr ("class", "x axis") //.attr("transform "," translation (0, "+ height +") "). Call (xAxis2)
Hope this helps :)
Comments
Post a Comment