获取点对应tooltip的信息
@protected
@param  {Object} point 原始的数据记录
@param  {String} titleField tooltipTitle 配置信息
@return {Array}  一条或者多条记录
498916
function getTipItems(point, titleField) {
    var self = this;
    var origin = point[FIELD_ORIGIN];
    var tipTitle = self.getTipTitle(origin, titleField);
    var tooltipCfg = self.get('tooltipCfg');
    var items = [];
    var name = void 0;
    var value = void 0;

    function addItem(itemName, itemValue, cfg) {
      if (!Util.isNil(itemValue) && itemValue !== '') {
        // 值为null的时候，忽视
        var item = {
          title: tipTitle,
          point: point,
          name: itemName || tipTitle,
          value: itemValue,
          color: point.color || defaultColor,
          marker: true
        };
        item.size = self._getIntervalSize(point);

        items.push(Util.mix({}, item, cfg));
      }
    }

    if (tooltipCfg) {
      var fields = tooltipCfg.fields;
      var cfg = tooltipCfg.cfg;
      var callbackParams = [];
      Util.each(fields, function (field) {
        callbackParams.push(origin[field]);
      });
      if (cfg) {
        // 存在回调函数
        if (Util.isFunction(cfg)) {
          cfg = cfg.apply(null, callbackParams);
        }
        var itemCfg = Util.mix({}, {
          point: point,
          title: tipTitle,
          color: point.color || defaultColor,
          marker: true // 默认展示 marker
        }, cfg);

        itemCfg.size = self._getIntervalSize(point);
        items.push(itemCfg);
      } else {
        Util.each(fields, function (field) {
          if (!Util.isNil(origin[field])) {
            // 字段数据为null ,undefined时不显示
            var scale = self._getScale(field);
            name = getScaleName(scale);
            value = scale.getText(origin[field]);
            addItem(name, value);
          }
        });
      }
    } else {
      var valueScale = self._getTipValueScale();
      if (!Util.isNil(origin[valueScale.field])) {
        // 字段数据为null ,undefined时不显示
        value = self.getTipValue(origin, valueScale);
        name = self.getTipName(origin);
        addItem(name, value);
      }
    }
    return items;
  }
840332
function Tooltip(selector, opts) {
    var _this = this;

    _this.$target = $(selector).eq(0);
    if (!_this.$target.length) {
      return;
    }

    // 已通过 data 属性实例化过，不再重复实例化
    var oldInst = _this.$target.data('mdui.tooltip');
    if (oldInst) {
      return oldInst;
    }

    _this.options = $.extend({}, DEFAULT, (opts || {}));
    _this.state = 'closed';

    // 创建 Tooltip HTML
    _this.$tooltip = $(
      '<div class="mdui-tooltip" id="' + $.guid() + '">' +
        _this.options.content +
      '</div>'
    ).appendTo(document.body);

    // 绑定事件。元素处于 disabled 状态时无法触发鼠标事件，为了统一，把 touch 事件也禁用
    _this.$target
      .on('touchstart mouseenter', function (e) {
        if (this.disabled) {
          return;
        }

        if (!TouchHandler.isAllow(e)) {
          return;
        }

        TouchHandler.register(e);

        _this.open();
      })
      .on('touchend mouseleave', function (e) {
        if (this.disabled) {
          return;
        }

        if (!TouchHandler.isAllow(e)) {
          return;
        }

        _this.close();
      })
      .on(TouchHandler.unlock, function (e) {
        if (this.disabled) {
          return;
        }

        TouchHandler.register(e);
      });
  }
669575
function drawTooltip(){
            tooltipTextContainer = svg.selectAll('.tooltip-group')
                .append('g')
                .classed('tooltip-text select-disable', true);

            tooltipBackground = tooltipTextContainer
              .append('rect')
                .classed('tooltip-background', true)
                .attr('width', width)
                .attr('height', height)
                .attr('rx', backgroundBorderRadius)
                .attr('ry', backgroundBorderRadius)
                .attr('y', - margin.top)
                .attr('x', - margin.left)
                .style('fill', bodyFillColor)
                .style('stroke', borderStrokeColor)
                .style('stroke-width', 1)
                .style('pointer-events', 'none')
                .style('opacity', 0.9);
        }
