PHP Classes

File: vendors/echarts/src/chart/treemap/treemapAction.js

Recommend this page to a friend!
  Classes of Jorge Castro   Gentelella BladeOne   vendors/echarts/src/chart/treemap/treemapAction.js   Download  
File: vendors/echarts/src/chart/treemap/treemapAction.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,263 bytes
 

Contents

Class file image Download
/** * @file Treemap action */ define(function(require) { var echarts = require('../../echarts'); var helper = require('./helper'); var noop = function () {}; var actionTypes = [ 'treemapZoomToNode', 'treemapRender', 'treemapMove' ]; for (var i = 0; i < actionTypes.length; i++) { echarts.registerAction({type: actionTypes[i], update: 'updateView'}, noop); } echarts.registerAction( {type: 'treemapRootToNode', update: 'updateView'}, function (payload, ecModel) { ecModel.eachComponent( {mainType: 'series', subType: 'treemap', query: payload}, handleRootToNode ); function handleRootToNode(model, index) { var targetInfo = helper.retrieveTargetInfo(payload, model); if (targetInfo) { var originViewRoot = model.getViewRoot(); if (originViewRoot) { payload.direction = helper.aboveViewRoot(originViewRoot, targetInfo.node) ? 'rollUp' : 'drillDown'; } model.resetViewRoot(targetInfo.node); } } } ); });