Chart improvements

This commit is contained in:
emanuele-f 2018-10-24 13:20:02 +02:00
parent 1c1e84c5a3
commit 1be5659c0b
4 changed files with 13 additions and 2 deletions

View file

@ -289,6 +289,14 @@ function has_initial_zoom() {
var current_zoom_level = (history.state) ? (history.state.zoom_level) : 0;
function fixJumpButtons(epoch_end) {
var duration = $("#btn-jump-time-ahead").data("duration");
if((epoch_end + duration)*1000 > $.now())
$("#btn-jump-time-ahead").addClass("disabled");
else
$("#btn-jump-time-ahead").removeClass("disabled");
};
// add a new updateStackedChart function
function attachStackedChartCallback(chart, schema_name, chart_id, zoom_reset_id, flows_dt, params, step, align_step, show_all_smooth, initial_range) {
var pending_request = null;
@ -423,6 +431,8 @@ function attachStackedChartCallback(chart, schema_name, chart_id, zoom_reset_id,
chart.is_zoomed = false;
}
fixJumpButtons(params.epoch_end);
if(current_zoom_level > 0)
$zoom_reset.show();
else

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long