com.github.mikephil.charting.data.BarLineScatterCandleBubbleData Java Examples

The following examples show how to use com.github.mikephil.charting.data.BarLineScatterCandleBubbleData. 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: CombinedChartCurrentDay.java    From shinny-futures-android with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Get the Entry for a corresponding highlight object
 *
 * @param highlight
 * @return the entry that is highlighted
 */
public Entry getEntryForHighlight(Highlight highlight) {

    List<BarLineScatterCandleBubbleData> dataObjects = mData.getAllData();

    if (highlight.getDataIndex() >= dataObjects.size())
        return null;

    ChartData data = dataObjects.get(highlight.getDataIndex());

    if (highlight.getDataSetIndex() >= data.getDataSetCount())
        return null;
    else {
        // The value of the highlighted entry could be NaN -
        //   if we are not interested in highlighting a specific value.

        List<Entry> entries = data.getDataSetByIndex(highlight.getDataSetIndex())
                .getEntriesForXValue(highlight.getX());

        return entries.get(0);
    }
}
 
Example #2
Source File: CombinedChartKline.java    From shinny-futures-android with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Get the Entry for a corresponding highlight object
 *
 * @param highlight
 * @return the entry that is highlighted
 */
public Entry getEntryForHighlight(Highlight highlight) {

    List<BarLineScatterCandleBubbleData> dataObjects = mData.getAllData();

    if (highlight.getDataIndex() >= dataObjects.size())
        return null;

    ChartData data = dataObjects.get(highlight.getDataIndex());

    if (highlight.getDataSetIndex() >= data.getDataSetCount())
        return null;
    else {
        // The value of the highlighted entry could be NaN -
        //   if we are not interested in highlighting a specific value.

        List<Entry> entries = data.getDataSetByIndex(highlight.getDataSetIndex())
                .getEntriesForXValue(highlight.getX());

        return entries.get(0);
    }
}
 
Example #3
Source File: BarLineChartTouchListener.java    From StockChart-MPAndroidChart with MIT License 5 votes vote down vote up
/**
 * Constructor with initialization parameters.
 *
 * @param chart               instance of the chart
 * @param touchMatrix         the touch-matrix of the chart
 * @param dragTriggerDistance the minimum movement distance that will be interpreted as a "drag" gesture in dp (3dp equals
 *                            to about 9 pixels on a 5.5" FHD screen)
 */
public BarLineChartTouchListener(BarLineChartBase<? extends BarLineScatterCandleBubbleData<? extends
        IBarLineScatterCandleBubbleDataSet<? extends Entry>>> chart, Matrix touchMatrix, float dragTriggerDistance) {
    super(chart);
    this.mMatrix = touchMatrix;

    this.mDragTriggerDist = Utils.convertDpToPixel(dragTriggerDistance);

    this.mMinScalePointerDistance = Utils.convertDpToPixel(3.5f);
}
 
Example #4
Source File: BarLineChartTouchListener.java    From NetKnight with Apache License 2.0 5 votes vote down vote up
public BarLineChartTouchListener(BarLineChartBase<? extends BarLineScatterCandleBubbleData<? extends IBarLineScatterCandleBubbleDataSet<? extends Entry>>> chart, Matrix touchMatrix) {
    super(chart);
    this.mMatrix = touchMatrix;

    // this equals to about 9 pixels on a 5.5" FHD screen
    this.mDragTriggerDist = Utils.convertDpToPixel(3f);

    this.mMinScalePointerDistance = Utils.convertDpToPixel(3.5f);
}
 
Example #5
Source File: BarLineChartTouchListener.java    From Ticket-Analysis with MIT License 5 votes vote down vote up
/**
 * Constructor with initialization parameters.
 *
 * @param chart               instance of the chart
 * @param touchMatrix         the touch-matrix of the chart
 * @param dragTriggerDistance the minimum movement distance that will be interpreted as a "drag" gesture in dp (3dp equals
 *                            to about 9 pixels on a 5.5" FHD screen)
 */
