jQWidgets Forums

jQuery UI Widgets Forums Chart Tooltip position problem due to page layout

This topic contains 4 replies, has 2 voices, and was last updated by  ivailo 9 years, 2 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author

  • Klaus H
    Participant

    Hi,

    I embedd a Chart into a layout that is given by the customer. The body of that layout has a negative margin-left. That results in the tooltips of the chart beeing misplaced by this margin excactly.

    I can fix this problem by giving the div of the tooltip a responsing margin-left value. The problem is the div for the tooltip is generated on the fly when I enter the chart with the mouse and a tooltip has to be shown. I then used firebug to give that div the appropriate margin-left and the display was correct. My problem is now that I did not find a callback function so I could somehow modify the approriate div and set the margin-left value or assign a css class or id.

    I then looked into the source package and modified the jqxchart.core.js (for testing purpose only!) and assigned the parent div of the div with the id contendDiv an id (the name of the variable is divToolTip and I used that for the id). Maybe you could implement that in the next release? That would be great or do you have another suggestion how I could access the tooltip div right after it has been created?

    Best Regards
    Klaus


    ivailo
    Participant

    Hi Klaus,

    Thanks for the feedback.
    We tested your case but that type of behavior is not occurred.
    Can you, please, send a working jseditor example for better visualization and analyze.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com


    Klaus H
    Participant

    Hello Ivailo,

    I’m afraid I cannot recreate the behaviour in a appropriate amount of time – I’m no designer and the design is a bit above my understanding. I have however found a workaround. I check via setInterval if the contentDiv exists and once it exists I assign a css class to the parent div. Since the chart can be refreshed, I delete the parent div once I refresh the chart.

    If you could assign the id to the parent div (divToolTip), it would be appreciated.

    Best Regards
    Klaus


    Klaus H
    Participant

    Hi,

    one addition. I have another chart in the application – or better put a dynamic tab with multiple charts if the user configures it that way. There the workaround with setTimeout does not work, because I only get one element per jquery selector with id. So if you could just give the parent div (divToolTip) a css class like jqx-chart-tooltip-container or something like that, this would be great.

    Best Regards
    Klaus


    ivailo
    Participant

    Hi Klaus,

    You can try to use toolTipFormatFunction.
    Please, look at it’s demo.
    You can add an element with your preferred class/id, and use this element for your purposes.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.