本文整理汇总了Java中com.github.mikephil.charting.formatter.DefaultValueFormatter类的典型用法代码示例。如果您正苦于以下问题:Java DefaultValueFormatter类的具体用法?Java DefaultValueFormatter怎么用?Java DefaultValueFormatter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DefaultValueFormatter类属于com.github.mikephil.charting.formatter包,在下文中一共展示了DefaultValueFormatter类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: calculateFormatter
import com.github.mikephil.charting.formatter.DefaultValueFormatter; //导入依赖的package包/类
/**
* calculates the required number of digits for the values that might be
* drawn in the chart (if enabled), and creates the default-value-formatter
*/
protected void calculateFormatter(float min, float max) {
float reference = 0f;
if (mData == null || mData.getXValCount() < 2) {
reference = Math.max(Math.abs(min), Math.abs(max));
} else {
reference = Math.abs(max - min);
}
int digits = Utils.getDecimals(reference);
mDefaultFormatter = new DefaultValueFormatter(digits);
}
示例2: needsDefaultFormatter
import com.github.mikephil.charting.formatter.DefaultValueFormatter; //导入依赖的package包/类
/**
* If this component has no ValueFormatter or is only equipped with the
* default one (no custom set), return true.
*
* @return
*/
public static boolean needsDefaultFormatter(ValueFormatter formatter) {
if (formatter == null)
return true;
if (formatter instanceof DefaultValueFormatter)
return true;
return false;
}
示例3: needsDefaultFormatter
import com.github.mikephil.charting.formatter.DefaultValueFormatter; //导入依赖的package包/类
/**
* If this component has no YAxisValueFormatter or is only equipped with the default one (no custom set), return true.
*
* @return
*/
public boolean needsDefaultFormatter() {
if (mYAxisValueFormatter == null)
return true;
if (mYAxisValueFormatter instanceof DefaultValueFormatter)
return true;
return false;
}
示例4: needsDefaultFormatter
import com.github.mikephil.charting.formatter.DefaultValueFormatter; //导入依赖的package包/类
/**
* If this component has no YAxisValueFormatter or is only equipped with the default one (no
* custom set), return true.
*
* @return
*/
public boolean needsDefaultFormatter() {
if (mYAxisValueFormatter == null)
return true;
if (mYAxisValueFormatter instanceof DefaultValueFormatter)
return true;
return false;
}
示例5: needsDefaultFormatter
import com.github.mikephil.charting.formatter.DefaultValueFormatter; //导入依赖的package包/类
/**
* If this component has no ValueFormatter or is only equipped with the
* default one (no custom set), return true.
*
* @return
*/
public boolean needsDefaultFormatter() {
if (mValueFormatter == null)
return true;
if (mValueFormatter instanceof DefaultValueFormatter)
return true;
return false;
}
示例6: needsDefaultFormatter
import com.github.mikephil.charting.formatter.DefaultValueFormatter; //导入依赖的package包/类
/**
* If this component has no YAxisValueFormatter or is only equipped with the default one (no custom set), return true.
*
* @return
*/
public boolean needsDefaultFormatter() {
if (mYAxisValueFormatter == null)
return true;
if (mYAxisValueFormatter instanceof DefaultValueFormatter)
return true;
return false;
}
示例7: needsDefaultFormatter
import com.github.mikephil.charting.formatter.DefaultValueFormatter; //导入依赖的package包/类
/**
* If this component has no ValueFormatter or is only equipped with the
* default one (no custom set), return true.
*
* @return
*/
public static boolean needsDefaultFormatter(ValueFormatter formatter) {
if (formatter == null)
return true;
return formatter instanceof DefaultValueFormatter;
}
示例8: needsDefaultFormatter
import com.github.mikephil.charting.formatter.DefaultValueFormatter; //导入依赖的package包/类
/**
* If this component has no YAxisValueFormatter or is only equipped with the default one (no
* custom set), return true.
*
* @return
*/
public boolean needsDefaultFormatter() {
if (mYAxisValueFormatter == null)
return true;
return mYAxisValueFormatter instanceof DefaultValueFormatter;
}
示例9: generateDefaultValueFormatter
import com.github.mikephil.charting.formatter.DefaultValueFormatter; //导入依赖的package包/类
private static IValueFormatter generateDefaultValueFormatter() {
final DefaultValueFormatter formatter = new DefaultValueFormatter(1);
return formatter;
}
示例10: getValueFormatter
import com.github.mikephil.charting.formatter.DefaultValueFormatter; //导入依赖的package包/类
@Override
public ValueFormatter getValueFormatter() {
if (mValueFormatter == null)
return new DefaultValueFormatter(1);
return mValueFormatter;
}
示例11: getValueFormatter
import com.github.mikephil.charting.formatter.DefaultValueFormatter; //导入依赖的package包/类
/**
* Returns the formatter used for drawing the values inside the chart.
*
* @return
*/
public ValueFormatter getValueFormatter() {
if (mValueFormatter == null)
return new DefaultValueFormatter(1);
return mValueFormatter;
}
示例12: getValueFormatter
import com.github.mikephil.charting.formatter.DefaultValueFormatter; //导入依赖的package包/类
@Override
public ValueFormatter getValueFormatter() {
if (needsFormatter())
return new DefaultValueFormatter(1);
return mValueFormatter;
}