jquery - partial color on triangle in pie chart in html -
i need below html [and trying achieve pie chart in html different color]
need below
any on this? need apply partial color each pie in html, jsfiddle here http://jsfiddle.net/x4mdc/26/
my html
<!doctype html> <html> <head> <title> pie </title> <meta http-equiv="pragma" content="no-cache"/> <meta http-equiv="x-ua-compatible" content="ie=7;ie=9" /> <link rel="stylesheet" href="opera.css"/> </head> <body> <div class="piecontainer"> <div class="piebackground"></div> <div id="pieslice1" class="hold"><div class="pie"> </div></div> <div id="pieslice2" class="hold"><div class="pie"> </div></div> <div id="pieslice3" class="hold"><div class="pie"> </div></div> <div id="pieslice4" class="hold"><div class="pie"> </div></div> <div class="piecenteric"></div> </div><script type="text/javascript" src="jquery.min.js"></script> </body> </html>
my css
.piecontainer { height: 700px; margin-left:288px; margin-top: 86px; } .piecontainercircle { border: 2px solid blue; padding:10px; } .piebackground { background-color: grey; position: absolute; height:350px; width:700px; border-radius: 700px 700px 0 0; -moz-border-radius: 700px 700px 0 0; -webkit-border-radius: 700px 700px 0 0; -o-border-radius: 700px 700px 0 0; -moz-box-shadow: -1px 1px 3px #000; -webkit-box-shadow: -1px 1px 3px #000; -o-box-shadow: -1px 1px 3px #000; box-shadow: -1px 1px 3px #000; } .pie { position: absolute; width: 700px; height: 700px; -moz-border-radius: 350px; -webkit-border-radius: 350px; -o-border-radius: 350px; border-radius: 350px; clip: rect(0px, 350px, 700px, 0px); } .hold { position: absolute; width: 700px; height: 700px; -moz-border-radius: 50px; -webkit-border-radius: 50px; -o-border-radius: 50px; border-radius: 50px; clip: rect(0px, 700px, 700px, 350px); } #pieslice1 .pie { background-color: #b17bf5; -webkit-transform:rotate(90deg); -moz-transform:rotate(90deg); -o-transform:rotate(90deg); transform:rotate(90deg); } #pieslice2 { -webkit-transform:rotate(149deg); -moz-transform:rotate(149deg); -o-transform:rotate(149deg); transform:rotate(149deg); } #pieslice2 .pie { background-color: #f55696; -webkit-transform:rotate(301deg); -moz-transform:rotate(301deg); -o-transform:rotate(301deg); transform:rotate(301deg); } #pieslice3 { -webkit-transform:rotate(190deg); -moz-transform:rotate(190deg); -o-transform:rotate(190deg); transform:rotate(190deg); } #pieslice3 .pie { background-color: #f65e59; -webkit-transform:rotate(304deg); -moz-transform:rotate(304deg); -o-transform:rotate(304deg); transform:rotate(304deg); } #pieslice4 { -webkit-transform:rotate(270deg); -moz-transform:rotate(270deg); -o-transform:rotate(270deg); transform:rotate(270deg); } #pieslice4 .pie { background-color: #2997e6; -webkit-transform:rotate(323deg); -moz-transform:rotate(323deg); -o-transform:rotate(323deg); transform:rotate(323deg); } #pieslice1 div.pieborder { border: 5px solid yellow; } div.piecenteric { background-color: white; border-radius: 300px 300px 0 0; height: 200px; margin-left: 172px; margin-top: 150px; position: absolute; width: 355px; z-index:1; }
html
<div class="piecontainer"> <div class="piebackground"> <div class="pieoverlay"></div> <!-- add overlay div --> </div> <div id="pieslice1" class="hold"> <div class="pie">introduction</div> </div> <div id="pieslice2" class="hold"> <div class="pie">customer engagement</div> </div> <div id="pieslice3" class="hold"> <div class="pie">customer insights</div> </div> <div id="pieslice4" class="hold"> <div class="pie">it solutions considerations</div> </div> <div class="piecenteric"></div> </div>
css
/* below css overlay */ .pieoverlay { background-color: white; border-radius: 300px 300px 0 0; height: 200px; margin-left: 172px; margin-top: 5px; position: absolute; width: 355px; z-index: 2; z-index: 111; border-radius: 50%; height: 690px; margin-left: 5px; position: absolute; width: 690px; z-index: 4; box-shadow: inset 0px 1px 4px #000; } .piebackground { background-color: grey; position: absolute; height:350px; width:700px; border-radius: 700px 700px 0 0; -moz-border-radius: 700px 700px 0 0; -webkit-border-radius: 700px 700px 0 0; -o-border-radius: 700px 700px 0 0; -moz-box-shadow: -1px 1px 3px #000; -webkit-box-shadow: -1px 1px 3px #000; -o-box-shadow: -1px 1px 3px #000; box-shadow: -1px 1px 3px #000; overflow:hidden; /* add */ }
Comments
Post a Comment