I am using ApexChart and I would like to add som more info to the tooltip (that shows on hover). I have read the documentation but I really don´t understand how to do it.
My problem is that I don't understand where I should add that extra data and how I can make it show in the tooltip?
Right now I only see the default in the tooltip, which is the name of the series and "y" value. I would like to see:
- Price: (x value)
- Number: (y value)
- Product: 'name',
- Info: 'info',
- Site: 'name'
How can I add this to the tooltip? This is what I got so far:
Fiddle: https://jsfiddle.net/9m0r2ont/1/
Code:
var options = {
chart: {
height: 380,
width: "100%",
type: "scatter",
},
series: [
{
name: "Series 1",
data: [
{
x: 100,
y: 50,
product: 'name',
info: 'info',
site: 'name'
},
{
x: 150,
y: 55,
product: 'name',
info: 'info',
site: 'name'
}
]
}
],
xaxis: {
type: "numeric"
}
};
var chart = new ApexCharts(document.querySelector("#chart"), options);
chart.render();