123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408 |
- demo = {
- initPickColor: function() {
- $('.pick-class-label').click(function() {
- var new_class = $(this).attr('new-class');
- var old_class = $('#display-buttons').attr('data-class');
- var display_div = $('#display-buttons');
- if (display_div.length) {
- var display_buttons = display_div.find('.btn');
- display_buttons.removeClass(old_class);
- display_buttons.addClass(new_class);
- display_div.attr('data-class', new_class);
- }
- });
- },
- initDocChart: function() {
- chartColor = "#FFFFFF";
- ctx = document.getElementById('chartHours').getContext("2d");
- myChart = new Chart(ctx, {
- type: 'line',
- data: {
- labels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct"],
- datasets: [{
- borderColor: "#6bd098",
- backgroundColor: "#6bd098",
- pointRadius: 0,
- pointHoverRadius: 0,
- borderWidth: 3,
- data: [300, 310, 316, 322, 330, 326, 333, 345, 338, 354]
- },
- {
- borderColor: "#f17e5d",
- backgroundColor: "#f17e5d",
- pointRadius: 0,
- pointHoverRadius: 0,
- borderWidth: 3,
- data: [320, 340, 365, 360, 370, 385, 390, 384, 408, 420]
- },
- {
- borderColor: "#fcc468",
- backgroundColor: "#fcc468",
- pointRadius: 0,
- pointHoverRadius: 0,
- borderWidth: 3,
- data: [370, 394, 415, 409, 425, 445, 460, 450, 478, 484]
- }
- ]
- },
- options: {
- legend: {
- display: false
- },
- tooltips: {
- enabled: false
- },
- scales: {
- yAxes: [{
- ticks: {
- fontColor: "#9f9f9f",
- beginAtZero: false,
- maxTicksLimit: 5,
- //padding: 20
- },
- gridLines: {
- drawBorder: false,
- zeroLineColor: "#ccc",
- color: 'rgba(255,255,255,0.05)'
- }
- }],
- xAxes: [{
- barPercentage: 1.6,
- gridLines: {
- drawBorder: false,
- color: 'rgba(255,255,255,0.1)',
- zeroLineColor: "transparent",
- display: false,
- },
- ticks: {
- padding: 20,
- fontColor: "#9f9f9f"
- }
- }]
- },
- }
- });
- },
- initChartsPages: function() {
- chartColor = "#FFFFFF";
- ctx = document.getElementById('chartHours').getContext("2d");
- myChart = new Chart(ctx, {
- type: 'line',
- data: {
- labels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct"],
- datasets: [{
- borderColor: "#6bd098",
- backgroundColor: "#6bd098",
- pointRadius: 0,
- pointHoverRadius: 0,
- borderWidth: 3,
- data: [300, 310, 316, 322, 330, 326, 333, 345, 338, 354]
- },
- {
- borderColor: "#f17e5d",
- backgroundColor: "#f17e5d",
- pointRadius: 0,
- pointHoverRadius: 0,
- borderWidth: 3,
- data: [320, 340, 365, 360, 370, 385, 390, 384, 408, 420]
- },
- {
- borderColor: "#fcc468",
- backgroundColor: "#fcc468",
- pointRadius: 0,
- pointHoverRadius: 0,
- borderWidth: 3,
- data: [370, 394, 415, 409, 425, 445, 460, 450, 478, 484]
- }
- ]
- },
- options: {
- legend: {
- display: false
- },
- tooltips: {
- enabled: false
- },
- scales: {
- yAxes: [{
- ticks: {
- fontColor: "#9f9f9f",
- beginAtZero: false,
- maxTicksLimit: 5,
- //padding: 20
- },
- gridLines: {
- drawBorder: false,
- zeroLineColor: "#ccc",
- color: 'rgba(255,255,255,0.05)'
- }
- }],
- xAxes: [{
- barPercentage: 1.6,
- gridLines: {
- drawBorder: false,
- color: 'rgba(255,255,255,0.1)',
- zeroLineColor: "transparent",
- display: false,
- },
- ticks: {
- padding: 20,
- fontColor: "#9f9f9f"
- }
- }]
- },
- }
- });
- ctx = document.getElementById('chartEmail').getContext("2d");
- myChart = new Chart(ctx, {
- type: 'pie',
- data: {
- labels: [1, 2, 3],
- datasets: [{
- label: "Emails",
- pointRadius: 0,
- pointHoverRadius: 0,
- backgroundColor: [
- '#e3e3e3',
- '#4acccd',
- '#fcc468',
- '#ef8157'
- ],
- borderWidth: 0,
- data: [342, 480, 530, 120]
- }]
- },
- options: {
- legend: {
- display: false
- },
- pieceLabel: {
- render: 'percentage',
- fontColor: ['white'],
- precision: 2
- },
- tooltips: {
- enabled: false
- },
- scales: {
- yAxes: [{
- ticks: {
- display: false
- },
- gridLines: {
- drawBorder: false,
- zeroLineColor: "transparent",
- color: 'rgba(255,255,255,0.05)'
- }
- }],
- xAxes: [{
- barPercentage: 1.6,
- gridLines: {
- drawBorder: false,
- color: 'rgba(255,255,255,0.1)',
- zeroLineColor: "transparent"
- },
- ticks: {
- display: false,
- }
- }]
- },
- }
- });
- var speedCanvas = document.getElementById("speedChart");
- var dataFirst = {
- data: [0, 19, 15, 20, 30, 40, 40, 50, 25, 30, 50, 70],
- fill: false,
- borderColor: '#fbc658',
- backgroundColor: 'transparent',
- pointBorderColor: '#fbc658',
- pointRadius: 4,
- pointHoverRadius: 4,
- pointBorderWidth: 8,
- };
- var dataSecond = {
- data: [0, 5, 10, 12, 20, 27, 30, 34, 42, 45, 55, 63],
- fill: false,
- borderColor: '#51CACF',
- backgroundColor: 'transparent',
- pointBorderColor: '#51CACF',
- pointRadius: 4,
- pointHoverRadius: 4,
- pointBorderWidth: 8
- };
- var speedData = {
- labels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
- datasets: [dataFirst, dataSecond]
- };
- var chartOptions = {
- legend: {
- display: false,
- position: 'top'
- }
- };
- var lineChart = new Chart(speedCanvas, {
- type: 'line',
- hover: false,
- data: speedData,
- options: chartOptions
- });
- },
- initGoogleMaps: function() {
- var myLatlng = new google.maps.LatLng(40.748817, -73.985428);
- var mapOptions = {
- zoom: 13,
- center: myLatlng,
- scrollwheel: false, //we disable de scroll over the map, it is a really annoing when you scroll through page
- styles: [{
- "featureType": "water",
- "stylers": [{
- "saturation": 43
- }, {
- "lightness": -11
- }, {
- "hue": "#0088ff"
- }]
- }, {
- "featureType": "road",
- "elementType": "geometry.fill",
- "stylers": [{
- "hue": "#ff0000"
- }, {
- "saturation": -100
- }, {
- "lightness": 99
- }]
- }, {
- "featureType": "road",
- "elementType": "geometry.stroke",
- "stylers": [{
- "color": "#808080"
- }, {
- "lightness": 54
- }]
- }, {
- "featureType": "landscape.man_made",
- "elementType": "geometry.fill",
- "stylers": [{
- "color": "#ece2d9"
- }]
- }, {
- "featureType": "poi.park",
- "elementType": "geometry.fill",
- "stylers": [{
- "color": "#ccdca1"
- }]
- }, {
- "featureType": "road",
- "elementType": "labels.text.fill",
- "stylers": [{
- "color": "#767676"
- }]
- }, {
- "featureType": "road",
- "elementType": "labels.text.stroke",
- "stylers": [{
- "color": "#ffffff"
- }]
- }, {
- "featureType": "poi",
- "stylers": [{
- "visibility": "off"
- }]
- }, {
- "featureType": "landscape.natural",
- "elementType": "geometry.fill",
- "stylers": [{
- "visibility": "on"
- }, {
- "color": "#b8cb93"
- }]
- }, {
- "featureType": "poi.park",
- "stylers": [{
- "visibility": "on"
- }]
- }, {
- "featureType": "poi.sports_complex",
- "stylers": [{
- "visibility": "on"
- }]
- }, {
- "featureType": "poi.medical",
- "stylers": [{
- "visibility": "on"
- }]
- }, {
- "featureType": "poi.business",
- "stylers": [{
- "visibility": "simplified"
- }]
- }]
- }
- var map = new google.maps.Map(document.getElementById("map"), mapOptions);
- var marker = new google.maps.Marker({
- position: myLatlng,
- title: "Hello World!"
- });
- // To add the marker to the map, call setMap();
- marker.setMap(map);
- },
- showNotification: function(from, align) {
- color = 'primary';
- $.notify({
- icon: "nc-icon nc-bell-55",
- message: "Welcome to <b>Paper Dashboard</b> - a beautiful bootstrap dashboard for every web developer."
- }, {
- type: color,
- timer: 8000,
- placement: {
- from: from,
- align: align
- }
- });
- }
- };
|