Car/Css/ichartjs/src/ichart.linebasic2d.js

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/**
 * @overview this component will draw a line2d chart.
 * @component#@chart#iChart.LineBasic2D
 * @extend#iChart.Line
 */
iChart.LineBasic2D = iChart.extend(iChart.Line, {
	/**
	 * initialize the context for the LineBasic2D
	 */
	configure : function() {
		/**
		 * invoked the super class's configuration
		 */
		iChart.LineBasic2D.superclass.configure.call(this);

		this.type = 'basicline2d';

		this.tipInvokeHeap = [];
	},
	doAnimation : function(t, d,_) {
		iChart.each(_.lines,function(l){
			iChart.each(l.get('points'),function(p){
				p.y = l.y - Math.ceil(_.animationArithmetic(t, 0, l.y - p.y_, d));
			});
			l.drawSegment();
		});
	},
	doConfig : function() {
		iChart.LineBasic2D.superclass.doConfig.call(this);
		var _ = this._();
		if(_.isE())return;
		/**
		 * get the max/min scale of this coordinate for calculated the height
		 */
		var So,S, H = _.coo.valid_height, sp = _.get('point_space'), points, x, y,
		ox = _.get('sub_option.originx'), oy, p,N=_.get('nullToDirect');
		
		_.push('sub_option.tip.showType', 'follow');
		_.push('sub_option.coordinate', _.coo);
		_.push('sub_option.tipInvokeHeap', _.tipInvokeHeap);
		_.push('sub_option.point_space', sp);


		iChart.each(_.data,function(d){
			So = _.coo.getScaleObj(d.scaleAlign||_.get('scaleAlign')),
			S = So.getScale(So);
			oy = _.get('sub_option.originy')-S.basic*H;
			points = [];

			iChart.each(d.value,function(v, j){
                if(v!=null){
                    x = sp * j;
					y = So.getMark(v,S) * H;
                    p = {
                        x : ox + x,
                        y : oy - y,
                        value : v,
                        text : d.name+' '+v
                    };
                    iChart.merge(p, _.fireEvent(_, 'parsePoint', [d, v, x, y, j,S]));
后面还有 20 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。