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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:58:54+00:00 2026-06-08T00:58:54+00:00

I believe I have a syntax error, but I have tried everything and can’t

  • 0

I believe I have a syntax error, but I have tried everything and can’t figure this out. I am using the Raphael Javascript vector graphics library, and trying to draw a black line from 170, 170 to 150, 150, but nothing is being displayed. Can anyone tell why?

<html>
    <head>
        <script src="raphael.js"></script>
        <script src="jquery-1.7.2.js"></script>
    </head>
    <body>
        <div id="sample-2" style=" background-color:blue; width:500px;"></div>
        <script type="text/javascript">
            var paper = Raphael("sample-2", 900, 500);
            //var curvePath = paper.path("M100,100 L400,400 C500,400 500,100 400,100");
            //curvePath.attr({fill:"blue", stroke:"black"});

            //var circle = paper.circle(175, 175, 50);
            var newpath = paper.path({type:"path", path:"M170, 170 L150, 150", stroke:"black"});
            //circle.attr({"fill": "orange"});
            //circle.attr({"stroke": "black"});
        </script>
    </body>
</html>​
  • 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-06-08T00:58:57+00:00Added an answer on June 8, 2026 at 12:58 am

    You’re misusing the Paper.path() constructor. Call it with a single string argument, representing the path string:

    var newpath = paper.path("M170, 170 L150, 150");
    

    If you wish to change the path’s attributes, e.g. stroke color, fill, fonts use the attr() method, like so:

    newpath.attr({
        'stroke' : 'black',
        'stroke-width' : 3
    });
    

    Raphaël Reference:

    • Paper.path()
    • Element.attr()
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't believe I am having this problem. I've been looking and looking but
I believe I have the syntax correct, at least according to my textbook. This
This is staight forward I believe: I have a table with 30,000 rows. When
Can MlPy / SciPy be used on GAE? I believe I have imported NumPy
I have reason to believe console.log and JSON.stringify can produce inconsistent views of the
I believe this question might have been previously attempted in 2006 on a different
I am hoping someone can point me in the right direction to figure out
I can't seem to find the proper syntax for Proguard to filter out a
I must have some sort of syntax error somewhere, because both correctip and loginip
Forgive me if this has already been asked elsewhere. I have a Scala syntax

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.