这是我第一次尝试ApexCharts。我实际上是在ColdFusion内部运行它。以下是代码:
tooltip: {
shared: false,
intersect: false,
y: {
formatter: function (y) {
if(typeof y !== "undefined") {
return y.toFixed(0) + " points";
}
return y;
}
}
}当我查看输出时,我看到了以下工具提示:

我正在寻找删除工具提示中的单词“点”的方法。另外,是否可以改变区域/线条的颜色?
发布于 2022-07-06 08:41:59
您的formatter在这一行中添加了这个单词
return y.toFixed(0) + " points";只是不要在末尾添加字符串
return y.toFixed(0);这就是在选项https://apexcharts.com/docs/options/colors/中定义颜色数组的方式
colors: ['#546E7A', ...]您也可以在series中这样做
series: [
{
name: "Series 1",
data: [...],
color: '#546E7A'
},
...
],https://stackoverflow.com/questions/72875784
复制相似问题