Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | espaco | 1 | var Profile = function() { |
| 2 | |||
| 3 | var dashboardMainChart = null; |
||
| 4 | |||
| 5 | return { |
||
| 6 | |||
| 7 | //main function |
||
| 8 | init: function() { |
||
| 9 | |||
| 10 | Profile.initMiniCharts(); |
||
| 11 | }, |
||
| 12 | |||
| 13 | initMiniCharts: function() { |
||
| 14 | |||
| 15 | // IE8 Fix: function.bind polyfill |
||
| 16 | if (Metronic.isIE8() && !Function.prototype.bind) { |
||
| 17 | Function.prototype.bind = function(oThis) { |
||
| 18 | if (typeof this !== "function") { |
||
| 19 | // closest thing possible to the ECMAScript 5 internal IsCallable function |
||
| 20 | throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); |
||
| 21 | } |
||
| 22 | |||
| 23 | var aArgs = Array.prototype.slice.call(arguments, 1), |
||
| 24 | fToBind = this, |
||
| 25 | fNOP = function() {}, |
||
| 26 | fBound = function() { |
||
| 27 | return fToBind.apply(this instanceof fNOP && oThis ? this : oThis, |
||
| 28 | aArgs.concat(Array.prototype.slice.call(arguments))); |
||
| 29 | }; |
||
| 30 | |||
| 31 | fNOP.prototype = this.prototype; |
||
| 32 | fBound.prototype = new fNOP(); |
||
| 33 | |||
| 34 | return fBound; |
||
| 35 | }; |
||
| 36 | } |
||
| 37 | |||
| 38 | $("#sparkline_bar").sparkline([8, 9, 10, 11, 10, 10, 12, 10, 10, 11, 9, 12, 11], { |
||
| 39 | type: 'bar', |
||
| 40 | width: '100', |
||
| 41 | barWidth: 6, |
||
| 42 | height: '45', |
||
| 43 | barColor: '#F36A5B', |
||
| 44 | negBarColor: '#e02222' |
||
| 45 | }); |
||
| 46 | |||
| 47 | $("#sparkline_bar2").sparkline([9, 11, 12, 13, 12, 13, 10, 14, 13, 11, 11, 12, 11], { |
||
| 48 | type: 'bar', |
||
| 49 | width: '100', |
||
| 50 | barWidth: 6, |
||
| 51 | height: '45', |
||
| 52 | barColor: '#5C9BD1', |
||
| 53 | negBarColor: '#e02222' |
||
| 54 | }); |
||
| 55 | } |
||
| 56 | |||
| 57 | }; |
||
| 58 | |||
| 59 | }(); |