You've already forked phpmyadmin
mirror of
https://github.com/phpmyadmin/phpmyadmin.git
synced 2026-11-01 23:14:58 +03:00
Added "Reset Zoom" link that reverts the plot to original display.
This commit is contained in:
@@ -495,12 +495,23 @@ $(document).ready(function() {
|
||||
title: { text: 'Query Results' },
|
||||
xAxis: {
|
||||
title: { text: $('#tableid_0').val() },
|
||||
events: {
|
||||
setExtremes: function(e){
|
||||
this.resetZoom.show();
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
yAxis: {
|
||||
min: null,
|
||||
title: { text: $('#tableid_1').val() },
|
||||
endOnTick: false,
|
||||
startOnTick: false
|
||||
startOnTick: false,
|
||||
events: {
|
||||
setExtremes: function(e){
|
||||
this.resetZoom.show();
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -678,7 +689,20 @@ $(document).ready(function() {
|
||||
setZoom();
|
||||
}
|
||||
});
|
||||
//Add reset zoom feature
|
||||
currentChart.yAxis[0].resetZoom = currentChart.xAxis[0].resetZoom = $('<a href="#">Reset zoom</a>')
|
||||
.appendTo(currentChart.container)
|
||||
.css({
|
||||
position: 'absolute',
|
||||
top: 10,
|
||||
right: 20,
|
||||
display: 'none'
|
||||
})
|
||||
.click(function(){
|
||||
currentChart.xAxis[0].setExtremes(null, null)
|
||||
currentChart.yAxis[0].setExtremes(null, null)
|
||||
this.style.display = 'none'
|
||||
});
|
||||
scrollToChart();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user