微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

没有过载匹配此调用

如何解决没有过载匹配此调用

我正在使用 angular 图表中的时间轴系列

我一步一步地跟着,但我得到了错误,我不明白错误有人可以帮助我这对我的项目很重要,或者可以建议我图书馆或其他任何有角度的时间线

html:

<div id="container"></div>

代码

 timeLine(){
    Highcharts.chart('container',{ << error in container

      chart: {
        type: 'timeline'
      },xAxis: {
        type: 'datetime',visible: false
      },yAxis: {
        visible: false
      },title: {
        text: 'Timeline of Space Exploration'
      },subtitle: {
        text: 'Info source: <a href="https://en.wikipedia.org/wiki/Timeline_of_space_exploration">www.wikipedia.org</a>'
      },series: [{
        dataLabels: {
          allowOverlap: false,connectorColor: 'silver',connectorWidth: 2
        },marker: {
          symbol: 'circle'
        },useHTML: true,data: [{
          name: 'First dogs <span style="font-family: FontAwesome; color:red">\uf1b0</span>',label: '1951: First dogs in space',description: '22 July 1951 First dogs in space (Dezik and Tsygan) '
        },{useHTML: true,name: 'Sputnik 1 <span style="font-family: FontAwesome; color:red">\uf135</span',label: '1957: First artificial satellite<i class="fas fa-satellite"></i>',description: '4 October 1957 First artificial satellite. First signals from space.'
        },{
          name: 'First human spaceflight  <span style="font-family: FontAwesome; color:red">\uf183</span>',label: '1961: First human spaceflight (Yuri Gagarin)',description: 'First human spaceflight (Yuri Gagarin),and the first human-crewed orbital flight'
        },{
          name: 'First human on the Moon <span style="font-family: FontAwesome; color:blue">\uf186</span>',label: '1969: First human on the Moon',description: 'First human on the Moon,and first space launch from a celestial body other than the Earth. First sample return from the Moon.'
        }]
      }]
    });
  }

错误:我不明白错误以及我应该怎么做?

586:22 - error TS2769: No overload matches 
this call.

  Overload 1 of 2,'(options: Options,callback?: ChartCallbackFunction): Chart',gave the following error.
        Type '"container"' has no properties in common with type 'Options'.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。