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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:42:02+00:00 2026-06-04T17:42:02+00:00

I have path elements on my page which have an attribute title which is

  • 0

I have path elements on my page which have an attribute “title” which is an html table of information. Here is an example:

<table>
<tr>
    <td>
        <b><u>California</u></b>
    </td>
</tr>
<tr>
    <td>
        <u>University</u>
    </td>
    <td>
        <u>Percent</u>
    </td>
</tr>
<tr>
    <td>
        California 1:
    </td>
    <td>
        6.6%
    </td>
</tr>
<tr>
    <td>
        California 2:
    </td>
    <td>
        1.2%
    </td>
</tr>
<tr>
    <td>
        California 3:
    </td>
    <td>
        0.5%
    </td>
</tr>
<tr>
    <td>
        California 4:
    </td>
    <td>
        10.1%
    </td>
</tr>
<tr>
    <td>
        California 5:
    </td>
    <td>
        3.6%
    </td>
</tr>
</table>

When I initially load the page, the poshytips look fine, but when I update a slider (which updates the tables), some tips get long decimal strings. The table above is from console.log of the what should be shown upon updating. However, the value “1.2%” appears as “1.20000000000000002%. “The values being input are read in from a csv are initially string values with exactly one decimal place. This is how I am updating the tips using d3 (the ‘maketip’ function just returns the table shown above):

state_path.transition()
  .duration(1000)
  .attr('title', function(d) {
    return maketip(d,y);
  })
  .each("end", function(d) {
    var $this = $(this);
    $this.poshytip("update", $this.attr('title') );
  });

Is there a way to prevent this, or a way to specify this table as the content for the object?

  • 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-04T17:42:03+00:00Added an answer on June 4, 2026 at 5:42 pm

    Here is the answer that I found — thanks for the comments:
    Try giving poshytip the function instead of saving it to the title attr.

    $('.county_path').poshytip({
            content:    function() { 
                return maketip(this.__data__.id, this.__data__.properties.name); 
            },
            className: 'tip-ihme',
            slide:      false,
            followCursor:   true,
            alignTo:    'cursor',
            alignX:     'center'
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an HTML page (PHP, really) with a table cell that contains a
When Connected: I have a simple HTML page with some image elements that reference
I have four DIV elements on my page. Each has it's own array which
I have two path elements. For the sake of description lets just say one
I have a DrawingVisual element that rappresents a path which geometry is described by
I have a form on my page which gives the user the possibility to
I have some elements inside an UpdatePanel which may or may be displayed, depending
I have a JSF page on which i have 8 images like. * For
I'm developing a jQuery plugin, which pretends to translate elements on the page, automatically
I have a SVG path element in my application, like: <path d=M100,100 Q200,400,300,100/> In

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.