有没有办法删除Apexcharts线图底部的气泡盒?
尚未找到一种方法,只要悬停在线图的底部,就可以删除或隐藏气泡盒。已经检查了该文档,但我仍然没有找到它,或者我只是缺少一些东西。抱歉,这个问题仍然是初学者,当涉及到Angular和ApexCharts时。
这是样本: https ://codesandbox.io/s/apx-line-basic-forked-iltgss?file =/src/app/app/app.component.html
我想删除的图片: https://i.sstatic.net/8wuob.jpg
//i.sstatic.net/8wuob.jpg
import { Component, ViewChild } from "@angular/core";
import {
ChartComponent,
ApexAxisChartSeries,
ApexChart,
ApexXAxis,
ApexYAxis,
ApexStroke,
ApexGrid,
ApexFill,
ApexTooltip
} from "ng-apexcharts";
export type ChartOptions = {
series: ApexAxisChartSeries;
chart: ApexChart;
xaxis: ApexXAxis;
yaxis: ApexYAxis;
grid: ApexGrid;
stroke: ApexStroke;
fill: ApexFill;
tooltip: ApexTooltip;
};
@Component({
selector: "app-root",
templateUrl: "./app.component.html",
styleUrls: ["./app.component.css"]
})
export class AppComponent {
@ViewChild("chart") chart: ChartComponent;
public chartOptions: Partial<ChartOptions>;
constructor() {
this.chartOptions = {
series: [
{
name: "",
data: [2, 10, 18, 22, 36, 15, 47, 75, 65, 19, 14, 2, 47, 42, 15]
}
],
chart: {
height: 350,
type: "line",
toolbar: {
show: false
},
zoom: {
enabled: false
}
},
stroke: {
curve: "smooth"
},
grid: {
show: false
},
xaxis: {
labels: {
show: false
},
axisBorder: {
show: false
}
},
yaxis: {
show: false
},
fill: {
type: "gradient",
gradient: {
shade: "dark",
gradientToColors: ["#5156be"],
shadeIntensity: 1,
type: "horizontal",
opacityFrom: 1,
opacityTo: 1,
stops: [100]
}
},
tooltip: {
enabled: true,
followCursor: false,
marker: {
show: false
},
x: {
show: false
},
y: {
formatter: undefined,
title: {
formatter: (seriesName) => seriesName
}
}
}
};
}
}
> html
<div id="chart">
<apx-chart
[series]="chartOptions.series"
[chart]="chartOptions.chart"
[xaxis]="chartOptions.xaxis"
[yaxis]="chartOptions.yaxis"
[grid]="chartOptions.grid"
[stroke]="chartOptions.stroke"
[fill]="chartOptions.fill"
[tooltip]="chartOptions.tooltip"
></apx-chart>
</div>
Haven't found a way to remove or hide the bubble box at the bottom of the line chart whenever it is hovered. Already checked the documentation and I still didn't found it, or I was just missing something. Sorry for the question, still a beginner when it comes to Angular and using apexcharts.
Heres the sample: https://codesandbox.io/s/apx-line-basic-forked-iltgss?file=/src/app/app.component.html
Picture of what I want to remove: https://i.sstatic.net/8WUoB.jpg
app.component.ts
import { Component, ViewChild } from "@angular/core";
import {
ChartComponent,
ApexAxisChartSeries,
ApexChart,
ApexXAxis,
ApexYAxis,
ApexStroke,
ApexGrid,
ApexFill,
ApexTooltip
} from "ng-apexcharts";
export type ChartOptions = {
series: ApexAxisChartSeries;
chart: ApexChart;
xaxis: ApexXAxis;
yaxis: ApexYAxis;
grid: ApexGrid;
stroke: ApexStroke;
fill: ApexFill;
tooltip: ApexTooltip;
};
@Component({
selector: "app-root",
templateUrl: "./app.component.html",
styleUrls: ["./app.component.css"]
})
export class AppComponent {
@ViewChild("chart") chart: ChartComponent;
public chartOptions: Partial<ChartOptions>;
constructor() {
this.chartOptions = {
series: [
{
name: "",
data: [2, 10, 18, 22, 36, 15, 47, 75, 65, 19, 14, 2, 47, 42, 15]
}
],
chart: {
height: 350,
type: "line",
toolbar: {
show: false
},
zoom: {
enabled: false
}
},
stroke: {
curve: "smooth"
},
grid: {
show: false
},
xaxis: {
labels: {
show: false
},
axisBorder: {
show: false
}
},
yaxis: {
show: false
},
fill: {
type: "gradient",
gradient: {
shade: "dark",
gradientToColors: ["#5156be"],
shadeIntensity: 1,
type: "horizontal",
opacityFrom: 1,
opacityTo: 1,
stops: [100]
}
},
tooltip: {
enabled: true,
followCursor: false,
marker: {
show: false
},
x: {
show: false
},
y: {
formatter: undefined,
title: {
formatter: (seriesName) => seriesName
}
}
}
};
}
}
HTML
<div id="chart">
<apx-chart
[series]="chartOptions.series"
[chart]="chartOptions.chart"
[xaxis]="chartOptions.xaxis"
[yaxis]="chartOptions.yaxis"
[grid]="chartOptions.grid"
[stroke]="chartOptions.stroke"
[fill]="chartOptions.fill"
[tooltip]="chartOptions.tooltip"
></apx-chart>
</div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Xaxis中禁用工具提示 https://apexcharts.com/com/docs/docs/docs/options/xaxis/xaxis/xaxis/xaxis/xaxis/#tooltip < /a>
Disable tooltip in xaxis https://apexcharts.com/docs/options/xaxis/#tooltip