javascript - Is there a way to combine d3 json variables? -


मेरे पास निम्न कोड है:

  var node = svg.selectAll ("। ("वर्ग", "नोड") .attr ("r", 20)। शैली ("भरें", फ़ंक्शन ( डी) {रिटर्न रंग (डीजीपीपी);}) .कॉल (बल। ड्रैग)। शैली ("दृश्यता", फ़ंक्शन (डी) {रिटर्न डी.जी.प्रोपी == 1? "छिपा हुआ": "दृश्यमान";}) .on ("माउसओवर", फ़ंक्शन (डी) {if (d.group == 2) {node.filter (फ़ंक्शन (डी) {रिटर्न d.group == 1;}) शैली ("दृश्यता", "दृश्यमान "(" माउसआउट ", फ़ंक्शन (डी) {if (D.group == 2) {node.filter (कार्य (डी) {रिटर्न d.group == 1;}) शैली ("दृश्यता", "छिपा हुआ"); link.filter (फ़ंक्शन (डी) {वापसी D.value == 2;}) शैली ("दृश्यता", "छिपी");}}); एडिट ("टेक्स्ट") .attr ("class", "label") .attr ("fill", "", "text", " काला ") .टेक्स्ट (फ़ंक्शन (डी) {रिटर्न डी.एनए;});   

संयोजन के लिए माउसओवर प्रभाव को स्थानांतरित करने के लिए मैं दो चर नोड और ग्रंथों को जोड़ना चाहता हूं। क्या यह संभव है? यदि हां, तो कैसे? धन्यवाद!

मेरा मानना ​​है कि आप filter के साथ श्रृंखला कर सकते हैं Ie,

  var नोड = svg.selectAll ("। नोड")। फ़िल्टर ("text.label")    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

Installing croogo for cakephp -

c# - Use custom conventions when persisting Rebus sagas in MongoDb -