i googled back and forth but i simply can not get rid of the shadow for the tooltip.
i have my tooltip config set to this:
Code: Select all
tooltip: {
useHTML: true,
shadow: false,
formatter: function () {
return controller._tooltipFormatter(this.point);
}
},
Code: Select all
_tooltipFormatter(point) {
if (!point.value) {
return `<div><b>${point.name}</b></div>`;
}
const marketCap = point.value;
const sector = point.sector;
const industry = point.industry;
const companyName = point.companyName || point.name;
const formatMarketCap = (value) => {
if (value >= 1e12) {
return (value / 1e12).toFixed(2) + ' tln';
} else if (value >= 1e9) {
return (value / 1e9).toFixed(2) + ' bln';
} else if (value >= 1e6) {
return (value / 1e6).toFixed(2) + ' mln';
}
return value + ' USD';
};
const formattedMarketCap = formatMarketCap(marketCap);
const companyRow = companyName ? `<div><b>${companyName}</b></div>` : '';
const industryRow = industry ? `<div>Industry: ${industry}</div>` : '';
const sectorRow = sector ? `<div>Sector: ${sector}</div>` : '';
const marketCapRow = formattedMarketCap ? `<div>Market Cap: <b>${formattedMarketCap}</b></div>` : '';
const pctChangeRow = point.formattedPctChange !== undefined ? `<div>Percent Change: <b>${point.formattedPctChange}%</b></div>` : '';
return `
<div style="
font-size: 2em;
padding: 2rem;
background-color: var(--secondary);
color: var(--text);
z-index: 999">
${companyRow}
${industryRow}
${sectorRow}
${marketCapRow}
${pctChangeRow}
</div>
`;
}
can someone point me towards where i go wrong?