【问题标题】:how to render angular directive in Highcharts tool tip in Angular8如何在Angular 8的Highcharts工具提示中呈现角度指令
【发布时间】:2020-12-02 12:03:39
【问题描述】:

我在 Angular 项目中使用 Highcharts。我们有一组非常复杂的工具提示要显示,所以想知道是否可以在 Highcharts 工具提示中呈现角度指令。

这里是 Highcharts 代码的 sn-p,我想从工具提示中渲染 html,它是 angular 组件。

tooltip : {
  userHTML: true,
  formatter: function() {
    return "<app-tooltip></app-tooltip>";
  }
}

这里是工具提示组件

import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-tooltip',
  templateUrl: './tooltip.component.html',
  styleUrls: ['./tooltip.component.scss']
})
export class TooltipComponent implements OnInit {

  constructor() { }

  ngOnInit() {
  }

}

组件的HTML如下

<p>tooltip </p>

但它不会渲染任何东西。是否可以通过这种方式指定工具提示?

【问题讨论】:

    标签: javascript angular highcharts


    【解决方案1】:

    很遗憾,目前还不可能做到这一点。 在issue 中了解更多信息。
    您也可以在 thread 中发表评论,这是首次提出此问题的地方。

    【讨论】:

    • 非常感谢。我将在该线程上发表评论
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多