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

  • Home
  • SEARCH
  • 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 7682227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:31:09+00:00 2026-05-31T18:31:09+00:00

I am trying to make a piechart by rotating the overlapping divs. I need

  • 0

I am trying to make a piechart by rotating the overlapping divs. I need to take action on mouseover or hover. Every thing is working fine if the sum of the first and last slice is 180deg or greater than 180deg.
But it stops taking hover event when the sum goes below.
Please visit
http://jsfiddle.net/fjBfE/

here when i do mouseover on the green slice– at some points its mouseover is not working and at some points its working.

  • 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-05-31T18:31:11+00:00Added an answer on May 31, 2026 at 6:31 pm

    There is this inherent problem with this model. if you want to keep div elements in loop, you have to

    1. either, add them in increasing order keeping their z-index same
    2. or, add them in any order but with their z-index increasing.

    Here’s what I meant:

    <html>
    <head>
    <style type="text/css">
         .pieContainer{
         position:relative;
         }
     .pie {
              position: absolute;
              width: 300px;
              height: 300px;
           /*  -moz-border-radius: 150px;
              -webkit-border-radius: 150px;
              -o-border-radius: 150px;
             border-radius: 150px;
    /*         */ clip: rect(0px, 300px, 150px, 150px);
         }
    
         #pie1{
            background-color:#ff0000;
            -webkit-transform:rotate(0deg);
              z-index:100;
        }
        #pie2{
            background-color:#00ff00;
            -webkit-transform:rotate(60deg);
              -moz-transform:rotate(60deg);
              -o-transform:rotate(60deg);
              transform:rotate(60deg);
              z-index:100;
        }
        #pie3{
            background-color:#0000ff;
            -webkit-transform:rotate(120deg);
              -moz-transform:rotate(120deg);
              -o-transform:rotate(120deg);
              transform:rotate(120deg);
              z-index:100;
        }
        #pie4{
            background-color:#ffff00;
            -webkit-transform:rotate(180deg);
              -moz-transform:rotate(180deg);
              -o-transform:rotate(180deg);
              transform:rotate(180deg);
              z-index:100;
        }
        #pie5{
            background-color:#ff00ff;
            -webkit-transform:rotate(240deg);
              -moz-transform:rotate(240deg);
              -o-transform:rotate(240deg);
              transform:rotate(240deg);
              z-index:100;
        }
        #pie6{
            background-color:orange;
            -webkit-transform:rotate(300deg);
              -moz-transform:rotate(300deg);
              -o-transform:rotate(300deg);
              transform:rotate(300deg);
    
              z-index:100;
        }
        /
        /*#pie7{
        position:absolute;
            width:50px;
            height:150px;
            background-color:#ff0000;
            z-index:101;
            left:150px;
            -webkit-border-radius: 150px;
    
        }*/
        .pie{z-index:1;}
    
        .pie:hover{
            background-color:#000000;
    
            }
            #idea{-webkit-transform:rotate(20deg);
            position:absolute;
            top:100px;
            left:700px;
            z-index:1000;
            }
    </style>
    </head>
    <body>
    
    <div class="pieContainer">
         <div class="pieBackground"></div>
         <div id="pie1" class="pie"></div>
         <div id="pie2" class="pie"></div>
         <div id="pie3" class="pie"></div>
         <div id="pie4" class="pie"></div>
         <div id="pie5" class="pie"></div>
         <div id="pie6" class="pie"></div>
         <div id="pie7"></div>
    </div>
    <div id="idea">idea</div>
    </body>
    </html>
    

    remove this comment in the beginning of the code: /* -moz-border-radius: 150px; and things will look circular.

    http://jsfiddle.net/KzG2Z/ : square one

    http://jsfiddle.net/KzG2Z/1/ : circular one

    If you can use there are pretty cool JS solutions that you can use.

    http://www.artetics.com/Articles/using-various-javascript-libraries-to-create-pie-chart

    http://g.raphaeljs.com/

    In the end what you have tried to do is sort of close circuit design, it closes. (couldn’t help myself) (circuit was redundant)

    Also there are some issues, if you want to dynamically do this, you are cornered even before you tackle that because you aren’t using JS | jQuery, if you have been, there are APIs… you know. (again)

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

Sidebar

Related Questions

I am trying make long screen to vertical direction. So, I need a screen
Trying to make a multilingual installer - the process is working in general, but
I am working with nHibernate, and trying make sense of bag collections. My data
Trying to make a make generic select control that I can dynamically add elements
Trying to make a MySQL-based application support MS SQL, I ran into the following
Trying to make a generic PL/SQL procedure to export data in specific XML format,
Trying to make a web service call to an HTTPS endpoint in my Silverlight
Trying to make a custom :confirm message for a rails form that returns data
trying to make a page which will recursively call a function until a limit
While trying to make one of my python applications a bit more robust in

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.