當前位置: 首頁>>代碼示例>>Java>>正文


Java LineDataSet.Mode方法代碼示例

本文整理匯總了Java中com.github.mikephil.charting.data.LineDataSet.Mode方法的典型用法代碼示例。如果您正苦於以下問題:Java LineDataSet.Mode方法的具體用法?Java LineDataSet.Mode怎麽用?Java LineDataSet.Mode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.github.mikephil.charting.data.LineDataSet的用法示例。


在下文中一共展示了LineDataSet.Mode方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getReactionTimeInPercentageLineData

import com.github.mikephil.charting.data.LineDataSet; //導入方法依賴的package包/類
/**
 * Get combined line data to be displayed in the line chart
 *
 * @return combined line data to be displayed in the line chart
 */
@NonNull
private LineData getReactionTimeInPercentageLineData() {

    // get selected user
    String userId = Global.getSelectedUser();
    UtilsRG.debug("selected user!: " + userId);

    // get percentage medians by user
    final Double[] reactionTimesInPercentage = getReactionGameMedians(userId);

    // get predicted median in percentage
    final Double[] reactionTimesForecastInPercentage = getNextForecastReactionMedianInPercentage();

    // fill reaction times
    List<Entry> entries = new ArrayList<>();
    for (int i = 0; i < reactionTimesInPercentage.length; i++) {
        entries.add(new Entry(i, reactionTimesInPercentage[i].intValue()));
    }

    // fill forecast
    List<Entry> entriesForecast = new ArrayList<>();
    entriesForecast.add(new Entry(reactionTimesInPercentage.length - 1, reactionTimesInPercentage[reactionTimesInPercentage.length - 1].intValue()));
    for (int i = 0; i < reactionTimesForecastInPercentage.length; i++) {
        entriesForecast.add(new Entry(reactionTimesInPercentage.length + i, reactionTimesForecastInPercentage[i].intValue()));
    }

    // curved line
    LineDataSet.Mode lineMode = LineDataSet.Mode.HORIZONTAL_BEZIER;

    // reaction time in percentage data set
    LineDataSet dataSet = new LineDataSet(entries, Strings.getStringByRId(R.string.forecast_performance));
    dataSet.setMode(lineMode);
    dataSet = setLineDataStyling(dataSet, R.color.colorPrimary);

    // reaction time forecast in percentage data set
    LineDataSet dataSetForecast = new LineDataSet(entriesForecast, Strings.getStringByRId(R.string.forecast_performance));
    dataSetForecast.setMode(lineMode);
    dataSetForecast = setLineDataStyling(dataSetForecast, R.color.colorPrimaryLight);
    dataSetForecast.enableDashedLine(10, 10, 1000);

    // combine data sets
    LineData lineData = new LineData(dataSet, dataSetForecast);
    lineData.setValueFormatter(new BarChartPercentFormatter());
    lineData.setValueTextSize(15f);

    return lineData;
}
 
開發者ID:lidox,項目名稱:reaction-test,代碼行數:53,代碼來源:ReactionTimeLineChartWithForecast.java

示例2: getMode

import com.github.mikephil.charting.data.LineDataSet; //導入方法依賴的package包/類
/**
 * Returns the drawing mode for this line dataset
 *
 * @return
 */
LineDataSet.Mode getMode();
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:7,代碼來源:ILineDataSet.java

示例3: getMode

import com.github.mikephil.charting.data.LineDataSet; //導入方法依賴的package包/類
/**
 * Returns the drawing mode for this line dataset
 *
 * @return
 */
@Override
public LineDataSet.Mode getMode() {
    return mMode;
}
 
開發者ID:pencil-box,項目名稱:NetKnight,代碼行數:10,代碼來源:RealmLineDataSet.java

示例4: setMode

import com.github.mikephil.charting.data.LineDataSet; //導入方法依賴的package包/類
/**
 * Returns the drawing mode for this line dataset
 *
 * @return
 */
public void setMode(LineDataSet.Mode mode) {
    mMode = mode;
}
 
開發者ID:pencil-box,項目名稱:NetKnight,代碼行數:9,代碼來源:RealmLineDataSet.java


注:本文中的com.github.mikephil.charting.data.LineDataSet.Mode方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。