public RadarEntry copy() { RadarEntry e = new RadarEntry(getY(), getData()); return e; }
@Override public DataSet<RadarEntry> copy() { List<RadarEntry> entries = new ArrayList<RadarEntry>(); for (int i = 0; i < mValues.size(); i++) { entries.add(mValues.get(i).copy()); } RadarDataSet copied = new RadarDataSet(entries, getLabel()); copy(copied); return copied; }
(entry.getY() - mChart.getYChartMin()) * factor * phaseY, sliceangle * j * phaseX + mChart.getRotationAngle(), pOut); if (entry.getIcon() != null && dataSet.isDrawIconsEnabled()) { Drawable icon = entry.getIcon(); (entry.getY()) * factor * phaseY + iconsOffset.y, sliceangle * j * phaseX + mChart.getRotationAngle(), pIcon);
/** * This is the same as getY(). Returns the value of the RadarEntry. * * @return */ public float getValue() { return getY(); }
entries1.add(new RadarEntry(val1)); entries2.add(new RadarEntry(val2));
(entry.getY() - mChart.getYChartMin()) * factor * phaseY, sliceangle * j * phaseX + mChart.getRotationAngle(), pOut); drawValue(c, dataSet.getValueFormatter(), entry.getY(), entry, i, if (entry.getIcon() != null && dataSet.isDrawIconsEnabled()) { Drawable icon = entry.getIcon(); (entry.getY()) * factor * phaseY + iconsOffset.y, sliceangle * j * phaseX + mChart.getRotationAngle(), pIcon);
/** * Used to draw radar value labels, calls {@link #getFormattedValue(float)} by default. * * @param radarEntry entry being labeled * @return formatted string label */ public String getRadarLabel(RadarEntry radarEntry) { return getFormattedValue(radarEntry.getY()); }
public void showRadarChart(final List<String> xData, List<List<Float>> yDatas, List<String> names, List<Integer> colors) { initRadarChart(); xAxis.setValueFormatter(new IAxisValueFormatter() { @Override public String getFormattedValue(float value, AxisBase axis) { return xData.get((int) value % xData.size()); } }); List<IRadarDataSet> sets = new ArrayList<>(); for (int i = 0; i < yDatas.size(); i++) { ArrayList<RadarEntry> yValues = new ArrayList<>(); for (int j = 0; j < yDatas.get(i).size(); j++) { yValues.add(new RadarEntry(yDatas.get(i).get(j), j)); } RadarDataSet radarDataSet = new RadarDataSet(yValues, names.get(i)); radarDataSet.setColor(colors.get(i)); radarDataSet.setDrawFilled(true); // 数据线条宽度 radarDataSet.setLineWidth(2f); sets.add(radarDataSet); } RadarData data = new RadarData(sets); // 数据字体大小 data.setValueTextSize(8f); // 是否绘制Y值到图表 data.setDrawValues(true); mRadarChart.setData(data); mRadarChart.invalidate(); }
public RadarEntry copy() { RadarEntry e = new RadarEntry(getY(), getData()); return e; }
(entry.getY() - mChart.getYChartMin()) * factor * phaseY, sliceangle * j * phaseX + mChart.getRotationAngle(), pOut); drawValue(c, dataSet.getValueFormatter(), entry.getY(), entry, i, if (entry.getIcon() != null && dataSet.isDrawIconsEnabled()) { Drawable icon = entry.getIcon(); (entry.getY()) * factor * phaseY + iconsOffset.y, sliceangle * j * phaseX + mChart.getRotationAngle(), pIcon);
(e.getY() - mChart.getYChartMin()) * factor * phaseY, sliceangle * j * phaseX + mChart.getRotationAngle(), pOut);
entries1.add(new RadarEntry(val1)); entries2.add(new RadarEntry(val2));
@Override public DataSet<RadarEntry> copy() { List<RadarEntry> yVals = new ArrayList<RadarEntry>(); for (int i = 0; i < mValues.size(); i++) { yVals.add(mValues.get(i).copy()); } RadarDataSet copied = new RadarDataSet(yVals, getLabel()); copied.mColors = mColors; copied.mHighLightColor = mHighLightColor; return copied; } }
@Override public RadarEntry copy() { RadarEntry e = new RadarEntry(getY(), getData()); return e; }
(entry.getY() - mChart.getYChartMin()) * factor * phaseY, sliceangle * j * phaseX + mChart.getRotationAngle(), pOut); drawValue(c, dataSet.getValueFormatter(), entry.getY(), entry, i, if (entry.getIcon() != null && dataSet.isDrawIconsEnabled()) { Drawable icon = entry.getIcon(); (entry.getY()) * factor * phaseY + iconsOffset.y, sliceangle * j * phaseX + mChart.getRotationAngle(), pIcon);
continue; float y = (e.getY() - mChart.getYChartMin());
@Override public DataSet<RadarEntry> copy() { List<RadarEntry> yVals = new ArrayList<RadarEntry>(); for (int i = 0; i < mValues.size(); i++) { yVals.add(mValues.get(i).copy()); } RadarDataSet copied = new RadarDataSet(yVals, getLabel()); copied.mColors = mColors; copied.mHighLightColor = mHighLightColor; return copied; } }
public RadarEntry copy() { RadarEntry e = new RadarEntry(getY(), getData()); return e; }
(entry.getY() - mChart.getYChartMin()) * factor * phaseY, sliceangle * j * phaseX + mChart.getRotationAngle(), pOut); drawValue(c, dataSet.getValueFormatter(), entry.getY(), entry, i, if (entry.getIcon() != null && dataSet.isDrawIconsEnabled()) { Drawable icon = entry.getIcon(); (entry.getY()) * factor * phaseY + iconsOffset.y, sliceangle * j * phaseX + mChart.getRotationAngle(), pIcon);
/** * This is the same as getY(). Returns the value of the RadarEntry. * * @return */ public float getValue() { return getY(); }