com.github.mikephil.charting.charts.ScatterChart.ScatterShape Java Examples
The following examples show how to use
com.github.mikephil.charting.charts.ScatterChart.ScatterShape.
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: SimpleFragment.java From Stayfit with Apache License 2.0 | 6 votes |
protected ScatterData generateScatterData(int dataSets, float range, int count) { ArrayList<IScatterDataSet> sets = new ArrayList<IScatterDataSet>(); ScatterShape[] shapes = ScatterChart.getAllPossibleShapes(); for(int i = 0; i < dataSets; i++) { ArrayList<Entry> entries = new ArrayList<Entry>(); for(int j = 0; j < count; j++) { entries.add(new Entry((float) (Math.random() * range) + range / 4, j)); } ScatterDataSet ds = new ScatterDataSet(entries, getLabel(i)); ds.setScatterShapeSize(12f); ds.setScatterShape(shapes[i % shapes.length]); ds.setColors(ColorTemplate.COLORFUL_COLORS); ds.setScatterShapeSize(9f); sets.add(ds); } ScatterData d = new ScatterData(ChartData.generateXVals(0, count), sets); d.setValueTypeface(tf); return d; }
Example #2
Source File: ScatterChartManager.java From react-native-mp-android-chart with MIT License | 6 votes |
@Override void dataSetConfig(IDataSet<Entry> dataSet, ReadableMap config) { ScatterDataSet scatterDataSet = (ScatterDataSet) dataSet; ChartDataSetConfigUtils.commonConfig(scatterDataSet, config); ChartDataSetConfigUtils.commonBarLineScatterCandleBubbleConfig(scatterDataSet, config); ChartDataSetConfigUtils.commonLineScatterCandleRadarConfig(scatterDataSet, config); // ScatterDataSet only config if (BridgeUtils.validate(config, ReadableType.Number, "scatterShapeSize")) { scatterDataSet.setScatterShapeSize((float) config.getDouble("scatterShapeSize")); } if (BridgeUtils.validate(config, ReadableType.String, "scatterShape")) { scatterDataSet.setScatterShape(ScatterShape.valueOf(config.getString("scatterShape").toUpperCase())); } if (BridgeUtils.validate(config, ReadableType.String, "scatterShapeHoleColor")) { scatterDataSet.setScatterShapeHoleColor(Color.parseColor(config.getString("scatterShapeHoleColor"))); } if (BridgeUtils.validate(config, ReadableType.Number, "scatterShapeHoleRadius")) { scatterDataSet.setScatterShapeHoleRadius((float) config.getDouble("scatterShapeHoleRadius")); } }
Example #3
Source File: ScatterDataSet.java From Stayfit with Apache License 2.0 | 4 votes |
@Override public ScatterShape getScatterShape() { return mScatterShape; }
Example #4
Source File: ScatterDataSet.java From iMoney with Apache License 2.0 | 2 votes |
/** * Sets the shape that is drawn on the position where the values are at. If * "CUSTOM" is chosen, you need to call setCustomScatterShape(...) and * provide a path object that is drawn as the custom scattershape. * * @param shape */ public void setScatterShape(ScatterShape shape) { mScatterShape = shape; }
Example #5
Source File: ScatterDataSet.java From iMoney with Apache License 2.0 | 2 votes |
/** * returns all the different scattershapes the chart uses * * @return */ public ScatterShape getScatterShape() { return mScatterShape; }
Example #6
Source File: ScatterDataSet.java From Stayfit with Apache License 2.0 | 2 votes |
/** * Sets the shape that is drawn on the position where the values are at. * * @param shape */ public void setScatterShape(ScatterShape shape) { mScatterShape = shape; }
Example #7
Source File: ScatterDataSet.java From Notification-Analyser with MIT License | 2 votes |
/** * Sets the shape that is drawn on the position where the values are at. If * "CUSTOM" is chosen, you need to call setCustomScatterShape(...) and * provide a path object that is drawn as the custom scattershape. * * @param shape */ public void setScatterShape(ScatterShape shape) { mScatterShape = shape; }
Example #8
Source File: ScatterDataSet.java From Notification-Analyser with MIT License | 2 votes |
/** * returns all the different scattershapes the chart uses * * @return */ public ScatterShape getScatterShape() { return mScatterShape; }