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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:50:12+00:00 2026-05-31T08:50:12+00:00

Trivial, but I can’t seem to print a jQuery SVG polygon from a string

  • 0

Trivial, but I can’t seem to print a jQuery SVG polygon from a string or array. Following the example at http://keith-wood.name/svgRef.html#polygon works fine.

So I fabricated a string that looks like [[129.03,192],[151.47,204.8],[134.64,233.6],[112.2,224]], but it returns an error: TypeError: Object [ has no method 'join'.

The documentation at the previous link hints at `points(number[][2]) being the x/y coordinates, but any combination of variables I stuff in fail.

What’s the secret? How can I compile a string or array of points to make a polygon with?

EDIT: polygon example code from link: svg.polyline([[450,250],
[475,250],[475,220],[500,220],[500,250],...],
{fill: 'none', stroke: 'blue', strokeWidth: 5});

  • 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-31T08:50:13+00:00Added an answer on May 31, 2026 at 8:50 am

    var arr = [[129.03,192],[151.47,204.8],[134.64,233.6],[112.2,224]] and it should not be var arr = "[[129.03,192],[151.47,204.8],[134.64,233.6],[112.2,224]]" as you have said “So I fabricated a string that looks like “

    if you get them as string then do eval("[[129.03,192],[151.47,204.8],[134.64,233.6],[112.2,224]]")

    But many say eval is evil

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

Sidebar

Related Questions

This seems like such a trivial problem, but I can't seem to pin how
This seems fairly trivial but I can't seem to work it out I have
this may seem trivial but i can't figure out why DNN reports this error,
This should be trivial but I can't seem to find it (unless no such
This seems quite trivial but I can't seem to find out how to place
This is a very trivial problem but I can't seem to find a way
I know this is very trivial but I can't seem to find the answer
This sounds like a trivial question but somehow I can't seem to figure it
Wondering if anyone can help me with this annoying but trivial (in terms of
This is probably close to trivial, but I can't find it. How can I

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.