1358466
function(attr, val) {
		if(this.length) {
			var self = this[0],
				title = 'title',
				api = $.data(self, 'qtip');

			if(attr === title && api && api.options && 'object' === typeof api && 'object' === typeof api.options && api.options.suppress) {
				if(arguments.length < 2) {
					return $.attr(self, oldtitle);
				}

				// If qTip is rendered and title was originally used as content, update it
				if(api && api.options.content.attr === title && api.cache.attr) {
					api.set('content.text', val);
				}

				// Use the regular attr method to set, then cache the result
				return this.attr(oldtitle, val);
			}
		}

		return $.fn['attr'+replaceSuffix].apply(this, arguments);
	}
328178
function highlightDataPoints(dataPoint) {
            cleanDataPointHighlights();

            const nodes = paths.nodes()
            const nodesById = nodes.reduce((acc, node) => {
                acc[node.id] = node

                return acc;
            }, {});

            // Group corresponding path node with its topic, and
            // sorting the topics based on the order of the colors,
            // so that the order always stays constant
            const topicsWithNode = dataPoint.topics
                .map(topic => ({
                    topic,
                    node: nodesById[topic.name]
                }))
                .filter(({topic}) => !!topic)
                .sort((a, b) => topicColorMap[a.topic.name] < topicColorMap[b.topic.name])

            dataPoint.topics = topicsWithNode.map(({topic}) => topic);

            dataPoint.topics.forEach((d, index) => {
                let marker = verticalMarkerContainer
                  .append('g')
                    .classed('circle-container', true)
                      .append('circle')
                        .classed('data-point-highlighter', true)
                        .attr('cx', highlightCircleSize)
                        .attr('cy', 0)
                        .attr('r', highlightCircleRadius)
                        .style('stroke-width', () => (
                            shouldShowAllDataPoints ? highlightCircleStrokeAll : highlightCircleStroke
                        ))
                        .style('stroke', topicColorMap[d.name])
                        .style('cursor', 'pointer')
                        .on('click', function () {
                            addGlowFilter(this);
                            handleHighlightClick(this, d);
                        })
                        .on('mouseout', function () {
                            removeFilter(this);
                        });

                const path = topicsWithNode[index].node;
                const x = xScale(new Date(dataPoint.topics[index].date));
                const y = getPathYFromX(x, path, d.name);

                marker.attr('transform', `translate( ${(-highlightCircleSize)}, ${y} )` );
            });
        }
615924
def _tooltip_data(self, node, value, x, y, classes=None, xlabel=None):
        """"""
        self.svg.node(node, 'desc', class_="value").text = value
        if classes is None:
            classes = []
            if x > self.view.width / 2:
                classes.append('left')
            if y > self.view.height / 2:
                classes.append('top')
            classes = ' '.join(classes)

        self.svg.node(node, 'desc', class_="x " + classes).text = to_str(x)
        self.svg.node(node, 'desc', class_="y " + classes).text = to_str(y)
        if xlabel:
            self.svg.node(node, 'desc', class_="x_label").text = to_str(xlabel)
1351355
function updateTitle(dataPoint) {
            let tTitle = title;
            let formattedDate = formatDate(new Date(dataPoint[dateLabel]));

            if (tTitle.length) {
                if (shouldShowDateInTitle) {
                    tTitle = `${tTitle} - ${formattedDate}`;
                }
            } else {
                tTitle = formattedDate;
            }

            tooltipTitle.text(tTitle);
        }
794359
function getTooltipPosition([mouseX, mouseY]) {
            let tooltipX, tooltipY;

            // show tooltip to the right
            if ((mouseX - tooltipWidth) < 0) {
                // Tooltip on the right
                tooltipX = tooltipWidth - 185;
            } else {
                // Tooltip on the left
                tooltipX = -205
            }

            if (mouseY) {
                tooltipY = tooltipOffset.y;
                // tooltipY = mouseY + tooltipOffset.y;
            } else {
                tooltipY = tooltipOffset.y;
            }

            return [tooltipX, tooltipY];
        }
