charts - 如何更改工具提示的位置
问题描述
js 我在栏顶部的工具提示的工具提示位置遇到问题,如下图所示我如何在栏顶部创建工具提示我检查了文档但我没有找到 ,但我的工具提示显示如下
谁能指导我如何将我的工具提示放在栏的顶部这是我的代码?
datasets=[
{
label: 'food variance',
data: verticalData,
barPercentage: 10,
barThickness: 30,
maxBarThickness: 30,
hoverBackgroundColor: '#4946D2',
borderDash: 1,
backgroundColor: '#eeeff7',
},
]
options = {
tooltips: {
backgroundColor: '#4946D2',
},
// responsive: true,
maintainAspectRatio: false,
scales: {
yAxes: [
{
ticks: {
beginAtZero: true,
maxBarThickness: 20,
callback: (value) => callBack(value),
},
gridLines: {
borderDash: [8, 9],
},
},
],
xAxes: [
{
ticks: {
fontSize: 12,
},
gridLines: {
zeroLineColor: 'white',
display: false,
},
},
],
},
legend: {
position: 'top',
align: 'end',
display: display,
labels: {
fontSize: 10,
fontColor: 'grey',
usePointStyle: true,
},
},
}
解决方案
推荐阅读
- tensorflow - 如何保存网络的一部分?
- sql - 插入带有 WITH 子句的表在 postgres 中不起作用
- mysql - SQL:替代 COALESCE() 函数,将所有值分组到一列
- html - div-contaier 中带有滚动条的 CSS 网格
- sublimetext3 - 如何在 sublime text 3 中搜索带有特殊字符的特定文本?
- jquery - 使用 Angular 中的过滤器更新列表
- ios - 忘记了 Fastlane 匹配密码
- python - loc[~*value*]的含义和实现
- vue.js - Vuejs
相同的路线但不同的参数 - dart - 如何在 SingleChildScrollView 中放置一个列表视图但防止它们单独滚动?