sync slide with charts

parent 1245418e
......@@ -32,6 +32,9 @@ document.getElementById("myChart").onclick = function (evt) {
layerDate: label
});
// update date slider
$('input[id="inputRange"]').val(firstPoint._index);
//console.log(myChart.legend.legendItems[firstPoint._datasetIndex].text) //nombre de la capa a la que pertenece (vegetación, agua, etc.)
//if (!firstPoint) return;
activePoints.forEach(function (value, index) {
......
......@@ -313,8 +313,6 @@
var sliderPos = slider3.value / slider3.max;
var pixelPostion = slider3.clientWidth * sliderPos;
//this is your pixel value
console.log(pixelPostion);
addImageLayer({
layerDate: valor
......@@ -324,12 +322,9 @@
$("#maptitle").append("Map Date: " + fecha);
$("#tooltiptext").empty();
$("#tooltiptext").append(fecha);
console.log(position);
$("#rangecontrol2").empty();
$("#rangecontrol2").append('<span class="arrow_box" id="tooltiptext">'+fecha+'</span>');
$('.arrow_box').css({'left':Math.round(pixelPostion-35) + 'px'})
});
/*
var slider2 = document.getElementById("inputRange");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment