Professional Documents
Culture Documents
Marker - On ('Mouseover', Function (
Marker - On ('Mouseover', Function (
on('mouseover', function() {
chartDiv.style.display = 'block';
var tempData = [{
x: tempResults.data.map(d => new Date(d.timestamp)),
y: tempResults.data.map(d => parseFloat(d.value)),
type: 'scatter',
mode: 'lines',
name: 'Temperature',
line: {
color: '#6c584c',
width: 2
}
}];
var rainData = [{
x: rainResults.data.map(d => new Date(d.timestamp)),
y: rainResults.data.map(d => parseFloat(d.value)),
type: 'bar',
name: 'Padavine',
yaxis: 'y2',
marker: {
color: '#0077b6'
}
}];
marker.on('mouseout', function() {
chartDiv.style.display = 'none';
});