Java Code Examples for com.github.mikephil.charting.interfaces.dataprovider.LineDataProvider#getYChartMax()
The following examples show how to use
com.github.mikephil.charting.interfaces.dataprovider.LineDataProvider#getYChartMax() .
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: DefaultFillFormatter.java From StockChart-MPAndroidChart with MIT License | 5 votes |
@Override public float getFillLinePosition(ILineDataSet dataSet, LineDataProvider dataProvider) { float fillMin = 0f; float chartMaxY = dataProvider.getYChartMax(); float chartMinY = dataProvider.getYChartMin(); LineData data = dataProvider.getLineData(); if (dataSet.getYMax() > 0 && dataSet.getYMin() < 0) { fillMin = 0f; } else { float max, min; if (data.getYMax() > 0) { max = 0f; } else { max = chartMaxY; } if (data.getYMin() < 0) { min = 0f; } else { min = chartMinY; } fillMin = dataSet.getYMin() >= 0 ? min : max; } return fillMin; }
Example 2
Source File: DefaultFillFormatter.java From Ticket-Analysis with MIT License | 5 votes |
@Override public float getFillLinePosition(ILineDataSet dataSet, LineDataProvider dataProvider) { float fillMin = 0f; float chartMaxY = dataProvider.getYChartMax(); float chartMinY = dataProvider.getYChartMin(); LineData data = dataProvider.getLineData(); if (dataSet.getYMax() > 0 && dataSet.getYMin() < 0) { fillMin = 0f; } else { float max, min; if (data.getYMax() > 0) max = 0f; else max = chartMaxY; if (data.getYMin() < 0) min = 0f; else min = chartMinY; fillMin = dataSet.getYMin() >= 0 ? min : max; } return fillMin; }
Example 3
Source File: DefaultFillFormatter.java From android-kline with Apache License 2.0 | 5 votes |
@Override public float getFillLinePosition(ILineDataSet dataSet, LineDataProvider dataProvider) { float fillMin = 0f; float chartMaxY = dataProvider.getYChartMax(); float chartMinY = dataProvider.getYChartMin(); LineData data = dataProvider.getLineData(); if (dataSet.getYMax() > 0 && dataSet.getYMin() < 0) { fillMin = 0f; } else { float max, min; if (data.getYMax() > 0) max = 0f; else max = chartMaxY; if (data.getYMin() < 0) min = 0f; else min = chartMinY; fillMin = dataSet.getYMin() >= 0 ? min : max; } return fillMin; }
Example 4
Source File: DefaultFillFormatter.java From Stayfit with Apache License 2.0 | 5 votes |
@Override public float getFillLinePosition(ILineDataSet dataSet, LineDataProvider dataProvider) { float fillMin = 0f; float chartMaxY = dataProvider.getYChartMax(); float chartMinY = dataProvider.getYChartMin(); LineData data = dataProvider.getLineData(); if (dataSet.getYMax() > 0 && dataSet.getYMin() < 0) { fillMin = 0f; } else { float max, min; if (data.getYMax() > 0) max = 0f; else max = chartMaxY; if (data.getYMin() < 0) min = 0f; else min = chartMinY; fillMin = dataSet.getYMin() >= 0 ? min : max; } return fillMin; }
Example 5
Source File: DefaultFillFormatter.java From NetKnight with Apache License 2.0 | 5 votes |
@Override public float getFillLinePosition(ILineDataSet dataSet, LineDataProvider dataProvider) { float fillMin = 0f; float chartMaxY = dataProvider.getYChartMax(); float chartMinY = dataProvider.getYChartMin(); LineData data = dataProvider.getLineData(); if (dataSet.getYMax() > 0 && dataSet.getYMin() < 0) { fillMin = 0f; } else { float max, min; if (data.getYMax() > 0) max = 0f; else max = chartMaxY; if (data.getYMin() < 0) min = 0f; else min = chartMinY; fillMin = dataSet.getYMin() >= 0 ? min : max; } return fillMin; }