MCPcopy Index your code
hub / github.com/angular-google-chart/angular-google-chart / applyFormat

Function applyFormat

ng-google-chart.js:49–68  ·  view source on GitHub ↗
(formatType, FormatClass, tFormats)

Source from the content-addressed store, hash-verified

47 }
48
49 function applyFormat(formatType, FormatClass, tFormats){
50 var i;
51 if (angular.isArray(tFormats[formatType])) {
52 // basic change detection; no need to run if no changes
53 if (!angular.equals(tFormats[formatType], oldFormatTemplates[formatType])) {
54 oldFormatTemplates[formatType] = tFormats[formatType];
55 self.iFormats[formatType] = [];
56
57 if (formatType === 'color') {
58 instantiateColorFormatters(tFormats);
59 } else {
60 for (i = 0; i < tFormats[formatType].length; i++) {
61 self.iFormats[formatType].push(new FormatClass(
62 tFormats[formatType][i])
63 );
64 }
65 }
66 }
67 }
68 }
69
70 function applyFormats(dataTable, tFormats, customFormatters) {
71 var formatType, FormatClass, requiresHtml = false;

Callers 1

applyFormatsFunction · 0.70

Calls 1

Tested by

no test coverage detected