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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:53:51+00:00 2026-05-15T12:53:51+00:00

I’m trying to build a chart which draws a vertical line to the X

  • 0

I’m trying to build a chart which draws a vertical line to the X axis under the cursor. Using this as a guideline:

http://dojo-toolkit.33424.n3.nabble.com/Charting-events-td40659.html

I am using the following code to catch ‘mouseout’ & ‘mousemove’ for
the chart plot area (excludes the chart margins and labels)

        chart = new dojox.charting.Chart2D("rating");
        chart.addPlot("default", {
            type: "Bubble"
        });

        chart.addPlot("grid", {
            type: "Grid",
            hMinorLines: true
        });

        var plotArea = chart.surface.rawNode.children[1];
        dojo.connect(plotArea, "onmousemove", this, this.showRatingHighlight);
        dojo.connect(plotArea, "onmouseout", this, this.hideRatingHighlight);

Generally, it works as expected. however I also have a grid drawn on the chart, and whenever the mouse passes over the grid lines, I get a “mouseout” event. I also lose the mousemove event when the mouse passes over a marker with a toolTip/highlight action in place.

Q: How can I catch mousemove/mousemove over the ‘plotArea’ without losing it over the gridlines or plot Markers?

Q: Is there a better way to get the ‘plotArea’ of the chart for calculating offsets?

  • 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-15T12:53:51+00:00Added an answer on May 15, 2026 at 12:53 pm

    A1: Overlay a transparent div over a chart and catch events using it. Caveat — most probably it will block events coming to markers and grid lines.

    BTW, your example assumes that you use only SVG or VML renderers. More general way to catch events:

    var h1 = surface.connect("onmouseout", f1);
    var h2 = shape.connect("onmouseout", f2);
    // ...
    shape.disconnect(h2);
    surface.disconnect(h1);
    

    A2: After a chart was rendered (and all geometry calculated), you can extract dimensions like this:

    chart.dim; // {width, height} --- dimensions of the chart
    chart.offsets; // {l, b, r, t} --- offsets from dimensions
    var plotArea = {
      // in pixels relative to chart's top-left corner
      x: chart.offsets.l,
      y: chart.offsets.t,
      width:  chart.dim.width  - chart.offsets.l - chart.offsets.r,
      height: chart.dim.height - chart.offsets.t - chart.offsets.b
    };
    

    Use dojo.position() or a similar function to get the position of your chart on the page, if you need absolute page-level coordinates.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
That's pretty much it. I'm using Nokogiri to scrape a web page what has
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have just tried to save a simple *.rtf file with some websites and

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.