public BarLineChartTouchListener(BarLineChartBase<? extends BarLineScatterCandleBubbleData<? extends
        IBarLineScatterCandleBubbleDataSet<? extends Entry>>> chart, Matrix touchMatrix, float dragTriggerDistance) {
    super(chart);
    this.mMatrix = touchMatrix;

    this.mDragTriggerDist = Utils.convertDpToPixel(dragTriggerDistance);

    this.mMinScalePointerDistance = Utils.convertDpToPixel(3.5f);
}
 
Example #6
Source File: BarLineChartTouchListener.java    From android-kline with Apache License 2.0 5 votes vote down vote up
/**
 * Constructor with initialization parameters.
 *
 * @param chart               instance of the chart
 * @param touchMatrix         the touch-matrix of the chart
 * @param dragTriggerDistance the minimum movement distance that will be interpreted as a "drag" gesture in dp (3dp equals
 *                            to about 9 pixels on a 5.5" FHD screen)
 */
public BarLineChartTouchListener(BarLineChartBase<? extends BarLineScatterCandleBubbleData<? extends
        IBarLineScatterCandleBubbleDataSet<? extends Entry>>> chart, Matrix touchMatrix, float dragTriggerDistance) {
    super(chart);
    this.mMatrix = touchMatrix;

    this.mDragTriggerDist = Utils.convertDpToPixel(dragTriggerDistance);

    this.mMinScalePointerDistance = Utils.convertDpToPixel(3.5f);
}
 
Example #7
Source File: ChartHighlighter.java    From Ticket-Analysis with MIT License 4 votes vote down vote up
protected BarLineScatterCandleBubbleData getData() {
    return mChart.getData();
}
 
Example #8
Source File: BarLineChartTouchListener.java    From Stayfit with Apache License 2.0 4 votes vote down vote up
public BarLineChartTouchListener(BarLineChartBase<? extends BarLineScatterCandleBubbleData<? extends IBarLineScatterCandleBubbleDataSet<? extends Entry>>> chart, Matrix touchMatrix) {
    super(chart);
    this.mMatrix = touchMatrix;
}
 
Example #9
Source File: BarLineChartTouchListener.java    From iMoney with Apache License 2.0 4 votes vote down vote up
public BarLineChartTouchListener(BarLineChartBase<? extends BarLineScatterCandleBubbleData<? extends BarLineScatterCandleBubbleDataSet<? extends Entry>>> chart, Matrix touchMatrix) {
    super(chart);
    this.mMatrix = touchMatrix;
}
 
Example #10
Source File: ChartHighlighter.java    From android-kline with Apache License 2.0 4 votes vote down vote up
protected BarLineScatterCandleBubbleData getData() {
    return mChart.getData();
}
 
Example #11
Source File: ChartHighlighter.java    From android-kline with Apache License 2.0 4 votes vote down vote up
/**
 * Returns a list of Highlight objects representing the entries closest to the given xVal.
 * The returned list contains two objects per DataSet (closest rounding up, closest rounding down).
 *
 * @param xVal the transformed x-value of the x-touch position
 * @param x    touch position
 * @param y    touch position
 * @return
 */
protected List<Highlight> getHighlightsAtXValue(float xVal, float x, float y) {

    mHighlightBuffer.clear();

    BarLineScatterCandleBubbleData data = getData();

    if (data == null)
        return mHighlightBuffer;

    for (int i = 0, dataSetCount = data.getDataSetCount(); i < dataSetCount; i++) {

        IDataSet dataSet = data.getDataSetByIndex(i);

        // don't include DataSets that cannot be highlighted
        if (!dataSet.isHighlightEnabled())
            continue;

        mHighlightBuffer.addAll(buildHighlights(dataSet, i, xVal, DataSet.Rounding.CLOSEST));
    }

    return mHighlightBuffer;
}
 
Example #12
Source File: BarHighlighter.java    From android-kline with Apache License 2.0 4 votes vote down vote up
@Override
protected BarLineScatterCandleBubbleData getData() {
    return mChart.getBarData();
}
 
