public void prepareMatrixValuePx(float xChartMin,float deltaX,float deltaY,float yChartMin){
  float scaleX=mViewPortHandler.contentWidth() / deltaX;
  float scaleY=mViewPortHandler.contentHeight() / deltaY;
  if (Float.isInfinite(scaleX))   scaleX=0;
  if (Float.isInfinite(scaleY))   scaleY=0;
  mMatrixValueToPx.reset();
  mMatrixValueToPx.postTranslate(-xChartMin,-yChartMin);
  mMatrixValueToPx.postScale(scaleX,-scaleY);
}

public void prepareMatrixValuePx ( float xChartMin , float deltaX , float deltaY , float yChartMin ) { float scaleX = mViewPortHandler . contentWidth ( ) / deltaX ; float scaleY = mViewPortHandler . contentHeight ( ) / deltaY ; if ( Float . isInfinite ( scaleX ) ) scaleX = 0 ; if ( Float . isInfinite ( scaleY ) ) scaleY = 0 ; mMatrixValueToPx . reset ( ) ; mMatrixValueToPx . postTranslate ( - xChartMin , - yChartMin ) ; mMatrixValueToPx . postScale ( scaleX , - scaleY ) ; }
prepares the matrix that transforms values to pixels . calculates the scale factors from the charts size and offsets .
