How to use the zrender/tool/util.inherits function in zrender

To help you get started, we’ve selected a few zrender examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fex-team / fisp-amd-demo / amdtest / widget / lib / echarts / util / shape / Icon.js View on Github external
var delta = (rect.height < 8 || rect.width < 8 ) ? 4 : 0;
            if (x >= rect.x - delta
                && x <= (rect.x + rect.width + delta)
                && y >= rect.y - delta
                && y <= (rect.y + rect.height + delta)
            ) {
                // 矩形内
                return true;
            }
            else {
                return false;
            }
        }
    };

    zrUtil.inherits(Icon, Base);
    
    return Icon;
});
github ecomfe / echarts-gl / src / entity / marker / LargeMarkPoint.js View on Github external
// Implement onframe
        onframe: function (deltaTime) {
            if (this._animatingMarkPointRenderable) {
                var renderable = this._animatingMarkPointRenderable;
                // Have markpoint animation
                if (renderable.geometry.getVertexNumber() > 0) {
                    this._elapsedTime += deltaTime / 1000;
                    renderable.material.set('elapsedTime', this._elapsedTime);
                    this.chart.zr.refreshNextFrame();
                }
            }
        }
    };

    zrUtil.inherits(LargeMarkPoint, MarkBase);

    return LargeMarkPoint;
});
github apache / incubator-echarts / src / chart / k.js View on Github external
{ position: [ x, y ] }
                            )
                            .done(animationDone)
                            .start();
                    }
                }
            }
            
            // 没有动画
            if (!aniCount) {
                animationDone();
            }
        }
    };
    
    zrUtil.inherits(K, ChartBase);
    
    // 图表注册
    require('../chart').define('k', K);
    
    return K;
});
github ecomfe / echarts-gl / src / entity / marker / MarkBar.js View on Github external
},

        // Implement getSceneNode
        getSceneNode: function () {
            return this._markBarRenderable;
        },

        // Implement clear
        clear: function () {
            if (this._markBarRenderable) {
                this._markBarRenderable.geometry.clearBars();
            }
        }
    };

    zrUtil.inherits(MarkBar, MarkBase);

    return MarkBar;
});
github ecomfe / echarts-builder-web / src / echarts-dev / chart / wordCloud.js View on Github external
]
            });

            ecData.pack(
                textShape,
                serie, seriesIndex,
                data, dataIndex,
                data.name
            );

            this.shapeList.push(textShape);
        }
    };


    zrUtil.inherits(Cloud, ChartBase);

    // 图表注册
    require('../chart').define('wordCloud', Cloud);

    return Cloud;
});
github ecomfe / echarts-builder-web / src / echarts-dev / chart / pie.js View on Github external
}

            this.messageCenter.dispatch(
                ecConfig.EVENT.PIE_SELECTED,
                param.event,
                {
                    selected: this._selected,
                    target:  ecData.get(target, 'name')
                },
                this.myChart
            );
            this.zr.refreshNextFrame();
        }
    };

    zrUtil.inherits(Pie, ChartBase);

    // 图表注册
    require('../chart').define('pie', Pie);

    return Pie;
});
github fex-team / fisp-amd-demo / amdtest / widget / lib / echarts / component / axis.js View on Github external
* 根据值换算位置
         * @param {number} idx 坐标轴索引0~1
         */
        getAxis : function (idx) {
            return this._axisList[idx];
        },

        clear : function () {
            for (var i = 0, l = this._axisList.length; i < l; i++) {
                this._axisList[i].dispose && this._axisList[i].dispose();
            }
            this._axisList = [];
        }
    };
    
    zrUtil.inherits(Axis, Base);
    
    require('../component').define('axis', Axis);
     
    return Axis;
});
github apache / incubator-echarts / build / source / chart / k.js View on Github external
aniCount++;
                        this.zr.animate(this.shapeList[i].id, '').when(this.query(this.option, 'animationDurationUpdate'), {
                            position: [
                                x,
                                y
                            ]
                        }).done(animationDone).start();
                    }
                }
            }
            if (!aniCount) {
                animationDone();
            }
        }
    };
    zrUtil.inherits(K, ChartBase);
    require('../chart').define('k', K);
    return K;
});
github xautlx / s2jh4net / entdiy-assets / src / main / resources / META-INF / resources / assets / apps / plugins / echarts / source / chart / bar.js View on Github external
this.shapeList[i].position = [
                            0,
                            0
                        ];
                        this.zr.animate(this.shapeList[i].id, '').when(this.query(this.option, 'animationDurationUpdate'), {
                            position: [
                                x,
                                y
                            ]
                        }).start();
                    }
                }
            }
        }
    };
    zrUtil.inherits(Bar, ChartBase);
    require('../chart').define('bar', Bar);
    return Bar;
});
github ecomfe / echarts-builder-web / src / echarts-dev / component / legend.js View on Github external
deg += dStep;
            for (var i = 0, end = n - 1; i < end; i ++) {
                ctx.lineTo(x + r * Math.cos(deg), y + r * Math.sin(deg));
                deg += dStep;
            }
            ctx.lineTo(xStart, yStart);
        }
    };
    legendIcon.chord = legendIcon.pie;
    legendIcon.map = legendIcon.bar;
    
    for (var k in legendIcon) {
        IconShape.prototype.iconLibrary['legendicon' + k] = legendIcon[k];
    }
    
    zrUtil.inherits(Legend, Base);
    
    require('../component').define('legend', Legend);
    
    return Legend;
});