Example #13
Source File: ChartHighlighter.java    From Ticket-Analysis with MIT License 4 votes vote down vote up
/**
 * Returns a list of Highlight objects representing the entries closest to the given xVal.
 * The returned list contains two objects per DataSet (closest rounding up, closest rounding down).
 *
 * @param xVal the transformed x-value of the x-touch position
 * @param x    touch position
 * @param y    touch position
 * @return
 */
protected List<Highlight> getHighlightsAtXValue(float xVal, float x, float y) {

    mHighlightBuffer.clear();

    BarLineScatterCandleBubbleData data = getData();

    if (data == null)
        return mHighlightBuffer;

    for (int i = 0, dataSetCount = data.getDataSetCount(); i < dataSetCount; i++) {

        IDataSet dataSet = data.getDataSetByIndex(i);

        // don't include DataSets that cannot be highlighted
        if (!dataSet.isHighlightEnabled())
            continue;

        mHighlightBuffer.addAll(buildHighlights(dataSet, i, xVal, DataSet.Rounding.CLOSEST));
    }

    return mHighlightBuffer;
}
 
Example #14
Source File: BarHighlighter.java    From Ticket-Analysis with MIT License 4 votes vote down vote up
@Override
protected BarLineScatterCandleBubbleData getData() {
    return mChart.getBarData();
}
 
Example #15
Source File: ChartHighlighter.java    From StockChart-MPAndroidChart with MIT License 4 votes vote down vote up
protected BarLineScatterCandleBubbleData getData() {
    return mChart.getData();
}
 
Example #16
Source File: ChartHighlighter.java    From StockChart-MPAndroidChart with MIT License 4 votes vote down vote up
/**
 * Returns a list of Highlight objects representing the entries closest to the given xVal.
 * The returned list contains two objects per DataSet (closest rounding up, closest rounding down).
 *
 * @param xVal the transformed x-value of the x-touch position
 * @param x    touch position
 * @param y    touch position
 * @return
 */
protected List<Highlight> getHighlightsAtXValue(float xVal, float x, float y) {

    mHighlightBuffer.clear();

    BarLineScatterCandleBubbleData data = getData();

    if (data == null) {
        return mHighlightBuffer;
    }

    for (int i = 0, dataSetCount = data.getDataSetCount(); i < dataSetCount; i++) {

        IDataSet dataSet = data.getDataSetByIndex(i);

        // don't include DataSets that cannot be highlighted
        if (!dataSet.isHighlightEnabled()) {
            continue;
        }

        mHighlightBuffer.addAll(buildHighlights(dataSet, i, xVal, DataSet.Rounding.CLOSEST));
    }

    return mHighlightBuffer;
}
 
Example #17
Source File: BarHighlighter.java    From StockChart-MPAndroidChart with MIT License 4 votes vote down vote up
@Override
protected BarLineScatterCandleBubbleData getData() {
    return mChart.getBarData();
}
 
Example #18
Source File: BarLineScatterCandleBubbleDataProvider.java    From StockChart-MPAndroidChart with MIT License 4 votes vote down vote up
@Override
BarLineScatterCandleBubbleData getData();
 
Example #19
Source File: BarLineScatterCandleBubbleDataProvider.java    From android-kline with Apache License 2.0 votes vote down vote up
BarLineScatterCandleBubbleData getData(); 
Example #20
Source File: BarLineScatterCandleBubbleDataProvider.java    From Ticket-Analysis with MIT License votes vote down vote up
BarLineScatterCandleBubbleData getData(); 
Example #21
Source File: BarLineScatterCandleBubbleDataProvider.java    From iMoney with Apache License 2.0 votes vote down vote up
BarLineScatterCandleBubbleData getData(); 
Example #22
Source File: BarLineScatterCandleBubbleDataProvider.java    From Stayfit with Apache License 2.0 votes vote down vote up
BarLineScatterCandleBubbleData getData(); 
Example #23
Source File: BarLineScatterCandleBubbleDataProvider.java    From NetKnight with Apache License 2.0 votes vote down vote up
BarLineScatterCandleBubbleData getData();