Google timeline custom tooltip (bug shift) - tooltip

I am a customized tooltip.
But now, when you change the filter range desynchronizes tooltip with the block.
Somebody sees the cause of the bug ?
`http://jsfiddle.net/gsv48wqg/`

Related

How to have both Tooltip and Hint hint modes?

In Windows, if a column is too narrow to show full text, a tooltip appears inline and can show you the missing text:
It's important to note that hint window is inline with the text being displayed (i.e. it's not "below" the node).
This would be the equivalent of VirtualTreeview HintMode hmToolTip:
TVTHintMode = (
hmDefault, // show the hint of the control
hmHint, // show node specific hint string returned by the application
hmHintAndDefault, // same as hmHint but show the control's hint if no node is concerned
hmTooltip // show the text of the node if it isn't already fully shown
);
hmTooltip: show the text of the node if it isn't already fully shown
And also Hints; not just tooltips
Explorer also has the ability to show a hint, which is a hint windows that floats near, or below the cell being hovered:
This would be the equivalent in VirtualTreeview of hmHint:
hmHint: show node specific hint string returned by the application
And you handle the OnGetHint event.
Why not both?
Now comes the piece of resistance: Windows performing both functions, at the same time:
showing you the full text (if it's cut off) (ala hmTooltip)
as well as allowing me to add more text (ala hmHint)
But, if there is no additional text to show, it should continue to show just the inline tooltip:
And if it's not cut off at just: just the extra text:
I want that!
How can i do that?
Research effort
if i set HintMode to hmTooltip, then OnGetHint never fires (and i never get a chance to add custom information)
if i set HintMode to hmHint (or hmHintAndDefault), then OnGetHint event fires, but the tree will no longer display the cut-off portion
if the HintMode is hmHint, then the displayed hint will never be inline; but instead will always be below the cell
Is such a feature possible? At the very least i assume i'll have to re-invent all the cell measuring to figure out if the inplace text is cut off.
but the the only way i can get an OnGetHint event
is by setting HintMode to hmHint
but if HintMode is hmHint
then the hint will never be in-place
but if i set HintMode to hmTooltip to make it in-place
i'll never get the OnGetHint event
goto 10
Bonus Reading
Virtual StringTree: How to determine if the node text is completely shown?
Edit: Clarification
I hate to do this, because it implies an answer or an avenue that could be pursued. But imagine the following truth table:
OnGetHint IsTreeTextClipped Hint
========= ================= ==================
Empty No No hint
Empty Yes Inline tooltip
Non-empty No Hint below; shows only GetHint text only
Non-empty Yes Hint below; show both TreeText+CRLF+GetHint text
The problem is that you can never have an inline tooltip if OnGetHint is called.
you can either your OnGetHint called (hmHint)
or you can have an inline tooltip (hmTooltip)
but you can never have OnGetHint called, and if it returns nothing, defer to hmTooltip mode
How can i have OnGetHint called with, and if it returns nothing, defer to hmTooltip mode?
Of course, nothing says that OnGetHint has to be involved at all. That was only an example of how get hint text to the VirtualTrees for processing.

How to supply tooltip for PaperDropdown that behaves nicely

If I wrap the paper-dropdown that comes in the paper_elements example in a core-tooltip, the tip displays on hover as expected.
<core-tooltip position="bottom" label="Choose country of residence">
<paper-dropdown>
<template repeat="{{countries}}">
<paper-item label="{{name}}"></paper-item>
</template>
</paper-dropdown>
</core-tooltip>
The problem is, after selecting an item, the tooltip is still displayed. Additionally in dartium and on chrome there is a fine blue line outlining the tip and the dropdown even as I hover over other elements.
Please explain what is going on and what is the best way to register with the PaperDropdown and/or CoreTooltip that it no longer has focus? I've tried calling focus() another element in the onClick PaperItem in my own examples and that did not seem to work.
Any suggestions on better approaches that might make tooltip unnecessary would be useful as well. The reason for a tooltip is there is no comparable Floating label as with PaperInput for the dropdown. So once a selection is made there is no description, thus the tooltip.
It seems to have to do with focus. Mybe this improves your situation. If this is not what you want just add a comment:
core-tooltip:focus {
visibility: hidden !important;
}
Sometimes the tooltip seems just not to recognize that the element isn't mouse-overed anymore when not the mouse moved out but instead the mouse-overed element shrank away. I would report this as a bug in the <core-overlay> element.

Is there a Z order value, for clicks on Highcharts tooltips?

I am noticing something strange; I have a click event on a chart, and the chart fire up the event no problem.
Then I add a link in the tooltip, but when I click on it; the chart event fire, not the one that should open the link.
It works only if the tooltip will render on an area that is not part of the plot area (say, a value is high enough to render a tooltip on the title bar; if I click on that link, it will work).
I suspect that there is some sort of parameter that tell highcharts if the link in the tooltip is above the chart plot area? Otherwise it is impossible to have the tooltip open a link, if the highcharts click event is enabled.
You need to set useHTML flag as true.
Code: http://jsfiddle.net/sbochan/voh6ebt8/
Example: http://jsfiddle.net/sbochan/voh6ebt8/show

How to ignore hidden series when clicking on a legend using highcharts?

I have a charts done in highcharts in which I show and hide series depending on a checkbox (if the user clicks on a checkbox and all series are shown, if he unchecks the checkbox, some series are hidden).
It is working great.
Now I have an issue with the legends in the chart: if the series are hidden and the users enables a legend, the segment of all series (hidden or not) are shown in the chart.
I would like to handle the click item so I only handle series that are being shown.
To do that, I created an eventhandler for the legendItemClick event.
Inside it, I am able to access the legend (using this) but I am only able to call functions in a legend level, affecting all series. Is there anyway I could get to a series level?
Thanks!
Edit: created a jsfiddle as an example: http://jsfiddle.net/JLkGm/1/
Steps to reproduce:
1- unmark the checkbox
2- click twice in john + joe
Note that the segment related to Jane + Janet will show up
I would like to prevent this segment from showing if the checkbox is not checked.
ps: sorry for the js code in the checkbox event handler, we are using coffeescript, the original code was this one
toggleCompareData: (toggle) ->
columnName = COLUMN_HIGHCHARTS_TOKEN + #secondaryPrefix
if toggle
for serie in #chart.series
serie.show() if serie.stackKey is columnName
else
for serie in #chart.series
serie.hide() if serie.stackKey is columnName
It looks like bug, reported to our developers here: https://github.com/highslide-software/highcharts.com/issues/3309

highstock - control when tooltip appears

By default, the tooltip appears as soon as the cursor enters the chart. I would like to control when it first appears in one of two ways:
Wait for user to hover over (around) a data point on the chart.
This way the user can look at the entire chart without the
distraction of the tooltip.
mousedown - is there a way to disable the default mousedown function
and use it for displaying the tooltip instead? And because the
tooltip and crosshair seem to be joined, perhaps the same mousedown
event could fire the crosshair to appear?
number 2 would be best; any suggestions/solutions would be appreciated!
Number 2 is possible to achieve by:
disable default Highcharts tooltip
create point.click event handler
in above handler, create your own tooltip (it's simple div with some CSS)
make proper position for tooltip (accessed via this.point.plotX and this.point.plotY

Resources