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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:09:01+00:00 2026-05-27T08:09:01+00:00

I am working on a visualization project. Based on my data I am plotting

  • 0

I am working on a visualization project. Based on my data I am plotting hundreds of small circle on canvas. I want to add a mouse over event so that whenever a mouse is the enclosing area of a circle it will show some node property from my data as a tool tip or as text on the canvas.
My current drawCircle method

function drawCircle(canvas,x,y,r) 
{
    canvas.strokeStyle = "#000000";
    canvas.fillStyle = "#FFFF00";
    canvas.lineWidth = 2;
    canvas.beginPath();
    canvas.arc(x,y,r,0,Math.PI*2,true);
    canvas.stroke();
    canvas.fill();
    canvas.closePath();
}

I have looked into kinetic.js
But can’t figure it out how I can call my drawCircle [repetitively] method using their library.

Any help will be highly appreciated.

  • 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-27T08:09:01+00:00Added an answer on May 27, 2026 at 8:09 am

    If you still want to use KineticJS, you would put the Kinetic shape stuff inside your drawCircle routine. This is basically pulled out of their tutorial and stripped down:

    function drawCircle(stage,x,y,r) {
      var circle = new Kinetic.Shape(function(){
        var context = this.getContext();
        // draw the circle here: strokeStyle, beginPath, arc, etc...
      });
      circle.addEventListener("mouseover", function(){
        // do something
      });
      stage.add(circle);
    }
    

    If you don’t want to use KineticJS after all, you will need to remember for yourself the positions and radii of every circle you drew, and then do something like this:

    canvas.onmouseover = function onMouseover(e) {
      var mx = e.clientX - canvas.clientLeft;
      var my = e.clientY - canvas.clientTop;
      // for each circle...
      if ((mx-cx)*(mx-cx)+(my-cy)*(my-cy) < cr*cr)
        // the mouse is over that circle
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been working on a visualization project for 2-dimensional continuous data. It's the kind
I'm working on a project where there is data visualization. My ultimate goal is
I'm working on a source-code visualization project that uses the Processing core library. The
So I'm working on creating a visualization for a data structure in Java. I
I'm working with a hot new open-source Flash data visualization library ( http://www.axiis.org )
I'm currently working on a 3D visualization project, and I came across an issue
I'm working on a scientific computation & visualization project in C#/.NET, and we use
I am working with VMD (a molecular dynamics visualization package) and I want to
I'm currently working on an inherited project which uses Google's Visualization API (for both
I am working on a project which involves using data from web services 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.