700814
function titleField (modelName, field, callback) {

    // Make this a no-op unless the field being evaluated is `'title'`.
    if (field !== 'title') {
        return callback(null, field);
    }

    if (get(modelName, true).schema.paths[field]) {
        return callback(null, field);
    }

    model(modelName, (err, opts) => {

        if (err) {
            return callback(err);
        }

        return callback(null, opts.title);

    });

}
479559
private void showTooltip() {
    Wrap tooltipLabel = new Wrap(toolTipWrapWidth);
    tooltipLabel.setForeground(getForeground());
    tooltipLabel.setFont(ToolTipButton.this.getFont());
    tooltipLabel.setText(text);

    JPanel panel = new JPanel();
    panel.setBackground(toolTipBackground);
    panel.setLayout(new BorderLayout());
    panel.add(tooltipLabel, BorderLayout.CENTER);


    if (extraComponent != null && extraComponentAnchor != null) {
      if (extraComponentAnchor.equals(ToolTipButtonAnchor.SOUTH)) {
        panel.add(extraComponent, BorderLayout.SOUTH);
      }
      else if (extraComponentAnchor.equals(ToolTipButtonAnchor.NORTH)) {
        panel.add(extraComponent, BorderLayout.NORTH);
      }
      else if (extraComponentAnchor.equals(ToolTipButtonAnchor.EAST)) {
        panel.add(extraComponent, BorderLayout.EAST);
      }
      else if (extraComponentAnchor.equals(ToolTipButtonAnchor.WEST)) {
        panel.add(extraComponent, BorderLayout.WEST);
      }
    }

    Border out = BorderFactory.createLineBorder(borderColor, borderThickness);
    Border in =
      BorderFactory.createEmptyBorder(margin.top, margin.left, margin.bottom,
        margin.right);
    Border border = BorderFactory.createCompoundBorder(out, in);
    panel.setBorder(border);

    popup = new JPopupMenu();
    popup.setBorder(BorderFactory.createEmptyBorder());
    popup.add(panel);

    popup.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseExited(MouseEvent e) {
        tryDisposeTooltip();
      }
    });

    popup.pack();
    popup.show(ToolTipButton.this, 0, getHeight());

    Point point = popup.getLocationOnScreen();
    Dimension dim = popup.getSize();
    popupBounds =
      new Rectangle2D.Double(point.getX(), point.getY(), dim.getWidth(),
        dim.getHeight());
  }
487876
@Override
  protected void toggleTooltip(Node reference, Control below) {
    String fieldTooltip = field.getTooltip();

    if ((reference.isFocused() || reference.isHover())
        && (!fieldTooltip.equals("") || field.getErrorMessages().size() > 0)) {
      tooltip.setText((!fieldTooltip.equals("") ? fieldTooltip + "\n" : "")
          + String.join("\n", field.getErrorMessages()));

      if (tooltip.isShowing()) {
        return;
      }

      Point2D p = below.localToScene(0.0, 0.0);

      tooltip.show(
          reference.getScene().getWindow(),
          p.getX() + reference.getScene().getX() + reference.getScene().getWindow().getX(),
          p.getY() + reference.getScene().getY() + reference.getScene().getWindow().getY()
              + below.getHeight() + 5
      );
    } else {
      tooltip.hide();
    }
  }
596942
function () {
      
      // Set title and content depending on current index
      this.setTitle(DemoAvatars.Avatars[DemoAvatars.current]);
      this.content.css({backgroundImage: 'url(https://stephanwagner.me/img/jBox/avatar/' + DemoAvatars.Avatars[DemoAvatars.current] + '.svg)'});
      
      // If it's the inital jBox, show the tooltips after a short delay
      initial && setTimeout(function () {
        
        // We are creating the two tooltips in a loop as they are very similar
        $.each(['Dislike', 'Like'], function (index, item) {
          
          // We store the tooltips in the global var so we can refer to them later
          DemoAvatars['AvatarsTooltip' + item] = new jBox('Tooltip', {
            theme: 'TooltipBorder',
            addClass: 'AvatarsTooltip AvatarsTooltip' + item,
            minWidth: 110,
            content: item,
            position: {
              y: 'bottom'
            },
            offset: {
              y: 5
            },
            target: '#AvatarsInitial .jBox-footer .button-' + (item == 'Like' ? 'heart' : 'cross'),
            animation: 'move',
            zIndex: 11000,
            
            // Abort opening the tooltips when we clicked on a like or dislike button already
            onOpen: function () {
              DemoAvatars.clicked && this.close();
            }
          }).open();
          
        });
        
      }, 500);
    }
