New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltip 在非 horizontal 模式下会被线图中的选点挡住,如图。 #216

Closed
iflamed opened this Issue Jul 28, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@iflamed

iflamed commented Jul 28, 2018

  • F2 Version: 3.x
  • Platform: Chrome & Wechat Miniprogramm
  • Mini Showcase(like screenshots):

screen shot 2018-07-28 at 5 59 23 pm

chart.tooltip({
    showTitle: true,
    layout: 'v',
    offsetY: 80,
    showCrosshairs: false,
    onChange: function onChange(obj) {
      var legend = chart.get('legendController').legends.top[0];
      var tooltipItems = obj.items;
      var legendItems = legend.items;
      var map = {};
      legendItems.map(function(item) {
        map[item.name] = _.clone(item);
      });
      tooltipItems.map(function(item) {
        var name = item.name;
        var value = item.value;
        if (map[name]) {
          map[name].value = value;
        }
      });
      legend.setItems(_.values(map));
    },
    onHide: function onHide() {
      var legend = chart.get('legendController').legends.top[0];
      legend.setItems(chart.getLegendItems().country);
    }
  })

利用上面的代码,就可以重现。期望Tooltip 应该在图标上层。

@simaQ simaQ self-assigned this Jul 29, 2018

@simaQ simaQ added the bug label Jul 29, 2018

@simaQ simaQ closed this in 2b83bb8 Jul 31, 2018

simaQ added a commit that referenced this issue Jul 31, 2018

Merge pull request #219 from antvis/fix-tooltip
fix: Fix problem with element zIndex in tooltip. Closed #216
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment