Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8151837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:31:21+00:00 2026-06-06T15:31:21+00:00

(first posted on google group but no response so assuming I should be posting

  • 0

(first posted on google group but no response so assuming I should be posting this here).

Am trying to lay a sunburst (coloured arcs) on top of a pie (yellow and white segments).

Here is a js fiddle that shows the problem, the initial green segments are missing:

http://jsfiddle.net/qyCkB/1/:

enter image description here

and a js fiddle without the pie where all the segments are shown correctly:

http://jsfiddle.net/X3sRy/1/

enter image description here

I have checked the nodes variable after it has been created on this line:

  var nodes = partition.nodes({'values': data});

and the values appear to be the same in both examples.

On checking the DOM, it is just not drawing the first few segments of the sunburst.

Should this work or is it not possible to put two different layouts on top of each other?
Is there a better approach to achieving the same thing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T15:31:23+00:00Added an answer on June 6, 2026 at 3:31 pm

    Your second-data join is colliding with the first. Your first data-join is on “g.arc”, so you should be adding G elements with the class “arc” (not “clock_arc”). Your second data-join is on “path”, which is inadvertently selecting the path elements you added previously. Since your second data-join matches the previously-added elements, you’re not entering all of the expected elements for the pie.

    You need to disambiguate the sunburst path elements from the pie path elements. One way you could do this is to select by class rather than element type, so the second data-join becomes “.pie” rather than “path”. Something like this:

    var gClock = svg.selectAll(".clock")
        .data(clockData)
      .enter().append("g")
        .attr("class", "clock");
    
    var pathClock = gClock.append("path");
    
    var pathPie = svg.selectAll(".pie")
        .data(pieData)
      .enter().append("path")
        .attr("class", "pie");
    

    I’d also recommend reading these tutorials, if you haven’t already: Thinking with Joins, Nested Selections, Object Constancy.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I posted this on the Jsoup group at google.groups, but there doesn't seem to
My baldness is growing more rapidly than it should be. I first posted this
Environment: Android 2.3.3 with Google API I know this is kind of long, but
this is my first posted question. I have a fairly complicated OQL query which
Thanks for all the questions and responses posted on here. This site usually shows
(first time poster, long time visitor via Google) I'm trying to extract the contents
this is my first Android app and I'm trying to use Sockets to send
First I am sorry if I posted at the wrong place. Now onto the
First time poster here. A quick question about setting up a loop here. I
Firstly sorry for the long piece of code pasted below. This is my first

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.