Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-29-2012, 01:27 AM   PM User | #1
Drew012
New Coder

 
Join Date: Jul 2012
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Drew012 is an unknown quantity at this point
Stuck on jQuery Visualize plugin

https://github.com/filamentgroup/jQu...lize.jQuery.js

Above I have a link to the jQuery visualize function. Basically it is part of:
http://www.filamentgroup.com/lab/upd...esigning_with/ which allows you to graph HTML tables. I have been messing around with it and I got it to work but I want to make a change.

Right now I am using the pie function. You can ignore all of the other ones because I am only calling the pie function on my table. I want to make the pie chart more into a polygon. Basically the only change would be having non-rounded edges for each "slice" of the pie. I have gone through it but I cannot figure out how the pie is being drawn and if I would could even change anything on it to make it in to a polygon. My fear is that that I cannot change the pie into a polygon without completely redoing the math. I am new at this so anyone who could point me in the right direction would be very helpful! Thanks!

EDIT: I am looking specifically at line 194-205.

Last edited by Drew012; 07-29-2012 at 01:31 AM..
Drew012 is offline   Reply With Quote
Old 07-29-2012, 10:52 PM   PM User | #2
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
I think essentially you need to swap the use of arc() with lineTo(x,y) in that section of code.

It should be possible to determine the correct x and y coords as you already have radius, centerx, centery (counter and fraction) - but you may have to revise your trig knowledge a little (as would I).
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:29 PM.


Advertisement
Log in to turn off these ads.