本文整理匯總了Java中org.achartengine.chart.PointStyle.CIRCLE屬性的典型用法代碼示例。如果您正苦於以下問題:Java PointStyle.CIRCLE屬性的具體用法?Java PointStyle.CIRCLE怎麽用?Java PointStyle.CIRCLE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.achartengine.chart.PointStyle
的用法示例。
在下文中一共展示了PointStyle.CIRCLE屬性的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onCreate
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// setContentView(R.layout.activity_main);
String[] titles = new String[] { "��u1" }; // �w�q��u���W��
List<double[]> x = new ArrayList<double[]>(); // �I��x����
List<double[]> y = new ArrayList<double[]>(); // �I��y����
// �ƭ�X,Y���Эȿ�J
x.add(new double[] { 4, 5, 6 ,7 , 8, 9,10,11,12,14,15,16,17,18,19,20 ,23});
y.add(new double[] { 8, 9,8, 9, 6, 9, 9, 10,11, 7, 6, 8, 9, 8,8, 9, 10, 8, 10, 10, 7 });
XYMultipleSeriesDataset dataset = buildDatset(titles, x, y); // �x�s�y�Э�
int[] colors = new int[] { Color.BLUE };// ��u���C��
PointStyle[] styles = new PointStyle[] { PointStyle.CIRCLE }; // ��u�I����
XYMultipleSeriesRenderer renderer = buildRenderer(colors, styles, true);
setChartSettings(renderer, "�_�_�ʧ@�έp", "�q2/1�}�l��N��", "����", 0, 150, 0, 15, Color.BLACK);// �w�q��u��
View chart = ChartFactory.getLineChartView(this, dataset, renderer);
setContentView(chart);
}
示例2: execute
/**
* Executes the chart demo.
*
* @param context the context
* @return the built intent
*/
public Intent execute(Context context) {
String[] titles = new String[] { "Series 1", "Series 2", "Series 3", "Series 4", "Series 5" };
List<double[]> x = new ArrayList<double[]>();
List<double[]> values = new ArrayList<double[]>();
int count = 20;
int length = titles.length;
Random r = new Random();
for (int i = 0; i < length; i++) {
double[] xValues = new double[count];
double[] yValues = new double[count];
for (int k = 0; k < count; k++) {
xValues[k] = k + r.nextInt() % 10;
yValues[k] = k * 2 + r.nextInt() % 10;
}
x.add(xValues);
values.add(yValues);
}
int[] colors = new int[] { Color.BLUE, Color.CYAN, Color.MAGENTA, Color.LTGRAY, Color.GREEN };
PointStyle[] styles = new PointStyle[] { PointStyle.X, PointStyle.DIAMOND, PointStyle.TRIANGLE,
PointStyle.SQUARE, PointStyle.CIRCLE };
XYMultipleSeriesRenderer renderer = buildRenderer(colors, styles);
setChartSettings(renderer, "Scatter chart", "X", "Y", -10, 30, -10, 51, Color.GRAY,
Color.LTGRAY);
renderer.setXLabels(10);
renderer.setYLabels(10);
length = renderer.getSeriesRendererCount();
for (int i = 0; i < length; i++) {
((XYSeriesRenderer) renderer.getSeriesRendererAt(i)).setFillPoints(true);
}
return ChartFactory.getScatterChartIntent(context, buildDataset(titles, x, values), renderer);
}
示例3: execute
public Intent execute(Context context) {
String[] titles = new String[] { title };
List<Date[]> xd = new ArrayList<Date[]>();
List<double[]> yd = new ArrayList<double[]>();
int numOfValue = y.size();
Date[] dates = new Date[numOfValue];
double[] values = new double[numOfValue];
for (int j = 0; j < numOfValue; j++) {
dates[j] = new Date(x.get(j));
values[j] = y.get(j);
}
xd.add(dates);
yd.add(values);
double minY = Collections.min(y);
double maxY = Collections.max(y);
int[] colors = new int[] { Color.GREEN };
PointStyle[] styles = new PointStyle[] { PointStyle.CIRCLE };
XYMultipleSeriesRenderer renderer = buildRenderer(colors, styles);
int length = renderer.getSeriesRendererCount();
for (int i = 0; i < length; i++) {
((XYSeriesRenderer) renderer.getSeriesRendererAt(i)).setFillPoints(true);
}
setChartSettings(renderer, title + " from " + vsName, "Time", title,
x.get(0), x.get(numOfValue - 1), minY * 2
- maxY, maxY * 2 - minY, Color.LTGRAY, Color.LTGRAY);
renderer.setXLabels(10);
renderer.setYLabels(10);
renderer.setShowGrid(true);
renderer.setXLabelsAlign(Align.CENTER);
renderer.setYLabelsAlign(Align.RIGHT);
Intent intent = ChartFactory.getTimeChartIntent(context,
buildDateDataset(titles, xd, yd), renderer, "h:mm a");
return intent;
}