Java Code Examples for com.github.mikephil.charting.charts.Chart#setNoDataText()

The following examples show how to use com.github.mikephil.charting.charts.Chart#setNoDataText() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ChartSettings.java    From BrainPhaser with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Formats the text which will be shown when no challenges exist
 *
 * @param chart the chart whose no data text will be formatted
 */
public void applyNoDataSettings(Chart chart) {
    chart.setNoDataText(mApplication.getString(R.string.chart_no_data_text));
    Paint p = chart.getPaint(Chart.PAINT_INFO);
    p.setTextSize(NO_DATA_TEXT_SIZE);

    Context appContext = mApplication.getApplicationContext();

    p.setColor(ContextCompat.getColor(appContext, android.R.color.tertiary_text_light));
}
 
Example 2
Source File: ChartBaseManager.java    From react-native-mp-android-chart with MIT License 4 votes vote down vote up
@ReactProp(name = "noDataText")
public void setNoDataText(Chart chart, String noDataText) {
    chart.setNoDataText(noDataText);
}