@@ -579,15 +579,12 @@ abstract class Chart<T : ChartData<out IDataSet<out Entry>>> : ViewGroup, IBaseP
579579 }
580580 }
581581
582+ /* *
583+ * Set a new (e.g. custom) ChartTouchListener NOTE: make sure to
584+ * setTouchEnabled(true); if you need touch gestures on the chart
585+ */
582586 var onTouchListener: ChartTouchListener <* >
583- /* *
584- * Returns an instance of the currently active touch listener.
585- */
586587 get() = chartTouchListener!!
587- /* *
588- * Set a new (e.g. custom) ChartTouchListener NOTE: make sure to
589- * setTouchEnabled(true); if you need touch gestures on the chart
590- */
591588 set(touchListener) {
592589 this .chartTouchListener = touchListener
593590 }
@@ -596,15 +593,9 @@ abstract class Chart<T : ChartData<out IDataSet<out Entry>>> : ViewGroup, IBaseP
596593 * returns true if drawing the marker is enabled when tapping on values
597594 * (use the setMarker(IMarker marker) method to specify a marker)
598595 */
599- /* *
600- * if set to true, the marker view is drawn when a value is clicked
601- */
602596 var isDrawMarkersEnabled: Boolean = true
603597 protected set
604598
605- /* *
606- * returns the marker that is set as a marker view for the chart
607- */
608599 /* *
609600 * the view that represents the marker
610601 */
@@ -671,23 +662,20 @@ abstract class Chart<T : ChartData<out IDataSet<out Entry>>> : ViewGroup, IBaseP
671662 return floatArrayOf(high.drawX, high.drawY)
672663 }
673664
665+ /* *
666+ * Returns the animator responsible for animating chart values.
667+ */
674668 val animator: ChartAnimator
675- /* *
676- * Returns the animator responsible for animating chart values.
677- */
678669 get() = mAnimator
679670
671+ /* *
672+ * Deceleration friction coefficient in [0 ; 1] interval, higher values
673+ * indicate that speed will decrease slowly, for example if it set to 0, it
674+ * will stop immediately. 1 is an invalid value, and will be converted to
675+ * 0.999f automatically.
676+ */
680677 var dragDecelerationFrictionCoef: Float
681- /* *
682- * Returns drag deceleration friction coefficient
683- */
684678 get() = mDragDecelerationFrictionCoef
685- /* *
686- * Deceleration friction coefficient in [0 ; 1] interval, higher values
687- * indicate that speed will decrease slowly, for example if it set to 0, it
688- * will stop immediately. 1 is an invalid value, and will be converted to
689- * 0.999f automatically.
690- */
691679 set(newValue) {
692680 var newValue = newValue
693681 if (newValue < 0f ) {
@@ -773,7 +761,6 @@ abstract class Chart<T : ChartData<out IDataSet<out Entry>>> : ViewGroup, IBaseP
773761 mAnimator.animateXY(durationMillisX, durationMillisY)
774762 }
775763
776-
777764 open val xAxis: XAxis
778765 /* *
779766 * Returns the object representing all x-labels, this method can be used to
@@ -782,11 +769,11 @@ abstract class Chart<T : ChartData<out IDataSet<out Entry>>> : ViewGroup, IBaseP
782769 */
783770 get() = mXAxis
784771
772+ /* *
773+ * Returns the default IValueFormatter that has been determined by the chart
774+ * considering the provided minimum and maximum values.
775+ */
785776 override val defaultValueFormatter: IValueFormatter
786- /* *
787- * Returns the default IValueFormatter that has been determined by the chart
788- * considering the provided minimum and maximum values.
789- */
790777 get() = mDefaultValueFormatter
791778
792779 /* *
@@ -796,16 +783,16 @@ abstract class Chart<T : ChartData<out IDataSet<out Entry>>> : ViewGroup, IBaseP
796783 this .mSelectionListener = l
797784 }
798785
786+ /* *
787+ * returns the current y-max value across all DataSets
788+ */
799789 val yMax: Float
800- /* *
801- * returns the current y-max value across all DataSets
802- */
803790 get() = mData!! .yMax
804791
792+ /* *
793+ * returns the current y-min value across all DataSets
794+ */
805795 val yMin: Float
806- /* *
807- * returns the current y-min value across all DataSets
808- */
809796 get() = mData!! .yMin
810797
811798 override val yChartMin: Float
@@ -823,19 +810,19 @@ abstract class Chart<T : ChartData<out IDataSet<out Entry>>> : ViewGroup, IBaseP
823810 override val xRange: Float
824811 get() = mXAxis.axisRange
825812
813+ /* *
814+ * Returns a recyclable PointF instance.
815+ * Returns the center point of the chart (the whole View) in pixels.
816+ */
826817 val center: PointF
827- /* *
828- * Returns a recyclable PointF instance.
829- * Returns the center point of the chart (the whole View) in pixels.
830- */
831818 get() = getInstance(width / 2f , height / 2f )
832819
820+ /* *
821+ * Returns a recyclable PointF instance.
822+ * Returns the center of the chart taking offsets under consideration.
823+ * (returns the center of the content rectangle)
824+ */
833825 override val centerOffsets: PointF
834- /* *
835- * Returns a recyclable PointF instance.
836- * Returns the center of the chart taking offsets under consideration.
837- * (returns the center of the content rectangle)
838- */
839826 get() = viewPortHandler.contentCenter
840827
841828 /* *
@@ -849,50 +836,38 @@ abstract class Chart<T : ChartData<out IDataSet<out Entry>>> : ViewGroup, IBaseP
849836 this .extraBottomOffset = bottom
850837 }
851838
839+ /* *
840+ * Set an extra offset to be appended to the viewport's top
841+ */
852842 var extraTopOffset: Float
853- /* *
854- * @return the extra offset to be appended to the viewport's top
855- */
856843 get() = mExtraTopOffset
857- /* *
858- * Set an extra offset to be appended to the viewport's top
859- */
860844 set(offset) {
861845 mExtraTopOffset = offset.convertDpToPixel()
862846 }
863847
848+ /* *
849+ * Set an extra offset to be appended to the viewport's right
850+ */
864851 var extraRightOffset: Float
865- /* *
866- * @return the extra offset to be appended to the viewport's right
867- */
868852 get() = mExtraRightOffset
869- /* *
870- * Set an extra offset to be appended to the viewport's right
871- */
872853 set(offset) {
873854 mExtraRightOffset = offset.convertDpToPixel()
874855 }
875856
857+ /* *
858+ * Set an extra offset to be appended to the viewport's bottom
859+ */
876860 var extraBottomOffset: Float
877- /* *
878- * @return the extra offset to be appended to the viewport's bottom
879- */
880861 get() = mExtraBottomOffset
881- /* *
882- * Set an extra offset to be appended to the viewport's bottom
883- */
884862 set(offset) {
885863 mExtraBottomOffset = offset.convertDpToPixel()
886864 }
887865
866+ /* *
867+ * Set an extra offset to be appended to the viewport's left
868+ */
888869 var extraLeftOffset: Float
889- /* *
890- * @return the extra offset to be appended to the viewport's left
891- */
892870 get() = mExtraLeftOffset
893- /* *
894- * Set an extra offset to be appended to the viewport's left
895- */
896871 set(offset) {
897872 mExtraLeftOffset = offset.convertDpToPixel()
898873 }
0 commit comments