【发布时间】:2021-06-03 16:18:32
【问题描述】:
我有这个加载谷歌趋势图的功能。它有效,但如果我用新数据再次调用它,图表就会重复!我该如何解决这个问题?
loadGraph(div: HTMLElement, type: string) {
trends.embed.renderExploreWidgetTo(div, type,
{
comparisonItem: this.keyWords,
category: 0,
property: ""
},
{
exploreQuery: "geo=MX&q=chamarras%20de%20piel&date=today 12-m",
guestPath:"https://trends.google.es:443/trends/embed/"
});}
数据:
keyWords: any[] = [
{
keyword: "some word",
geo: "US",
time:"today 12-m"
}]
【问题讨论】:
标签: javascript html typescript api