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 4010406
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:59:44+00:00 2026-05-20T08:59:44+00:00

I am using gRaphael JS lib to draw line chart. and have some problem

  • 0

I am using gRaphael JS lib to draw line chart.
and have some problem with haverColumn function.
this is my simplified hoverColumn function.

var line = raphael.g.linechart(50, 20, 650, 120, xAry, yAry, options).hoverColumn(function (){
    ...
    console.log(this.x+","+this.y);
    ....
}

When mouse is hovering on the chart,
hoverColumn function is called, and log function is executed.
But, some area doesn’t call hoverColumn function.

So, I did debugging using firebug, I found the reason.
There was some big rect area on the line chart,
when mouse is on the area, hoverColumn doesn’t be call despite
mouse is on the chart’s column.

here is a captured image to help understanding.
fire bug, and the rect.

enter image description here

when I remove the rect manually using firebug,
hoverColumn function works well~ -_-;

the area code is made by gRaphael-js automatically.

so, is there any way to solve this problem?
any idea please~

  • 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-20T08:59:45+00:00Added an answer on May 20, 2026 at 8:59 am

    I found the solution at last(takes 1 day hacking…=_=;).
    the problem is in g.line.js, graphael js library.

    in the source code,
    there is a createColumns function like this,

    function createColumns(f) {
            // unite Xs together
            var Xs = [];
            for (var i = 0, ii = valuesx.length; i < ii; i++) {
                Xs = Xs.concat(valuesx[i]);
            }
            Xs.sort();
            ....
            ...
            ..
    }
    

    The problem is the sorting function.
    Xs.sort() sort the x values, but the function returns sorted array with errors.
    so, if the input array is,

    valuesx = [0.05076044713698533, 9.579202857778233, 10.93181619059174];
    valuesx.sort();
    

    the result is

    [0.05076044713698533, 10.93181619059174, 9.579202857778233]
    not
    [0.05076044713698533, 9.579202857778233, 10.93181619059174]
    

    as a result, the column was broken~

    so, I changed the sort function, Xs.sort() like this:

    Xs.sort(function(a, b){
                return a - b;
            });
    

    works well~ ^^;
    Hope this helps~

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

Sidebar

Related Questions

I have created a horizontal bar graph using gRaphael charting library. I want to
using VB.Net2010 I need to call a C# DLL The problem I have is
Using online interfaces to a version control system is a nice way to have
Using C# .NET 3.5 and WCF, I'm trying to write out some of the
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Using jQuery's UI Tabs. This is my code. <div id=tabs> <ul> <li><a href=#tabs-1>Find a
Using Core Data. Let's say we have models for Team and Player. Assume: -Each
Using a site like StackOverflow as an example: I have a table of users,
I am attempting to pull some information from my tnsnames file using regex. I
I have a script that appends some rows to a table. One of the

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.