Solved

3D effects in SVG

Posted on 2001-07-09
3
283 Views
Last Modified: 2008-02-01
I have the following SVG code that generates pie chart.
I need to add some 3D effect on it - even just shadow or something like this.
It is urgent.

<?xml version="1.0" standalone="yes"?>
<svg width="800" height="600">
<g id="series">
<path id="1" d="M 320 112.5 A 162.5 162.5 0 1 1 199.238938 383.733788 L 320 275 Z" style="fill:tomato"/>
<path id="2" d="M 199.238938 383.733788 A 162.5 162.5 0 0 1 168.29325 333.2348 L 320 275 Z" style="fill:magenta"/>
<path id="3" d="M 168.29325 333.2348 A 162.5 162.5 0 0 1 183.715962 186.496162 L 320 275 Z" style="fill:brown"/>
<path id="4" d="M 183.715962 186.496162 A 162.5 162.5 0 0 1 195.51785 170.54695 L 320 275 Z" style="fill:blue"/>
<path id="5" d="M 195.51785 170.54695 A 162.5 162.5 0 0 1 277.941913 118.037025 L 320 275 Z" style="fill:green"/>
<path id="6" d="M 277.941913 118.037025 A 162.5 162.5 0 0 1 320 112.5 L 320 275 Z" style="fill:indigo"/>
</g>
</svg>

Thanks.
0
Comment
Question by:pavlin
3 Comments
 
LVL 2

Accepted Solution

by:
djokov earned 200 total points
ID: 6266008
<?xml version="1.0" standalone="yes"?>
<svg width="800" height="600">
<filter id="DropShadowFilter" filterUnits="objectBoundingBox" x="-10%" y="-10%" width="120%" height="120%">
   <feGaussianBlur in="SourceAlpha" stdDeviation="2" result="BlurAlpha"/>
   <feOffset in="BlurAlpha" dx="4" dy="4" result="OffsetBlurAlpha"/>
   <feMerge>
      <feMergeNode in="OffsetBlurAlpha"/>
      <feMergeNode in="SourceGraphic"/>
   </feMerge>
</filter>
<g id="series" style="filter:url(#DropShadowFilter)" transform="scale(1 0.5)">
<path id="1" d="M 320 112.5 A 162.5 162.5 0 1 1 199.238938 383.733788 L 320 275 Z" style="fill:tomato"/>
<path id="2" d="M 199.238938 383.733788 A 162.5 162.5 0 0 1 168.29325 333.2348 L 320 275 Z" style="fill:magenta"/>
<path id="3" d="M 168.29325 333.2348 A 162.5 162.5 0 0 1 183.715962 186.496162 L 320 275 Z" style="fill:brown"/>
<path id="4" d="M 183.715962 186.496162 A 162.5 162.5 0 0 1 195.51785 170.54695 L 320 275 Z" style="fill:blue"/>
<path id="5" d="M 195.51785 170.54695 A 162.5 162.5 0 0 1 277.941913 118.037025 L 320 275 Z" style="fill:green"/>
<path id="6" d="M 277.941913 118.037025 A 162.5 162.5 0 0 1 320 112.5 L 320 275 Z" style="fill:indigo"/>
</g>
</svg>

Will help.
0
 

Author Comment

by:pavlin
ID: 6266039
Yes! Thanx friend..
0
 

Expert Comment

by:frankg77777
ID: 14886872
pavlin, djokov-
how did you create the vectors for the pie pieces?  can you do it on the fly via transformations or scripting?
i have been unable to even create separate shapes in Illustrator.
thanks
frankg77777
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question