PHP Classes

File: vendors/echarts/src/component/visualMap/preprocessor.js

Recommend this page to a friend!
  Classes of Jorge Castro   Gentelella BladeOne   vendors/echarts/src/component/visualMap/preprocessor.js   Download  
File: vendors/echarts/src/component/visualMap/preprocessor.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: 1,315 bytes
 

Contents

Class file image Download
/** * @file VisualMap preprocessor */ define(function(require) { var zrUtil = require('zrender/core/util'); var each = zrUtil.each; return function (option) { var visualMap = option && option.visualMap; if (!zrUtil.isArray(visualMap)) { visualMap = visualMap ? [visualMap] : []; } each(visualMap, function (opt) { if (!opt) { return; } // rename splitList to pieces if (has(opt, 'splitList') && !has(opt, 'pieces')) { opt.pieces = opt.splitList; delete opt.splitList; } var pieces = opt.pieces; if (pieces && zrUtil.isArray(pieces)) { each(pieces, function (piece) { if (zrUtil.isObject(piece)) { if (has(piece, 'start') && !has(piece, 'min')) { piece.min = piece.start; } if (has(piece, 'end') && !has(piece, 'max')) { piece.max = piece.end; } } }); } }); }; function has(obj, name) { return obj && obj.hasOwnProperty && obj.hasOwnProperty(name); } });