I want to replace the default tooltip generated by google charts with the HTML one created by me. I've added the new column { type: 'string', role: 'tooltip', p: { html: true } }
, I've also added the tooltip: { isHtml: true },
to chart options like it's suggested in the documentation, but instead of replacing the default tooltip, the html that I'm passing gets appended at the end of the end of the default tooltip.
How can I replace the entire default tooltip with provided HTML?
First two rows from dataTable object:
Tooltip:
Chart options:
options: {
focusTarget: 'category',
animation: {
startup: true,
easing: 'out',
duration: 500,
},
tooltip: {
isHtml: true
},
height: '250',
interpolateNulls: true,
chartArea: {
width: '90%',
height: '79%',
},
vAxes: {
0: {
titlePosition: 'none',
textStyle: {
color: '#febd02',
bold: true,
fontSize: 13,
},
format: '#',
gridlines: {
color: '#eaeaea',
count: '5',
},
},
1: {
titlePosition: 'none',
format: '#',
gridlines: {
color: 'transparent'
},
},
2: {
groupWidth: '100%',
titlePosition: 'none',
textStyle: {
color: '#0284ff',
bold: true,
fontSize: 13,
},
format: 'decimal',
gridlines: {
color: 'transparent'
},
},
},
hAxis: {
textStyle: {
color: '#393939',
bold: true,
fontSize: 13,
},
format: 'MMM d, YYYY',
gridlines: {
count: 0,
color: 'transparent'
},
ticks: [],
},
series: {
0: {
targetAxisIndex: 0,
type: 'area',
},
1: {
type: 'line'
},
2: {
targetAxisIndex: 2,
type: 'bars',
dataOpacity: 0.5,
},
},
colors: [
'#febd02',
'#a5a5a5',
'#0284ff',
],
bar: {
groupWidth: '35'
},
legend: {
position: 'none'
},
},