code: function(context){
  		var chart = this;
  		this.canvas = context.canvas;
  
  		this.ctx = context;
  
  		//Variables global to the chart
  		var computeDimension = function(element,dimension)
  		{
  			if (element['offset'+dimension])
  			{
  				return element['offset'+dimension];
  			}
  			else
  			{
  				//return document.defaultView.getComputedStyle(element).getPropertyValue(dimension);
          return element[dimension.toLowerCase()];
  			}
  		}
  
  		var width = this.width = computeDimension(context.canvas,'Width');
  		var height = this.height = computeDimension(context.canvas,'Height');
  
  		// Firefox requires this to work correctly
  		context.canvas.width  = width;
  		context.canvas.height = height;
  
  		this.aspectRatio = this.width / this.height;
  		//High pixel density displays - multiply the size of the canvas height/width by the device pixel ratio, then scale.
  		helpers.retinaScale(this);
  
  		return this;
  	}
docs: Occupy the global variable of Chart, and create a simple base class