PHP Classes

File: vendors/gentelella/vendors/jqvmap/src/JQVMap/setValues.js

Recommend this page to a friend!
  Classes of Jorge Castro   Gentelella BladeOne   vendors/gentelella/vendors/jqvmap/src/JQVMap/setValues.js   Download  
File: vendors/gentelella/vendors/jqvmap/src/JQVMap/setValues.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Gentelella BladeOne
Render templates using Bootstrap for presentation
Author: By
Last change:
Date: 3 years ago
Size: 669 bytes
 

Contents

Class file image Download
JQVMap.prototype.setValues = function (values) { var max = 0, min = Number.MAX_VALUE, val; for (var cc in values) { cc = cc.toLowerCase(); val = parseFloat(values[cc]); if (isNaN(val)) { continue; } if (val > max) { max = values[cc]; } if (val < min) { min = val; } } if (min === max) { max++; } this.colorScale.setMin(min); this.colorScale.setMax(max); var colors = {}; for (cc in values) { cc = cc.toLowerCase(); val = parseFloat(values[cc]); colors[cc] = isNaN(val) ? this.color : this.colorScale.getColor(val); } this.setColors(colors); this.values = values; };