public boolean saveToGallery(String fileName,int quality){
  return saveToGallery(fileName,"","MPAndroidChart-Library Save",Bitmap.CompressFormat.JPEG,quality);
}

public boolean saveToGallery ( String fileName , int quality ) { return saveToGallery ( fileName , "" , "MPAndroidChart-Library Save" , Bitmap . CompressFormat . JPEG , quality ) ; }
saves the current state of the chart to the gallery as a jpeg image . the filename and compression can be set . 0 = = maximum compression , 100 = low compression ( high quality ) . note : needs permission write_external_storage
