OLD | NEW |
1 // | 1 // |
2 // Additional formats for ChartNew.js | 2 // Additional formats for ChartNew.js |
3 // | 3 // |
4 // see https://github.com/FVANCOP/ChartNew.js/wiki/900_010_format.js | 4 // see https://github.com/FVANCOP/ChartNew.js/wiki/900_010_format.js |
5 // | 5 // |
6 function fmtChartJSPerso(config, value, fmt) { | 6 function fmtChartJSPerso(config, value, fmt) { |
7 switch (fmt.split(/[\s,]+/)[0].toUpperCase()) { | 7 switch (fmt.split(/[\s,]+/)[0].toUpperCase()) { |
8 case "DATE": | 8 case "DATE": |
9 spltdt = fmt.replace(/,/g, " ").replace(/:/g, " ").split
(/[\s,]+/); | 9 spltdt = fmt.replace(/,/g, " ").replace(/:/g, " ").split
(/[\s,]+/); |
10 var options = new Array(); | 10 var options = new Array(); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 */ | 70 */ |
71 String.prototype.splitLimit = function(separator, limit) { | 71 String.prototype.splitLimit = function(separator, limit) { |
72 var splitString = this; | 72 var splitString = this; |
73 var result = []; | 73 var result = []; |
74 var pos = splitString.search(separator); | 74 var pos = splitString.search(separator); |
75 if (pos < 0) return false; | 75 if (pos < 0) return false; |
76 result.push(splitString.substring(0, pos)); | 76 result.push(splitString.substring(0, pos)); |
77 result.push(splitString.substring(pos + 1)); | 77 result.push(splitString.substring(pos + 1)); |
78 return result; | 78 return result; |
79 } | 79 } |
OLD | NEW |