Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ open class MarkerView(context: Context?, layoutResource: Int) : RelativeLayout(c
var chartView: Chart<*>?
get() = if (mWeakChart == null) null else mWeakChart!!.get()
set(chart) {
mWeakChart = WeakReference<Chart<*>?>(chart)
mWeakChart = WeakReference(chart)
}

override fun getOffsetForDrawingAtPoint(posX: Float, posY: Float): MPPointF {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package com.github.mikephil.charting.components

import com.github.mikephil.charting.utils.convertDpToPixel

/**
* Class representing the x-axis labels settings. Only use the setter methods to
* modify it. Do not access public variables directly. Be aware that not all
* features the XLabels class provides are suitable for the RadarChart.
*/
class XAxis : AxisBase() {
/**
* width of the x-axis labels in pixels - this is automatically
* calculated by the computeSize() methods in the renderers
*/
@JvmField
var mLabelWidth: Int = 1

/**
* height of the x-axis labels in pixels - this is automatically
* calculated by the computeSize() methods in the renderers
*/
@JvmField
var mLabelHeight: Int = 1

/**
* This is the angle for drawing the X axis labels (in degrees)
*/
var labelRotationAngle: Float = 0f


/**
* if set to true, the chart will avoid that the first and last label entry
* in the chart "clip" off the edge of the chart
*/
var isAvoidFirstLastClippingEnabled: Boolean = false
private set

/**
* the position of the x-labels relative to the chart
*/
var position: XAxisPosition? = XAxisPosition.TOP

/**
* enum for the position of the x-labels relative to the chart
*/
enum class XAxisPosition {
TOP, BOTTOM, BOTH_SIDED, TOP_INSIDE, BOTTOM_INSIDE
}

init {
mYOffset = 4f.convertDpToPixel() // -3
}

/**
* if set to true, the chart will avoid that the first and last label entry
* in the chart "clip" off the edge of the chart or the screen
*/
fun setAvoidFirstLastClipping(enabled: Boolean) {
this.isAvoidFirstLastClippingEnabled = enabled
}
}
Loading
Loading