本文整理汇总了Java中com.github.mikephil.charting.data.BubbleData.getDataSets方法的典型用法代码示例。如果您正苦于以下问题:Java BubbleData.getDataSets方法的具体用法?Java BubbleData.getDataSets怎么用?Java BubbleData.getDataSets使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.github.mikephil.charting.data.BubbleData
的用法示例。
在下文中一共展示了BubbleData.getDataSets方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: drawData
import com.github.mikephil.charting.data.BubbleData; //导入方法依赖的package包/类
@Override
public void drawData(Canvas c) {
BubbleData bubbleData = mChart.getBubbleData();
for (IBubbleDataSet set : bubbleData.getDataSets()) {
if (set.isVisible())
drawDataSet(c, set);
}
}
示例2: drawData
import com.github.mikephil.charting.data.BubbleData; //导入方法依赖的package包/类
@Override
public void drawData(Canvas c) {
BubbleData bubbleData = mChart.getBubbleData();
for (IBubbleDataSet set : bubbleData.getDataSets()) {
if (set.isVisible() && set.getEntryCount() > 0)
drawDataSet(c, set);
}
}
示例3: drawData
import com.github.mikephil.charting.data.BubbleData; //导入方法依赖的package包/类
@Override
public void drawData(Canvas c) {
BubbleData bubbleData = mChart.getBubbleData();
for (BubbleDataSet set : bubbleData.getDataSets()) {
if (set.isVisible() && set.getEntryCount() > 0)
drawDataSet(c, set);
}
}
示例4: drawData
import com.github.mikephil.charting.data.BubbleData; //导入方法依赖的package包/类
@Override
public void drawData(Canvas c) {
BubbleData bubbleData = mChart.getBubbleData();
IBubbleDataSet set;
List<IBubbleDataSet> dataSets = bubbleData.getDataSets();
int setCount = dataSets.size();
for (int i = 0; i < setCount; i++) {
set = dataSets.get(i);
if (set.isVisible())
drawDataSet(c, set);
}
}
示例5: drawValues
import com.github.mikephil.charting.data.BubbleData; //导入方法依赖的package包/类
@Override
public void drawValues(Canvas c) {
BubbleData bubbleData = mChart.getBubbleData();
if (bubbleData == null)
return;
// if values are drawn
if (bubbleData.getYValCount() < (int) (Math.ceil((float) (mChart.getMaxVisibleCount())
* mViewPortHandler.getScaleX()))) {
final List<IBubbleDataSet> dataSets = bubbleData.getDataSets();
float lineHeight = Utils.calcTextHeight(mValuePaint, "1");
for (int i = 0; i < dataSets.size(); i++) {
IBubbleDataSet dataSet = dataSets.get(i);
if (!dataSet.isDrawValuesEnabled() || dataSet.getEntryCount() == 0)
continue;
// apply the text-styling defined by the DataSet
applyValueTextStyle(dataSet);
final float phaseX = mAnimator.getPhaseX();
final float phaseY = mAnimator.getPhaseY();
BubbleEntry entryFrom = dataSet.getEntryForXIndex(mMinX);
BubbleEntry entryTo = dataSet.getEntryForXIndex(mMaxX);
int minx = dataSet.getEntryIndex(entryFrom);
int maxx = Math.min(dataSet.getEntryIndex(entryTo) + 1, dataSet.getEntryCount());
final float[] positions = mChart.getTransformer(dataSet.getAxisDependency())
.generateTransformedValuesBubble(dataSet, phaseX, phaseY, minx, maxx);
final float alpha = phaseX == 1 ? phaseY : phaseX;
for (int j = 0; j < positions.length; j += 2) {
int valueTextColor = dataSet.getValueTextColor(j / 2 + minx);
valueTextColor = Color.argb(Math.round(255.f * alpha), Color.red(valueTextColor),
Color.green(valueTextColor), Color.blue(valueTextColor));
float x = positions[j];
float y = positions[j + 1];
if (!mViewPortHandler.isInBoundsRight(x))
break;
if ((!mViewPortHandler.isInBoundsLeft(x) || !mViewPortHandler.isInBoundsY(y)))
continue;
BubbleEntry entry = dataSet.getEntryForIndex(j / 2 + minx);
drawValue(c, dataSet.getValueFormatter(), entry.getSize(), entry, i, x,
y + (0.5f * lineHeight), valueTextColor);
}
}
}
}
示例6: drawValues
import com.github.mikephil.charting.data.BubbleData; //导入方法依赖的package包/类
@Override
public void drawValues(Canvas c) {
BubbleData bubbleData = mChart.getBubbleData();
if (bubbleData == null)
return;
// if values are drawn
if (bubbleData.getYValCount() < (int) (Math.ceil((float) (mChart.getMaxVisibleCount())
* mViewPortHandler.getScaleX()))) {
final List<IBubbleDataSet> dataSets = bubbleData.getDataSets();
float lineHeight = Utils.calcTextHeight(mValuePaint, "1");
for (int i = 0; i < dataSets.size(); i++) {
IBubbleDataSet dataSet = dataSets.get(i);
if (!dataSet.isDrawValuesEnabled() || dataSet.getEntryCount() == 0)
continue;
// apply the text-styling defined by the DataSet
applyValueTextStyle(dataSet);
final float phaseX = Math.max(0.f, Math.min(1.f, mAnimator.getPhaseX()));
final float phaseY = mAnimator.getPhaseY();
BubbleEntry entryFrom = dataSet.getEntryForXIndex(mMinX);
BubbleEntry entryTo = dataSet.getEntryForXIndex(mMaxX);
int minx = dataSet.getEntryIndex(entryFrom);
int maxx = Math.min(dataSet.getEntryIndex(entryTo) + 1, dataSet.getEntryCount());
final float[] positions = mChart.getTransformer(dataSet.getAxisDependency())
.generateTransformedValuesBubble(dataSet, phaseX, phaseY, minx, maxx);
final float alpha = phaseX == 1 ? phaseY : phaseX;
for (int j = 0; j < positions.length; j += 2) {
int valueTextColor = dataSet.getValueTextColor(j / 2 + minx);
valueTextColor = Color.argb(Math.round(255.f * alpha), Color.red(valueTextColor),
Color.green(valueTextColor), Color.blue(valueTextColor));
float x = positions[j];
float y = positions[j + 1];
if (!mViewPortHandler.isInBoundsRight(x))
break;
if ((!mViewPortHandler.isInBoundsLeft(x) || !mViewPortHandler.isInBoundsY(y)))
continue;
BubbleEntry entry = dataSet.getEntryForIndex(j / 2 + minx);
drawValue(c, dataSet.getValueFormatter(), entry.getSize(), entry, i, x,
y + (0.5f * lineHeight), valueTextColor);
}
}
}
}
示例7: drawValues
import com.github.mikephil.charting.data.BubbleData; //导入方法依赖的package包/类
@Override
public void drawValues(Canvas c) {
BubbleData bubbleData = mChart.getBubbleData();
if (bubbleData == null)
return;
// if values are drawn
if (bubbleData.getYValCount() < (int) (Math.ceil((float) (mChart.getMaxVisibleCount())
* mViewPortHandler.getScaleX()))) {
final List<BubbleDataSet> dataSets = bubbleData.getDataSets();
float lineHeight = Utils.calcTextHeight(mValuePaint, "1");
for (int i = 0; i < dataSets.size(); i++) {
BubbleDataSet dataSet = dataSets.get(i);
if (!dataSet.isDrawValuesEnabled() || dataSet.getEntryCount() == 0)
continue;
// apply the text-styling defined by the DataSet
applyValueTextStyle(dataSet);
final float phaseX = mAnimator.getPhaseX();
final float phaseY = mAnimator.getPhaseY();
final float alpha = phaseX == 1 ? phaseY : phaseX;
int valueTextColor = dataSet.getValueTextColor();
valueTextColor = Color.argb(Math.round(255.f * alpha), Color.red(valueTextColor),
Color.green(valueTextColor), Color.blue(valueTextColor));
mValuePaint.setColor(valueTextColor);
final List<BubbleEntry> entries = dataSet.getYVals();
Entry entryFrom = dataSet.getEntryForXIndex(mMinX);
Entry entryTo = dataSet.getEntryForXIndex(mMaxX);
int minx = dataSet.getEntryPosition(entryFrom);
int maxx = Math.min(dataSet.getEntryPosition(entryTo) + 1, dataSet.getEntryCount());
final float[] positions = mChart.getTransformer(dataSet.getAxisDependency())
.generateTransformedValuesBubble(entries, phaseX, phaseY, minx, maxx);
for (int j = 0; j < positions.length; j += 2) {
float x = positions[j];
float y = positions[j + 1];
if (!mViewPortHandler.isInBoundsRight(x))
break;
if ((!mViewPortHandler.isInBoundsLeft(x) || !mViewPortHandler.isInBoundsY(y)))
continue;
BubbleEntry entry = entries.get(j / 2 + minx);
drawValue(c, dataSet.getValueFormatter(), entry.getSize(), entry, i, x,
y + (0.5f * lineHeight));
}
}
}
}
示例8: drawValues
import com.github.mikephil.charting.data.BubbleData; //导入方法依赖的package包/类
@Override
public void drawValues(Canvas c) {
BubbleData bubbleData = mChart.getBubbleData();
if (bubbleData == null)
return;
// if values are drawn
if (isDrawingValuesAllowed(mChart)) {
final List<IBubbleDataSet> dataSets = bubbleData.getDataSets();
float lineHeight = Utils.calcTextHeight(mValuePaint, "1");
for (int i = 0; i < dataSets.size(); i++) {
IBubbleDataSet dataSet = dataSets.get(i);
if (!shouldDrawValues(dataSet))
continue;
// apply the text-styling defined by the DataSet
applyValueTextStyle(dataSet);
final float phaseX = Math.max(0.f, Math.min(1.f, mAnimator.getPhaseX()));
final float phaseY = mAnimator.getPhaseY();
mXBounds.set(mChart, dataSet);
final float[] positions = mChart.getTransformer(dataSet.getAxisDependency())
.generateTransformedValuesBubble(dataSet, phaseY, mXBounds.min, mXBounds.max);
final float alpha = phaseX == 1 ? phaseY : phaseX;
for (int j = 0; j < positions.length; j += 2) {
int valueTextColor = dataSet.getValueTextColor(j / 2 + mXBounds.min);
valueTextColor = Color.argb(Math.round(255.f * alpha), Color.red(valueTextColor),
Color.green(valueTextColor), Color.blue(valueTextColor));
float x = positions[j];
float y = positions[j + 1];
if (!mViewPortHandler.isInBoundsRight(x))
break;
if ((!mViewPortHandler.isInBoundsLeft(x) || !mViewPortHandler.isInBoundsY(y)))
continue;
BubbleEntry entry = dataSet.getEntryForIndex(j / 2 + mXBounds.min);
drawValue(c, dataSet.getValueFormatter(), entry.getSize(), entry, i, x,
y + (0.5f * lineHeight), valueTextColor);
}
}
}
}