我正在將頂點(diǎn)圖表集成到我的角度應(yīng)用程序中,實(shí)現(xiàn)頂點(diǎn)折線圖。我想隱藏嘗試啟用選項(xiàng)的工具提示:false。但沒有工作。甚至無法將自定義工具提示設(shè)置為折線圖。當(dāng)懸停在系列上時(shí),它顯示一些垂直虛線,我需要隱藏工具提示或隱藏垂直虛線并創(chuàng)建自定義工具提示。任何建議都會(huì)很有幫助。謝謝。import { Component, ViewChild, OnInit } from '@angular/core';import { ChartComponent, ApexAxisChartSeries, ApexChart, ApexXAxis, ApexDataLabels, ApexTitleSubtitle, ApexStroke, ApexGrid, ApexLegend, ApexTooltip, ApexYAxis,} from 'ng-apexcharts';export interface ChartOptions { series: ApexAxisChartSeries; chart: ApexChart; xaxis: ApexXAxis; yaxis: ApexYAxis; dataLabels: ApexDataLabels; grid: ApexGrid; stroke: ApexStroke; title: ApexTitleSubtitle; legend: ApexLegend; tooltip: ApexTooltip;}@Component({ selector: 'app-line-chart', templateUrl: './line-chart.component.html', styleUrls: ['./line-chart.component.css'],})export class LineChartComponent implements OnInit { @ViewChild('lineChart') lineChart: ChartComponent; public chartOptions: Partial<ChartOptions>; constructor() {} ngOnInit(): void { this.chartOptions = { series: [ { name: 'Desktops', data: [10, 41, 35, 51, 49, 62, 69, 91, 148], }, { name: 'Laptops', data: [22, 55, 66, 77, 88, 99, 90, 110, 170], }, ], chart: { height: 350, type: 'line', zoom: { enabled: false, }, toolbar: { tools: { download: false, }, }, }, dataLabels: { enabled: false, }, stroke: { curve: 'straight', }, grid: { row: { colors: ['#f3f3f3', 'transparent'], // takes an array which will be repeated on columns opacity: 0.5, }, }, yaxis: { tooltip: { enabled: false, }, },
如何在 ng-apexchart 中禁用工具提示
慕沐林林
2023-02-24 16:16:41