File: /storage/v6964/avoxlive/public_html/assets/javascripts/dashboard/custom_dashboard.js
(function($) {
'use strict';
/* Flot: Sales */
var flotDashSales1 = $.plot('#flotDashSales1', flotDashSales1Data, {
series: {
lines: {
show: true,
lineWidth: 2
},
points: {
show: true
},
shadowSize: 0
},
grid: {
hoverable: true,
clickable: true,
borderColor: 'rgba(0,0,0,0.1)',
borderWidth: 1,
labelMargin: 15,
backgroundColor: 'transparent'
},
yaxis: {
min: 0,
color: 'rgba(0,0,0,0.1)'
},
xaxis: {
mode: 'categories',
color: 'rgba(0,0,0,0)'
},
legend: {
show: false
},
tooltip: true,
tooltipOpts: {
content: '%x: %y',
shifts: {
x: -30,
y: 25
},
}
});
/** Liquid Meter **/
$('#meterSales').liquidMeter({
shape: 'circle',
color: '#0088cc',
background: '#F9F9F9',
fontSize: '24px',
fontWeight: '600',
stroke: '#F2F2F2',
textColor: '#333',
liquidOpacity: 0.9,
liquidPalette: ['#333'],
speed: 3000,
animate: !$.browser.mobile
});
$('#meterSalesSel a').on('click', function( ev ) {
ev.preventDefault();
var val = $(this).data("val"),
selector = $(this).parent(),
items = selector.find('a');
items.removeClass('active');
$(this).addClass('active');
// Update Meter Value
$('#meterSales').liquidMeter('set', val);
});
}).apply(this, [jQuery]);