[英]How to select elements with more than one class in d3 v4
我對 d3 V4 中的選定元素有以下問題。 要在 d3 v3 中選擇以下示例:
class="y axis"
你必須打電話:
selectAll(".y.axis")
在 v4 中我不能選擇這個。 還
selectAll(".y").selectAll(".axis")
沒有返回適當的元素。
let selection: any = d3.selectAll('.y.axis');
selection._groups[0];
這個問題出現在jsdom(PhantomJS)節點模塊中。 我無法選擇 selectAll(".y.axis")。 僅適用於一個類 selectAll(".y") 或 selectAll(".axis") 但我認為這對另一個線程很重要。
我向大家道歉,這是我的錯誤。 示例: selectAll(".y.axis") 有效,但結果在 selection._groups[0] 部分。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.