Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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.

  • #2
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •