destroy_on_hide: false, // destroy charts when they are not visible
show_help: true, // when enabled the charts will show some help
+ show_help_delay_show_ms: 500,
+ show_help_delay_hide_ms: 0,
eliminate_zero_dimensions: true, // do not show dimensions with just zeros
color_fill_opacity_stacked: 0.8,
pan_and_zoom_step: 0.1, // the increment when panning and zooming with the toolbox
+ pan_and_zoom_step_multiplier_shift: 2,
+ pan_and_zoom_step_multiplier_alt: 5,
+ pan_and_zoom_step_multiplier_control: 10,
setOptionCallback: function() { ; }
},
this.element_legend.innerHTML = '';
if(this.library.toolboxPanAndZoom !== null) {
+
+ function get_pan_and_zoom_step(event) {
+ if (event.shiftKey)
+ return NETDATA.options.current.pan_and_zoom_step * NETDATA.options.current.pan_and_zoom_step_multiplier_shift;
+ else if (event.altKey)
+ return NETDATA.options.current.pan_and_zoom_step * NETDATA.options.current.pan_and_zoom_step_multiplier_alt;
+ else if (event.ctrlKey)
+ return NETDATA.options.current.pan_and_zoom_step * NETDATA.options.current.pan_and_zoom_step_multiplier_control;
+ else
+ return NETDATA.options.current.pan_and_zoom_step;
+ }
+
this.element_legend_childs.toolbox.className += ' netdata-legend-toolbox';
this.element.appendChild(this.element_legend_childs.toolbox);
this.element_legend_childs.toolbox.appendChild(this.element_legend_childs.toolbox_left);
this.element_legend_childs.toolbox_left.onclick = function(e) {
e.preventDefault();
- var dt = (that.view_before - that.view_after) * NETDATA.options.current.pan_and_zoom_step;
+
+ var dt = (that.view_before - that.view_after) * get_pan_and_zoom_step(e);
var before = that.view_before - dt;
var after = that.view_after - dt;
if(after >= that.netdata_first)
html: true,
trigger: 'hover',
placement: 'bottom',
- delay: 100,
+ delay: { show: NETDATA.options.current.show_help_delay_show_ms, hide: NETDATA.options.current.show_help_delay_hide_ms },
title: 'Pan Left',
content: 'Pan the chart to the left. You can also <b>drag it</b> with your mouse or your finger (on touch devices).<br/><small>Help, can be disabled from the settings.</small>'
});
html: true,
trigger: 'hover',
placement: 'bottom',
- delay: 100,
+ delay: { show: NETDATA.options.current.show_help_delay_show_ms, hide: NETDATA.options.current.show_help_delay_hide_ms },
title: 'Chart Reset',
content: 'Reset all the charts to their default auto-refreshing state. You can also <b>double click</b> the chart contents with your mouse or your finger (on touch devices).<br/><small>Help, can be disabled from the settings.</small>'
});
this.element_legend_childs.toolbox.appendChild(this.element_legend_childs.toolbox_right);
this.element_legend_childs.toolbox_right.onclick = function(e) {
e.preventDefault();
- var dt = (that.view_before - that.view_after) * NETDATA.options.current.pan_and_zoom_step;
+ var dt = (that.view_before - that.view_after) * get_pan_and_zoom_step(e);
var before = that.view_before + dt;
var after = that.view_after + dt;
if(before <= that.netdata_last)
html: true,
trigger: 'hover',
placement: 'bottom',
- delay: 100,
+ delay: { show: NETDATA.options.current.show_help_delay_show_ms, hide: NETDATA.options.current.show_help_delay_hide_ms },
title: 'Pan Right',
content: 'Pan the chart to the right. You can also <b>drag it</b> with your mouse or your finger (on touch devices).<br/><small>Help, can be disabled from the settings.</small>'
});
this.element_legend_childs.toolbox.appendChild(this.element_legend_childs.toolbox_zoomin);
this.element_legend_childs.toolbox_zoomin.onclick = function(e) {
e.preventDefault();
- var dt = (that.view_before - that.view_after) * NETDATA.options.current.pan_and_zoom_step;
+ var dt = (that.view_before - that.view_after) * get_pan_and_zoom_step(e);
var before = that.view_before - dt;
var after = that.view_after + dt;
that.library.toolboxPanAndZoom(that, after, before);
html: true,
trigger: 'hover',
placement: 'bottom',
- delay: 100,
+ delay: { show: NETDATA.options.current.show_help_delay_show_ms, hide: NETDATA.options.current.show_help_delay_hide_ms },
title: 'Chart Zoom In',
content: 'Zoom in the chart. You can also press SHIFT and select an area of the chart to zoom in. On Chrome and Opera, you can press the SHIFT or the ALT keys and then use the mouse wheel to zoom in or out.<br/><small>Help, can be disabled from the settings.</small>'
});
this.element_legend_childs.toolbox.appendChild(this.element_legend_childs.toolbox_zoomout);
this.element_legend_childs.toolbox_zoomout.onclick = function(e) {
e.preventDefault();
- var dt = (that.view_before - that.view_after) * NETDATA.options.current.pan_and_zoom_step;
+ var dt = (that.view_before - that.view_after) * get_pan_and_zoom_step(e);
var before = that.view_before + dt;
var after = that.view_after - dt;
html: true,
trigger: 'hover',
placement: 'bottom',
- delay: 100,
+ delay: { show: NETDATA.options.current.show_help_delay_show_ms, hide: NETDATA.options.current.show_help_delay_hide_ms },
title: 'Chart Zoom Out',
content: 'Zoom out the chart. On Chrome and Opera, you can also press the SHIFT or the ALT keys and then use the mouse wheel to zoom in or out.<br/><small>Help, can be disabled from the settings.</small>'
});
html: true,
trigger: 'hover',
placement: 'bottom',
- delay: 100,
+ delay: { show: NETDATA.options.current.show_help_delay_show_ms, hide: NETDATA.options.current.show_help_delay_hide_ms },
title: 'Chart Resize',
content: 'Drag this point with your mouse or your finger (on touch devices), to resize the chart vertically. You can also <b>double click it</b> or <b>double tap it</b> to reset between 2 states: the default and the one that fits all the values.<br/><small>Help, can be disabled from the settings.</small>'
});
trigger: 'hover',
placement: 'bottom',
title: 'Chart Legend',
- delay: 100,
+ delay: { show: NETDATA.options.current.show_help_delay_show_ms, hide: NETDATA.options.current.show_help_delay_hide_ms },
content: 'You can click or tap on the values or the labels to select dimentions. By pressing SHIFT or CONTROL, you can enable or disable multiple dimensions.<br/><small>Help, can be disabled from the settings.</small>'
});
}