This is my tooltip configuration for a Highstock area chart :
Code: Select all
tooltip: {
shape: "square",
crosshairs: true,
followPointer: true,
followTouchMove: true,
headerShape: "callout",
borderWidth: 0,
shadow: false,
stickOnContact: true,
backgroundColor: "#fff",
display: 'flex',
flexDirection: 'column',
formatter: function () {
return getCustomFormatter(this, '300px');
},
}
Code: Select all
function getCustomFormatter(dataset) {
const style = `
display: flex:
flexDirection: column;
`;
return `<div style="${style}">
<p>dataset.x</p>
<p>dataset.y<p>
</div>`;
}
Can someone please help me out?