how to set nvd3 tooltip boundary
Asked Answered
O

0

6

I'm trying to make this tool tip's position enter image description here relative to the parent div
this is how I am implementing the web page:

<div id="parent">
        <div id="chart">
            <svg style="height:500px">
            </svg>
        </div>
</div>

with css:

#parent
{
     margin-top:300px;
     border: solid blue;
     height: 600px;
}
#chart
{
    border: solid red;
    width:500px;
    float:left;
    height: 500px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 2em;
}
svg
{
    width: 100%;
}

I found chartContainer in the nvd3.js file, but I couldn't edit it.
So are there possible solutions ?

Orcinol answered 11/2, 2014 at 9:0 Comment(4)
The tooltip is positioned so that it is over the associated data. Howe do you want that to change?Sis
Could you setup a jsFiddle?Panjandrum
Can't you just fix the problem by setting the gravity to have it rendered on the bottom of the point? (check tooltip.js gravity). Otherwise you can pass functions for positioning the tooltip.Sotelo
[Similar Question][1]refer to this question [1]: #29572303Aaronaaronic

© 2022 - 2024 — McMap. All rights reserved.