com.github.mikephil.charting.formatter.FillFormatter Java Examples

The following examples show how to use com.github.mikephil.charting.formatter.FillFormatter. 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: LineDataSet.java    From iMoney with Apache License 2.0 5 votes vote down vote up
/**
 * Sets a custom FillFormatter to the chart that handles the position of the
 * filled-line for each DataSet. Set this to null to use the default logic.
 *
 * @param formatter
 */
public void setFillFormatter(FillFormatter formatter) {

    if (formatter == null)
        mFillFormatter = new DefaultFillFormatter();
    else
        mFillFormatter = formatter;
}
 
Example #2
Source File: RealmLineDataSet.java    From Stayfit with Apache License 2.0 5 votes vote down vote up
/**
 * Sets a custom FillFormatter to the chart that handles the position of the
 * filled-line for each DataSet. Set this to null to use the default logic.
 *
 * @param formatter
 */
public void setFillFormatter(FillFormatter formatter) {

    if (formatter == null)
        mFillFormatter = new DefaultFillFormatter();
    else
        mFillFormatter = formatter;
}
 
Example #3
Source File: LineDataSet.java    From Stayfit with Apache License 2.0 5 votes vote down vote up
/**
 * Sets a custom FillFormatter to the chart that handles the position of the
 * filled-line for each DataSet. Set this to null to use the default logic.
 *
 * @param formatter
 */
public void setFillFormatter(FillFormatter formatter) {

    if (formatter == null)
        mFillFormatter = new DefaultFillFormatter();
    else
        mFillFormatter = formatter;
}
 
Example #4
Source File: RealmLineDataSet.java    From NetKnight with Apache License 2.0 5 votes vote down vote up
/**
 * Sets a custom FillFormatter to the chart that handles the position of the
 * filled-line for each DataSet. Set this to null to use the default logic.
 *
 * @param formatter
 */
public void setFillFormatter(FillFormatter formatter) {

    if (formatter == null)
        mFillFormatter = new DefaultFillFormatter();
    else
        mFillFormatter = formatter;
}
 
Example #5
Source File: LineDataSet.java    From NetKnight with Apache License 2.0 5 votes vote down vote up
/**
 * Sets a custom FillFormatter to the chart that handles the position of the
 * filled-line for each DataSet. Set this to null to use the default logic.
 *
 * @param formatter
 */
public void setFillFormatter(FillFormatter formatter) {

    if (formatter == null)
        mFillFormatter = new DefaultFillFormatter();
    else
        mFillFormatter = formatter;
}
 
Example #6
Source File: RealmLineDataSet.java    From Stayfit with Apache License 2.0 4 votes vote down vote up
@Override
public FillFormatter getFillFormatter() {
    return mFillFormatter;
}
 
Example #7
Source File: LineDataSet.java    From Stayfit with Apache License 2.0 4 votes vote down vote up
@Override
public FillFormatter getFillFormatter() {
    return mFillFormatter;
}
 
Example #8
Source File: CubicLineChartActivity.java    From Stayfit with Apache License 2.0 4 votes vote down vote up
private void setData(int count, float range) {

        ArrayList<String> xVals = new ArrayList<String>();
        for (int i = 0; i < count; i++) {
            xVals.add((1990 +i) + "");
        }

        ArrayList<Entry> vals1 = new ArrayList<Entry>();

        for (int i = 0; i < count; i++) {
            float mult = (range + 1);
            float val = (float) (Math.random() * mult) + 20;// + (float)
                                                           // ((mult *
                                                           // 0.1) / 10);
            vals1.add(new Entry(val, i));
        }
        
        // create a dataset and give it a type
        LineDataSet set1 = new LineDataSet(vals1, "DataSet 1");
        set1.setDrawCubic(true);
        set1.setCubicIntensity(0.2f);
        //set1.setDrawFilled(true);
        set1.setDrawCircles(false); 
        set1.setLineWidth(1.8f);
        set1.setCircleRadius(4f);
        set1.setCircleColor(Color.WHITE);
        set1.setHighLightColor(Color.rgb(244, 117, 117));
        set1.setColor(Color.WHITE);
        set1.setFillColor(Color.WHITE);
        set1.setFillAlpha(100);
        set1.setDrawHorizontalHighlightIndicator(false);
        set1.setFillFormatter(new FillFormatter() {
            @Override
            public float getFillLinePosition(ILineDataSet dataSet, LineDataProvider dataProvider) {
                return -10;
            }
        });
        
        // create a data object with the datasets
        LineData data = new LineData(xVals, set1);
        data.setValueTypeface(tf);
        data.setValueTextSize(9f);
        data.setDrawValues(false);

        // set data
        mChart.setData(data);
    }
 
Example #9
Source File: RealmLineDataSet.java    From NetKnight with Apache License 2.0 4 votes vote down vote up
@Override
public FillFormatter getFillFormatter() {
    return mFillFormatter;
}
 
Example #10
Source File: LineDataSet.java    From NetKnight with Apache License 2.0 4 votes vote down vote up
@Override
public FillFormatter getFillFormatter() {
    return mFillFormatter;
}
 
Example #11
Source File: LineDataSet.java    From iMoney with Apache License 2.0 2 votes vote down vote up
/**
 * Returns the FillFormatter that is set for this DataSet.
 * @return
 */
public FillFormatter getFillFormatter() {
    return mFillFormatter;
}
 
Example #12
Source File: ILineDataSet.java    From Stayfit with Apache License 2.0 2 votes vote down vote up
/**
 * Returns the FillFormatter that is set for this DataSet.
 *
 * @return
 */
FillFormatter getFillFormatter();
 
Example #13
Source File: ILineDataSet.java    From NetKnight with Apache License 2.0 2 votes vote down vote up
/**
 * Returns the FillFormatter that is set for this DataSet.
 *
 * @return
 */
FillFormatter getFillFormatter();