1009594
function _handleAddTooltip(tooltipType) {
    let initString = getCurrentConfig();
    let tooltipInitString = tooltipConfigs[tooltipType].initString;
    initString = initString.concat(tooltipInitString);
    configEditor.setValue(prettifyInitString(initString));
    setNewChart();
}
834501
function (tooltip, target) {
            if (!(tooltip instanceof Tooltip)) {
                tooltip = this.getTooltipByNameAndTarget(tooltip, target);
            }
            if (tooltip) {
                var i = this.$tooltips.indexOf(tooltip);
                this.$tooltips.splice(i, 1);
                this.$container.removeChild(tooltip);
            }
        }
506279
public void setTooltip(final String tooltip) {
		String escapedXMLContent = this.xmlUtil.escapeXMLContent(tooltip);
		if (escapedXMLContent.contains("\n")) {
			escapedXMLContent = escapedXMLContent.replaceAll("\r?\n", "</text:p><text:p>");
		}

		this.tooltip = escapedXMLContent;
	}
289542
function (pointFormat) {
		
		// Insert options for valueDecimals, valuePrefix, and valueSuffix
		var series = this.series,
			seriesTooltipOptions = series.tooltipOptions,
			valueDecimals = pick(seriesTooltipOptions.valueDecimals, ''),
			valuePrefix = seriesTooltipOptions.valuePrefix || '',
			valueSuffix = seriesTooltipOptions.valueSuffix || '';
			
		// Loop over the point array map and replace unformatted values with sprintf formatting markup
		each(series.pointArrayMap || ['y'], function (key) {
			key = '{point.' + key; // without the closing bracket
			if (valuePrefix || valueSuffix) {
				pointFormat = pointFormat.replace(key + '}', valuePrefix + key + '}' + valueSuffix);
			}
			pointFormat = pointFormat.replace(key + '}', key + ':,.' + valueDecimals + 'f}');
		});
		
		return format(pointFormat, {
			point: this,
			series: this.series
		});
	}
511427
function FieldLabel(props) {
    var label = props.label, indicator = props.indicator, tooltipProps = props.tooltipProps, infoIconProps = props.infoIconProps;
    var indicatorEl = null;
    if (indicator === 'optional') {
        indicatorEl = React.createElement("span", { className: 'indicator' }, "(optional)");
    }
    if (indicator === 'required') {
        indicatorEl = React.createElement("span", { className: 'indicator' }, "*");
    }
    var indicatorClass = classNames({
        'optional': props.indicator === 'optional',
        'required': props.indicator === 'required'
    });
    var tooltipEl = null;
    if (infoIconProps && tooltipProps != null) {
        tooltipEl = React.createElement(tooltip_1.Tooltip, { tooltip: tooltipProps.tooltip, tooltipAlignment: tooltipProps.tooltipAlignment, tooltipPosition: tooltipProps.tooltipPosition },
            React.createElement(info_icon_1.InfoIcon, { iconContent: infoIconProps.iconContent, iconCustomTypeName: infoIconProps.iconCustomTypeName }));
    }
    else if (tooltipProps != null) {
        tooltipEl = React.createElement(tooltip_1.Tooltip, { tooltip: tooltipProps.tooltip, tooltipAlignment: tooltipProps.tooltipAlignment, tooltipPosition: tooltipProps.tooltipPosition });
    }
    else if (infoIconProps != null) {
        tooltipEl = React.createElement(info_icon_1.InfoIcon, { iconContent: infoIconProps.iconContent, iconCustomTypeName: infoIconProps.iconCustomTypeName });
    }
    return React.createElement("div", { className: indicatorClass },
        label,
        " ",
        indicatorEl,
        " ",
        tooltipEl);
}