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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:34:10+00:00 2026-06-17T10:34:10+00:00

I am trying to do 2 things here. Display the bubble on the top

  • 0

I am trying to do 2 things here.

  1. Display the bubble on the top when selected in the grid.(Is there a z-index property?)
  2. Get the same animation on selection as on mouseover.(Scale the bubble size)

I have the code here for reference. Any help would be appreciated.

http://jsbin.com/alupin/22/

  • 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-17T10:34:11+00:00Added an answer on June 17, 2026 at 10:34 am

    Answering your questions:

    • About z-index: as you probably have already realized, charts are drawn using SVG. So the answer is actually here

    Z index in SVG is defined by the order the elements appear in the
    document. You will have to change the element order if you want to
    bring a specific shape to the top.

    • About resizing: Each bubble is an SVG circle so you can resize the bubble (as you did in mouseover and mouseout event handlers) but there is not way of linking the original data with the circle element (in a reliable way), so you cannot.

    EDIT: If you want to go with reordering the element (simulate z-index by placing the element at the end of the list). You might use the following code:

    var previous = undefined;
    $("circle").live("mouseover", function () {
        previous = $(this).prev();
        $(this).parent().append($(this));
        var radius = 0.00;
        currentRadius = this.r.baseVal.value;
        radius = this.r.baseVal.value * 1.4;
        $(this).animate({svgR: radius }, {
            duration: 200
        });
    });
    
    
    $("circle").live("mouseout", function () {
        if (previous && previous.length > 0) {
            $(this).insertAfter(previous);
        } else {
            $(this).parent().prepend($(this));
        }
        $(this).animate({svgR: currentRadius }, {
            duration: 200
        });
    });
    

    Running here

    If you want to order the bubbles based on the color, you should use:

    function onGridSelectionChange(arg) {
        var grid = this;
        var selectedItems = this.select();
        $.map(jobGrowth, function (item) {
            item.color = "#8ebc00";
        });
    
        $.map(selectedItems, function (item) {
            SetColor(grid.dataItem(item));
        });
    
        createChart();
        var chart = $("#chart").data("kendoChart");
        chart.refresh();
    
        var listItems = $("circle");
        var parent = listItems.parent();
        listItems.sort(function(a,b) {
            var a1 = a.getAttribute("fill"), b1 = b.getAttribute("fill");
            if (a1 == b1) return 0;
            return a1 > b1 ? -1 : 1;
        });
        parent.html(listItems)
    }
    

    Test it here

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

Sidebar

Related Questions

I'm trying to get this script NOT to display anything IF there is no
I am playing with things here above my head but am desperately trying to
I am trying to separate a few things in here. I have a program
I am new to bash scripting and trying to learn a few things. Here
I'm trying to get familiar with the whole keyboard event detection thing. Here's my
I have been trying different things and still have been able to get exactly
I am trying some things with JSON and PHP and there is something that
I am trying to display every odd instance of a table row, however there
I'm trying to animate a push out box to display a list of things
I'm trying to display three columns in a DataGridView. Here is a sample of

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.