-
D3 add a click event to the element, why does it take effect only after 2 clicks?
.point-create is the dot .tipArrow-create is the arrow `showTipArrow= () = > {
d3.selectAll( .point-create ).on( click ,function(){
let $thisDom=d3.select(this);
d3.selectAll( .tipArrow-create ).filter(function(d,i,list){
let arrowDom=...
-
Ask for advice on how to change the size of the X-axis coordinate text when using D3 to make a visual chart.
how to change the size of X-axis coordinate text when making visual charts with D3
is there any property that can be set if the font is too large after scaling?
...
-
Javascript closures do not correctly access external variables when using D3.js?
d3.js v5 version is in use, as follows: javascript code snippet
let colorData = [1, 2, 3, 4, 5, 6, 7, 8];
let colorSchemes = [
d3.scaleOrdinal(d3.schemeCategory10),
d3.scaleOrdinal(d3.schemeAccent),
d3.scaleOrdinal(d3.schemePaired),
d3....
-
After modifying the href attribute of the d3 element use, why does the bound event no longer work?
the code is as follows:
d3.select( -sharpaaa ).append( use )
.attr( id , bbb )
.attr( x , 8)
.attr( y ,a8)
.attr( xlink:href , -sharppoint )
.on( mouseenter ,over)
...
-
How does D3.js request data from the background?
how D3.js requests data from the background. Here s what I did: function update () {
$.ajax({
type: "POST",
url: <%=basePath%>d3 getData.do ,
cache : false,
dataType: "json",
su...
-
Adjust the distance between nodes in the D3.js tree
question: what value controls the distance between nodes? ...
-
D3 how to create stack diagrams with different colors
the desired effect is as follows:
d3stacked bar chart:
the color of the two different columns is the same. The code can see here . The question is, how can I create the kind of bar chart that I want, each column has a different color ? Thank you...
-
D3.js binds to an attribute value update of the data on an element, and how to update the corresponding value of its child elements
var node = this.vis.selectAll( .node ).data(nodes, function(d) {
return d.id;
});
var svg = node.enter().append( svg:svg ).classed( node ,true);
svg.append( svg:image ).attr( href ,function(d){re...
-
D3 how to select only child elements
is to select only child elements No other descendant elements ...
-
D3.js v5 version, force steering graph to get relevant edges
how do I click on a point to mark the color of the valid edges connected to that point?
...
-
D3.js tree vertical tree view
d3.js draws a vertical tree
want to show the root node, the first layer node is horizontal, the node above the first layer wants to display vertically
related codes
the examples found online are horizontal.
create a Bezier generating curve g...
-
How to use d3.js to draw a line segment with multiple nodes?
want to use D3.JS to achieve the effect of the above figure, and display other data corresponding to the selected time period. but since using D3 for the first time, it s not clear what layout to choose. after looking at the relevant documents, the ...
-
Is there any js visualization tool that can make graphics for this classified display?
...
-
What should you do with a tree flowchart like this in a vue project?
The project is built with vue, and then the module is a tree-like flowchart that requires drag support. Looking for a circle, it seems that there are very few plug-ins like this? or am I not looking for the right name? Is there a mature implementation o...
-
The problem of transferring js Code to python
problem description
I want to talk about a piece of code in d3.js converted to python, and then encountered a problem, that is, js can use functions like variables without passing parameter values. I don t know how to implement the same function in m...
-
Using d3 in vue projects, can't use scale bar?
vueimport * as d3 from d3
var linear=d3.scale.linear()
.domain([0,d3.max(dataset)])
.range([0,250]);
: Cannot read property linear of undefined",...
-
How to write the force guide diagram of d3.js version 5.0 or above?
var force = d3.layout.force()
.nodes(nodes)
.links(edges)
.size([width,height])
.linkDistance(150)
.charge([-400]);
this is the previous
...
-
D3.js adds on () listening events to the element with an error. On () is not a function
problem description
when using d3.js to do a bar chart demo, you want to add mouse interactive event listening to the bar chart. The direct listening event is added to the growth animation of the element in the form of a chain call to report an error:...
-
How to add a legend to the force-guided layout of d3.js?
how to add a legend to the force-guided layout of d3.js? ...
-
Is there any way to change the style of this prompt box with the node prompt added in d3?
this.gs.append( title )
.text(d => d.id);
Is there any way to change the style of this prompt box with the node prompt added in d3?
...