本文整理匯總了Java中org.achartengine.chart.PointStyle類的典型用法代碼示例。如果您正苦於以下問題:Java PointStyle類的具體用法?Java PointStyle怎麽用?Java PointStyle使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
PointStyle類屬於org.achartengine.chart包,在下文中一共展示了PointStyle類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: LineGraph
import org.achartengine.chart.PointStyle; //導入依賴的package包/類
public LineGraph()
{
// Add single dataset to multiple dataset
mDataset.addSeries(dataset);
// Customization time for line 1!
renderer.setColor(Color.RED);
renderer.setPointStyle(PointStyle.POINT);
renderer.setFillPoints(true);
renderer.setLineWidth(1);
renderer.setDisplayChartValues(true);
// Enable Zoom
mRenderer.setBackgroundColor(Color.BLACK);
mRenderer.setZoomButtonsVisible(false);
mRenderer.setXTitle("Time/Sync #");
mRenderer.setYTitle("Steppy Value");
// mRenderer.setXLabelFormat(tCurrTime);
mRenderer.setBarSpacing(1);
mRenderer.setXLabelsColor(Color.CYAN);
mRenderer.setYAxisColor(Color.GREEN);
// Add single renderer to multiple renderer
mRenderer.addSeriesRenderer(renderer);
}
示例2: ProximityGraph
import org.achartengine.chart.PointStyle; //導入依賴的package包/類
public ProximityGraph() {
// add line to line dataset
mSeriesDataset.addSeries(xSeries);
// customize the line
xRenderer.setColor(Color.RED);
xRenderer.setPointStyle(PointStyle.SQUARE);
xRenderer.setFillPoints(true);
xRenderer.setLineWidth(2);
// enable zoom
mRenderer.setZoomButtonsVisible(true);
mRenderer.setXTitle("Time");
mRenderer.setYTitle("Proximity Value");
mRenderer.setChartTitle("Proximity vs Time");
mRenderer.setXLabels(0);
// add renderer to multi renderer
mRenderer.addSeriesRenderer(xRenderer);
}
示例3: TemperatureGraph
import org.achartengine.chart.PointStyle; //導入依賴的package包/類
public TemperatureGraph() {
// add line to line dataset
mSeriesDataset.addSeries(xSeries);
// customize the line
xRenderer.setColor(Color.RED);
xRenderer.setPointStyle(PointStyle.SQUARE);
xRenderer.setFillPoints(true);
xRenderer.setLineWidth(2);
// enable zoom
mRenderer.setZoomButtonsVisible(true);
mRenderer.setXTitle("Time");
mRenderer.setYTitle("Temperature Value");
mRenderer.setChartTitle("Temperature vs Time");
mRenderer.setXLabels(0);
// add renderer to multi renderer
mRenderer.addSeriesRenderer(xRenderer);
}
示例4: LightGraph
import org.achartengine.chart.PointStyle; //導入依賴的package包/類
public LightGraph() {
// add line to line dataset
mSeriesDataset.addSeries(xSeries);
// customize the line
xRenderer.setColor(Color.RED);
xRenderer.setPointStyle(PointStyle.SQUARE);
xRenderer.setFillPoints(true);
xRenderer.setLineWidth(2);
// enable zoom
mRenderer.setZoomButtonsVisible(true);
mRenderer.setXTitle("Time");
mRenderer.setYTitle("Light Value");
mRenderer.setChartTitle("Light vs Time");
mRenderer.setXLabels(0);
// add renderer to multi renderer
mRenderer.addSeriesRenderer(xRenderer);
}
示例5: GravityGraph
import org.achartengine.chart.PointStyle; //導入依賴的package包/類
public GravityGraph() {
// add line to line dataset
mSeriesDataset.addSeries(xSeries);
// customize the line
xRenderer.setColor(Color.RED);
xRenderer.setPointStyle(PointStyle.SQUARE);
xRenderer.setFillPoints(true);
xRenderer.setLineWidth(2);
// enable zoom
mRenderer.setZoomButtonsVisible(true);
mRenderer.setXTitle("Time");
mRenderer.setYTitle("Gravity Value");
mRenderer.setChartTitle("Gravity vs Time");
mRenderer.setXLabels(0);
// add renderer to multi renderer
mRenderer.addSeriesRenderer(xRenderer);
}
示例6: addAlertSeries
import org.achartengine.chart.PointStyle; //導入依賴的package包/類
private void addAlertSeries() {
TimeSeries alertSeries = new TimeSeries("Alerts");
long alertTime = _maxTime - 5000 * 60;
alertSeries.add(alertTime, Long.MAX_VALUE);
alertSeries.add(alertTime, Long.MIN_VALUE);
_dataSet.addSeries(alertSeries);
// create new renderer for the new series
XYSeriesRenderer renderer = new XYSeriesRenderer();
_multipleSeriesRenderer.addSeriesRenderer(renderer);
renderer.setPointStyle(PointStyle.POINT);
renderer.setColor(Color.RED);
renderer.setFillPoints(false);
renderer.setDisplayChartValues(false);
// renderer.setDisplayChartValuesDistance(1);
// renderer.setChartValuesTextSize(30f);
renderer.setShowLegendItem(false);
}
示例7: addRenderer
import org.achartengine.chart.PointStyle; //導入依賴的package包/類
@Override
public void addRenderer(int series, Activity activity, int color) {
XYSeriesRenderer mCurrentRenderer = new XYSeriesRenderer();
mCurrentRenderer.setLineWidth(getDPI(3));
mCurrentRenderer.setColor(color);
// Include low and max value
mCurrentRenderer.setDisplayBoundingPoints(true);
// we add point markers
mCurrentRenderer.setPointStyle(PointStyle.CIRCLE);
mCurrentRenderer.setPointStrokeWidth(getDPI(5));
mCurrentRenderer.setShowLegendItem(false);
XYSeries seriesData = new XYSeries("data" + series);
mSeriesDataSet.add(series, seriesData);
mRenderer.addSeriesRenderer(series, mCurrentRenderer);
}
示例8: setRenderer
import org.achartengine.chart.PointStyle; //導入依賴的package包/類
protected void setRenderer(XYMultipleSeriesRenderer renderer, int[] colors,
PointStyle[] styles) {
renderer.setAxisTitleTextSize(16);
renderer.setChartTitleTextSize(20);
renderer.setLabelsTextSize(15);
renderer.setLegendTextSize(15);
renderer.setPointSize(5f);
renderer.setMargins(new int[] { 20, 30, 15, 20 });
int length = colors.length;
for (int i = 0; i < length; i++) {
XYSeriesRenderer r = new XYSeriesRenderer();
r.setColor(colors[i]);
r.setPointStyle(styles[i]);
renderer.addSeriesRenderer(r);
}
}
示例9: getDemoRenderer
import org.achartengine.chart.PointStyle; //導入依賴的package包/類
private XYMultipleSeriesRenderer getDemoRenderer() {
XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
renderer.setAxisTitleTextSize(HeartRateMonitor.CHART_AXIS_TITLE_SIZE);
renderer.setChartTitleTextSize(HeartRateMonitor.CHART_TITLE_SIZE);
renderer.setLabelsTextSize(HeartRateMonitor.CHART_LABELS_TEXT_SIZE);
renderer.setLegendTextSize(HeartRateMonitor.CHART_LEGEND_TEXT_SIZE);
renderer.setPointSize(HeartRateMonitor.CHART_POINT_SIZE);
renderer.setMarginsColor(Color.WHITE);
renderer.setMargins(new int[]{20, 20, 15, 0});
XYSeriesRenderer r = new XYSeriesRenderer();
r.setColor(Color.RED);
r.setPointStyle(PointStyle.SQUARE);
r.setFillBelowLine(true);
r.setFillBelowLineColor(Color.WHITE);
r.setFillPoints(true);
renderer.addSeriesRenderer(r);
return renderer;
}
示例10: getDemoRenderer
import org.achartengine.chart.PointStyle; //導入依賴的package包/類
/**
* {@inheritDoc}
*/
private XYMultipleSeriesRenderer getDemoRenderer() {
XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
renderer.setAxisTitleTextSize(HeartRateMonitor.CHART_AXIS_TITLE_SIZE);
renderer.setChartTitleTextSize(HeartRateMonitor.CHART_TITLE_SIZE);
renderer.setLabelsTextSize(HeartRateMonitor.CHART_LABELS_TEXT_SIZE);
renderer.setLegendTextSize(HeartRateMonitor.CHART_LEGEND_TEXT_SIZE);
renderer.setPointSize(HeartRateMonitor.CHART_POINT_SIZE);
renderer.setMarginsColor(Color.WHITE);
renderer.setMargins(new int[]{20, 30, 15, 0});
XYSeriesRenderer r = new XYSeriesRenderer();
r.setColor(Color.BLUE);
r.setPointStyle(PointStyle.SQUARE);
r.setFillBelowLine(true);
r.setFillBelowLineColor(Color.WHITE);
r.setFillPoints(true);
renderer.addSeriesRenderer(r);
return renderer;
}
示例11: onCreate
import org.achartengine.chart.PointStyle; //導入依賴的package包/類
@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);
}
示例12: buildRenderer
import org.achartengine.chart.PointStyle; //導入依賴的package包/類
private XYMultipleSeriesRenderer buildRenderer(Context context) {
XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
renderer.setAxisTitleTextSize(16);
renderer.setChartTitleTextSize(0);
renderer.setLabelsTextSize(15);
renderer.setLegendTextSize(20);
renderer.setLegendHeight(22);
renderer.setPointSize(5f);
renderer.setMargins(new int[] { 20, 30, 15, 20 });
renderer.setChartTitle("");
renderer.setXTitle(context.getResources().getString(R.string.X));
renderer.setYTitle(context.getResources().getString(R.string.Y));
renderer.setXAxisMin(Graph.MIN_HEIGHT_X);
renderer.setXAxisMax(Graph.MAX_HEIGHT_X);
renderer.setYAxisMin(Graph.MIN_HEIGHT_Y);
renderer.setYAxisMax(Graph.MAX_HEIGHT_Y);
renderer.setAxesColor(Color.GRAY);
renderer.setLabelsColor(Color.LTGRAY);
renderer.setYLabelsAlign(Align.RIGHT);
renderer.setXLabels(20);
renderer.setYLabels(20);
renderer.setPanEnabled(true);
renderer.setZoomEnabled(true);
renderer.setShowGrid(true);
renderer.setXAxisBold(true);
renderer.setYAxisBold(true);
renderer.setZoomButtonsVisible(false);
renderer.setExternalZoomEnabled(true);
XYSeriesRenderer r = new XYSeriesRenderer();
r.setColor(context.getResources().getColor(R.color.graph_color));
r.setPointStyle(PointStyle.POINT);
r.setLineWidth(4f);
renderer.addSeriesRenderer(r);
return renderer;
}
示例13: LineGraphView
import org.achartengine.chart.PointStyle; //導入依賴的package包/類
/**
* This constructor will set some properties of single chart and some properties of whole graph
*/
public LineGraphView() {
//add single line chart mSeries
mDataset.addSeries(mSeries);
//XYSeriesRenderer is used to set the properties like chart color, style of each point, etc. of single chart
final XYSeriesRenderer seriesRenderer = new XYSeriesRenderer();
//set line chart color to Black
seriesRenderer.setColor(Color.BLACK);
//set line chart style to square points
seriesRenderer.setPointStyle(PointStyle.SQUARE);
seriesRenderer.setFillPoints(true);
final XYMultipleSeriesRenderer renderer = mMultiRenderer;
//set whole graph background color to transparent color
renderer.setBackgroundColor(Color.TRANSPARENT);
renderer.setMargins(new int[] { 50, 65, 40, 5 }); // top, left, bottom, right
renderer.setMarginsColor(Color.argb(0x00, 0x01, 0x01, 0x01));
renderer.setAxesColor(Color.BLACK);
renderer.setAxisTitleTextSize(24);
renderer.setShowGrid(true);
renderer.setGridColor(Color.LTGRAY);
renderer.setLabelsColor(Color.BLACK);
renderer.setYLabelsColor(0, Color.DKGRAY);
renderer.setYLabelsAlign(Align.RIGHT);
renderer.setYLabelsPadding(4.0f);
renderer.setXLabelsColor(Color.DKGRAY);
renderer.setLabelsTextSize(20);
renderer.setLegendTextSize(20);
//Disable zoom
renderer.setPanEnabled(false, false);
renderer.setZoomEnabled(false, false);
//set title to x-axis and y-axis
renderer.setXTitle(" Time (seconds)");
renderer.setYTitle(" BPM");
renderer.addSeriesRenderer(seriesRenderer);
}
示例14: getReportRenderer
import org.achartengine.chart.PointStyle; //導入依賴的package包/類
private XYSeriesRenderer getReportRenderer(int color) {
int displayChartValueDistance = 40;
int lineWidth = 3;
XYSeriesRenderer reportRenderer = new XYSeriesRenderer();
reportRenderer.setPointStyle(PointStyle.CIRCLE);
reportRenderer.setFillPoints(true);
reportRenderer.setColor(color);
reportRenderer.setLineWidth(lineWidth);
reportRenderer.setDisplayChartValues(true);
reportRenderer.setDisplayChartValuesDistance(displayChartValueDistance);
return reportRenderer;
}
示例15: buildRenderer
import org.achartengine.chart.PointStyle; //導入依賴的package包/類
protected XYMultipleSeriesRenderer buildRenderer(int color, PointStyle style, boolean fill) {
XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
//設置圖表中曲線本身的樣式,包括顏色、點的大小以及線的粗細等
XYSeriesRenderer r = new XYSeriesRenderer();
r.setColor(Color.RED);
// r.setPointStyle(null);
// r.setFillPoints(fill);
r.setLineWidth(1);
renderer.addSeriesRenderer(r);
return renderer;
}