本文整理匯總了Java中org.achartengine.renderer.XYMultipleSeriesRenderer.setPointSize方法的典型用法代碼示例。如果您正苦於以下問題:Java XYMultipleSeriesRenderer.setPointSize方法的具體用法?Java XYMultipleSeriesRenderer.setPointSize怎麽用?Java XYMultipleSeriesRenderer.setPointSize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.achartengine.renderer.XYMultipleSeriesRenderer
的用法示例。
在下文中一共展示了XYMultipleSeriesRenderer.setPointSize方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setChartSettings
import org.achartengine.renderer.XYMultipleSeriesRenderer; //導入方法依賴的package包/類
protected void setChartSettings(XYMultipleSeriesRenderer renderer, String xTitle, String yTitle,
double xMin, double xMax, double yMin, double yMax, int axesColor, int labelsColor) {
//有關對圖表的渲染可參看api文檔
renderer.setChartTitle(mTitle);
renderer.setXTitle(xTitle);
renderer.setYTitle(yTitle);
renderer.setXAxisMin(xMin);
renderer.setXAxisMax(xMax);
renderer.setYAxisMin(yMin);
renderer.setYAxisMax(yMax);
renderer.setAxesColor(axesColor);
renderer.setLabelsColor(labelsColor);
renderer.setShowGrid(true);
renderer.setGridColor(Color.GREEN);
renderer.setXLabels(20);
renderer.setYLabels(10);
renderer.setXTitle("Time");
renderer.setYTitle(" ");
renderer.setYLabelsAlign(Paint.Align.RIGHT);
renderer.setPointSize((float) 3);
renderer.setShowLegend(false);
}
示例2: configureRenderer
import org.achartengine.renderer.XYMultipleSeriesRenderer; //導入方法依賴的package包/類
/**
* Set some ChartView settings
*
* @param XYRenderer
*/
private void configureRenderer(XYMultipleSeriesRenderer XYRenderer)
{
XYRenderer.setAxesColor(Color.LTGRAY);
XYRenderer.setLabelsColor(Color.LTGRAY);
XYRenderer.setZoomEnabled(false, false);
XYRenderer.setAxisTitleTextSize(16);
XYRenderer.setChartTitleTextSize(20);
XYRenderer.setLabelsTextSize(15);
XYRenderer.setLegendTextSize(15);
XYRenderer.setPointSize(5f);
int margin = mContext.getResources().getDimensionPixelSize(R.dimen.chart_title_margin);
XYRenderer.setMargins(new int[] {margin, margin, margin, margin});
XYRenderer.setShowGrid(true);
XYRenderer.setXLabelsAlign(Align.RIGHT);
XYRenderer.setYLabels(20);
// if in ScrollView, need set
XYRenderer.setInScroll(true);
}
示例3: setRenderer
import org.achartengine.renderer.XYMultipleSeriesRenderer; //導入方法依賴的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);
}
}
示例4: customizeMultipleRender
import org.achartengine.renderer.XYMultipleSeriesRenderer; //導入方法依賴的package包/類
protected XYMultipleSeriesRenderer customizeMultipleRender(){
// Creating a XYMultipleSeriesRenderer to customize the whole chart
XYMultipleSeriesRenderer rendererT = new XYMultipleSeriesRenderer();
rendererT.setXLabels(0);
rendererT.setBackgroundColor(Color.BLACK);
rendererT.setAxesColor(Color.WHITE);
rendererT.setGridColor(Color.WHITE);
rendererT.setShowGrid(true);
rendererT.setApplyBackgroundColor(true);
rendererT.setXTitle("Index");
rendererT.setYTitle("Rebuffering ratio (%)");
// Changing font size and point size
rendererT.setAxisTitleTextSize(26);
rendererT.setLabelsTextSize(22);
rendererT.setLegendTextSize(26);
rendererT.setLegendHeight(80);
rendererT.setPointSize(8);
// Setting margins: above, left, below, right
rendererT.setMargins(new int[] {0, 70, 100, 50});
return rendererT;
}
示例5: CombinedXYChart
import org.achartengine.renderer.XYMultipleSeriesRenderer; //導入方法依賴的package包/類
/**
* Builds a new combined XY chart instance.
*
* @param dataset the multiple series dataset
* @param renderer the multiple series renderer
* @param types the XY chart types
*/
public CombinedXYChart(XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer,
String[] types) {
super(dataset, renderer);
int length = types.length;
mCharts = new XYChart[length];
for (int i = 0; i < length; i++) {
try {
mCharts[i] = getXYChart(types[i]);
} catch (Exception e) {
// ignore
}
if (mCharts[i] == null) {
throw new IllegalArgumentException("Unknown chart type " + types[i]);
} else {
XYMultipleSeriesDataset newDataset = new XYMultipleSeriesDataset();
newDataset.addSeries(dataset.getSeriesAt(i));
XYMultipleSeriesRenderer newRenderer = new XYMultipleSeriesRenderer();
// TODO: copy other parameters here
newRenderer.setBarSpacing(renderer.getBarSpacing());
newRenderer.setPointSize(renderer.getPointSize());
int scale = dataset.getSeriesAt(i).getScaleNumber();
if (renderer.isMinXSet(scale)) {
newRenderer.setXAxisMin(renderer.getXAxisMin(scale));
}
if (renderer.isMaxXSet(scale)) {
newRenderer.setXAxisMax(renderer.getXAxisMax(scale));
}
if (renderer.isMinYSet(scale)) {
newRenderer.setYAxisMin(renderer.getYAxisMin(scale));
}
if (renderer.isMaxYSet(scale)) {
newRenderer.setYAxisMax(renderer.getYAxisMax(scale));
}
newRenderer.addSeriesRenderer(renderer.getSeriesRendererAt(i));
mCharts[i].setDatasetRenderer(newDataset, newRenderer);
}
}
}
示例6: buildRenderer
import org.achartengine.renderer.XYMultipleSeriesRenderer; //導入方法依賴的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;
}
示例7: setRenderer
import org.achartengine.renderer.XYMultipleSeriesRenderer; //導入方法依賴的package包/類
private 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);
}
}
示例8: setRenderer
import org.achartengine.renderer.XYMultipleSeriesRenderer; //導入方法依賴的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: CombinedXYChart
import org.achartengine.renderer.XYMultipleSeriesRenderer; //導入方法依賴的package包/類
/**
* Builds a new combined XY chart instance.
*
* @param dataset the multiple series dataset
* @param renderer the multiple series renderer
* @param chartDefinitions the XY chart definitions
*/
public CombinedXYChart(XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer,
XYCombinedChartDef[] chartDefinitions) {
super(dataset, renderer);
this.chartDefinitions = chartDefinitions;
int length = chartDefinitions.length;
mCharts = new XYChart[length];
for (int i = 0; i < length; i++) {
try {
mCharts[i] = getXYChart(chartDefinitions[i].getType());
} catch (Exception e) {
// ignore
}
if (mCharts[i] == null) {
throw new IllegalArgumentException("Unknown chart type " + chartDefinitions[i].getType());
} else {
XYMultipleSeriesDataset newDataset = new XYMultipleSeriesDataset();
XYMultipleSeriesRenderer newRenderer = new XYMultipleSeriesRenderer();
for (int seriesIndex : chartDefinitions[i].getSeriesIndex()) {
newDataset.addSeries(dataset.getSeriesAt(seriesIndex));
newRenderer.addSeriesRenderer(renderer.getSeriesRendererAt(seriesIndex));
}
newRenderer.setBarSpacing(renderer.getBarSpacing());
newRenderer.setPointSize(renderer.getPointSize());
mCharts[i].setDatasetRenderer(newDataset, newRenderer);
}
}
}
示例10: customizeMultipleRender
import org.achartengine.renderer.XYMultipleSeriesRenderer; //導入方法依賴的package包/類
protected XYMultipleSeriesRenderer customizeMultipleRender(){
// Creating a XYMultipleSeriesRenderer to customize the whole chart
XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
renderer.setXLabels(0);
renderer.setBackgroundColor(Color.BLACK);
renderer.setAxesColor(Color.WHITE);
renderer.setGridColor(Color.WHITE);
renderer.setShowGrid(true);
renderer.setApplyBackgroundColor(true);
renderer.setXTitle("Month");
renderer.setYTitle("Avg. rebuffering ratio (%)");
// Changing font size and point size
renderer.setAxisTitleTextSize(26);
renderer.setLabelsTextSize(22);
renderer.setLegendTextSize(26);
renderer.setLegendHeight(80);
renderer.setPointSize(8);
// Setting margins: above, left, below, right
renderer.setMargins(new int[] {0, 70, 100, 50});
for(int i=0;i < xlabel.length;i++){
renderer.addXTextLabel(i+1, mMonth[i]);
}
return renderer;
}
示例11: getChartRenderer
import org.achartengine.renderer.XYMultipleSeriesRenderer; //導入方法依賴的package包/類
private XYMultipleSeriesRenderer getChartRenderer() {
XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
// TODO better style
float textSize = (float) TypedValue.applyDimension(
TypedValue.COMPLEX_UNIT_SP, 12, getResources()
.getDisplayMetrics());
int marginSizeNormal = (int) TypedValue.applyDimension(
TypedValue.COMPLEX_UNIT_SP, 20, getResources()
.getDisplayMetrics());
int marginSizeLarge = (int) TypedValue.applyDimension(
TypedValue.COMPLEX_UNIT_SP, 50, getResources()
.getDisplayMetrics());
renderer.setLabelsTextSize(textSize);
renderer.setYLabelsAngle(-30.0f);
renderer.setXLabelsAngle(-30.0f);
renderer.setXLabelsColor(Color.WHITE);
renderer.setYLabelsColor(0, Color.WHITE);
renderer.setXLabelsAlign(Align.RIGHT);
renderer.setYLabelsAlign(Align.RIGHT);
renderer.setLegendTextSize(textSize);
renderer.setFitLegend(true);
renderer.setMargins(new int[] { marginSizeNormal, marginSizeLarge,
marginSizeLarge, marginSizeNormal });
renderer.setPanEnabled(true, false);
renderer.setZoomEnabled(true, false);
renderer.setZoomButtonsVisible(false);
renderer.setApplyBackgroundColor(true);
renderer.setBackgroundColor(Color.DKGRAY);
renderer.setMarginsColor(Color.BLACK);
renderer.setGridColor(Color.WHITE);
renderer.setPointSize(8);
renderer.setShowGridY(true);
renderer.setClickEnabled(false);
renderer.setXLabels(6);
return renderer;
}
示例12: buildRenderer
import org.achartengine.renderer.XYMultipleSeriesRenderer; //導入方法依賴的package包/類
/**
* Build ECG Chart renderer.
* @return ecg chart renderer
*/
private XYMultipleSeriesRenderer buildRenderer() {
XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
for (int i = 0; i < DATA_COUNT; i++) {
XYSeriesRenderer r = new XYSeriesRenderer();
r.setColor(COLORS[i]);
r.setLineWidth(4f);
r.setPointStyle(PointStyle.CIRCLE);
r.setFillPoints(true);
r.setPointStrokeWidth(1f);
renderer.addSeriesRenderer(r);
}
renderer.setPointSize(1f);
renderer.setChartTitle("心電");
renderer.setChartTitleTextSize(CHART_TITLE_SIZE);
renderer.setXTitle("経過時間 [ms]");
renderer.setYTitle(" [μv]");
renderer.setLabelsTextSize(LABELS_SIZE);
renderer.setLabelsColor(TITLE_COLOR);
renderer.setXLabelsAlign(Paint.Align.LEFT);
renderer.setYLabelsAlign(Paint.Align.RIGHT);
renderer.setXLabelsColor(XLABEL_COLOR);
renderer.setYLabelsColor(0, YLABEL_COLOR);
renderer.setAxisTitleTextSize(AXIS_TITLE_SIZE);
renderer.setAxesColor(AXIS_COLOR);
renderer.setXAxisMin(mMinX);
renderer.setXAxisMax(mMaxX);
renderer.setYAxisMin(-3.0);
renderer.setYAxisMax(3.0);
renderer.setShowGridX(true);
renderer.setShowGridY(true);
renderer.setGridColor(GRID_COLOR);
renderer.setApplyBackgroundColor(true);
renderer.setBackgroundColor(Color.BLACK);
renderer.setMargins(new int[] {16, 48, 16, 8 });
renderer.setMarginsColor(Color.argb(0, 255, 255, 255));
renderer.setPanEnabled(false, false);
renderer.setShowLegend(true);
renderer.setLegendTextSize(15);
renderer.setFitLegend(false);
renderer.setZoomButtonsVisible(false);
renderer.setZoomEnabled(false, false);
return renderer;
}
示例13: buildRenderer
import org.achartengine.renderer.XYMultipleSeriesRenderer; //導入方法依賴的package包/類
/**
* Build chart's renderer.
* @return chart renderer
*/
private XYMultipleSeriesRenderer buildRenderer() {
XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
for (int i = 0; i < DATA_COUNT; i++) {
XYSeriesRenderer r = new XYSeriesRenderer();
r.setColor(COLORS[i]);
r.setLineWidth(4f);
r.setPointStyle(PointStyle.CIRCLE);
r.setFillPoints(true);
r.setPointStrokeWidth(1f);
renderer.addSeriesRenderer(r);
}
renderer.setPointSize(1f);
renderer.setChartTitle("加速度");
renderer.setChartTitleTextSize(CHART_TITLE_SIZE);
renderer.setXTitle("経過時間 [ms]");
renderer.setYTitle(" [G]");
renderer.setLabelsTextSize(LABELS_SIZE);
renderer.setLabelsColor(TITLE_COLOR);
renderer.setXLabelsAlign(Paint.Align.LEFT);
renderer.setYLabelsAlign(Paint.Align.RIGHT);
renderer.setXLabelsColor(XLABEL_COLOR);
renderer.setYLabelsColor(0, YLABEL_COLOR);
renderer.setAxisTitleTextSize(AXIS_TITLE_SIZE);
renderer.setAxesColor(AXIS_COLOR);
renderer.setXAxisMin(mMinX);
renderer.setXAxisMax(mMaxX);
renderer.setYAxisMin(-3.0);
renderer.setYAxisMax(3.0);
renderer.setShowGridX(true);
renderer.setShowGridY(true);
renderer.setGridColor(GRID_COLOR);
renderer.setApplyBackgroundColor(true);
renderer.setBackgroundColor(Color.WHITE);
renderer.setMargins(new int[] {16, 48, 16, 8 });
renderer.setMarginsColor(Color.argb(0, 255, 255, 255));
renderer.setPanEnabled(false, false);
renderer.setShowLegend(true);
renderer.setLegendTextSize(15);
renderer.setFitLegend(false);
renderer.setZoomButtonsVisible(false);
renderer.setZoomEnabled(false, false);
return renderer;
}
開發者ID:DeviceConnect,項目名稱:DeviceConnect-Android,代碼行數:62,代碼來源:HitoeProfileDeviceOrientationFragment.java
示例14: lineChartView
import org.achartengine.renderer.XYMultipleSeriesRenderer; //導入方法依賴的package包/類
private void lineChartView() {
TypedValue outValue1 = new TypedValue();
TypedValue outValue2 = new TypedValue();
TypedValue outValue3 = new TypedValue();
TypedValue outValue4 = new TypedValue();
mContext.getResources().getValue(R.dimen.line_axis_title_text_size_value, outValue1, true);
mContext.getResources().getValue(R.dimen.line_chart_title_text_size_value, outValue2, true);
mContext.getResources().getValue(R.dimen.line_labels_text_size_value, outValue3, true);
mContext.getResources().getValue(R.dimen.line_legend_text_size_value, outValue4, true);
float lineAxisTitleTextSizeValue = outValue1.getFloat();
float lineCharTitleTextSizeValue = outValue2.getFloat();
float lineLabelsTextSizeValue = outValue3.getFloat();
float lineLegendTextSizeValue = outValue4.getFloat();
XYMultipleSeriesDataset mDataset = getDataset();
XYMultipleSeriesRenderer mRenderer = getRenderer();
mRenderer.setApplyBackgroundColor(true);
mRenderer.setBackgroundColor(Color.TRANSPARENT);
mRenderer.setMarginsColor(Color.argb(0x00, 0x01, 0x01, 0x01));
mRenderer.setAxisTitleTextSize(lineAxisTitleTextSizeValue);
mRenderer.setChartTitleTextSize(lineCharTitleTextSizeValue);
mRenderer.setLabelsTextSize(lineLabelsTextSizeValue);
mRenderer.setLegendTextSize(lineLegendTextSizeValue);
mRenderer.setMargins(new int[] { 12, 25, 12, 12 });
mRenderer.setZoomButtonsVisible(true);
mRenderer.setPointSize(10);
mRenderer.setClickEnabled(true);
mChartView = ChartFactory.getLineChartView(getActivity(), mDataset, mRenderer);
mChartView.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
SeriesSelection seriesSelection = mChartView.getCurrentSeriesAndPoint();
if (seriesSelection != null) {
UIFunctionUtils.showMessage(mContext, true, (int) seriesSelection.getValue() + " "
+ getString(R.string.beats_per_minute));
}
}
});
layout.addView(mChartView);
}
示例15: lineChartView_type1
import org.achartengine.renderer.XYMultipleSeriesRenderer; //導入方法依賴的package包/類
private void lineChartView_type1() {
if (paintChartView) {
check1.setVisibility(View.VISIBLE);
check2.setVisibility(View.VISIBLE);
txt1.setVisibility(View.GONE);
TypedValue outValue1 = new TypedValue();
TypedValue outValue2 = new TypedValue();
TypedValue outValue3 = new TypedValue();
TypedValue outValue4 = new TypedValue();
mContext.getResources().getValue(R.dimen.line_axis_title_text_size_value, outValue1, true);
mContext.getResources().getValue(R.dimen.line_chart_title_text_size_value, outValue2, true);
mContext.getResources().getValue(R.dimen.line_labels_text_size_value, outValue3, true);
mContext.getResources().getValue(R.dimen.line_legend_text_size_value, outValue4, true);
float lineAxisTitleTextSizeValue = outValue1.getFloat();
float lineCharTitleTextSizeValue = outValue2.getFloat();
float lineLabelsTextSizeValue = outValue3.getFloat();
float lineLegendTextSizeValue = outValue4.getFloat();
XYMultipleSeriesDataset mDataset = getDataset_type1();
XYMultipleSeriesRenderer mRenderer = getRenderer_type1();
mRenderer.setApplyBackgroundColor(true);
mRenderer.setBackgroundColor(Color.TRANSPARENT);
mRenderer.setMarginsColor(Color.argb(0x00, 0x01, 0x01, 0x01));
mRenderer.setAxisTitleTextSize(lineAxisTitleTextSizeValue);
mRenderer.setChartTitleTextSize(lineCharTitleTextSizeValue);
mRenderer.setLabelsTextSize(lineLabelsTextSizeValue);
mRenderer.setLegendTextSize(lineLegendTextSizeValue);
mRenderer.setMargins(new int[] { 12, 25, 12, 22 });
mRenderer.setZoomButtonsVisible(true);
mRenderer.setPointSize(10);
mRenderer.setClickEnabled(true);
mChartView = ChartFactory.getLineChartView(getActivity(), mDataset, mRenderer);
mChartView.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
SeriesSelection seriesSelection = mChartView.getCurrentSeriesAndPoint();
if (seriesSelection != null) {
String units = "";
switch (seriesSelection.getSeriesIndex()) {
case 0:
units = " "
+ (isMetric ? getString(R.string.long_unit1_detail_4)
: getString(R.string.long_unit2_detail_4));
break;
case 1:
units = " "
+ (isMetric ? getString(R.string.long_unit1_detail_2)
: getString(R.string.long_unit2_detail_2));
break;
}
UIFunctionUtils.showMessage(mContext, true, (int) seriesSelection.getValue() + units);
}
}
});
chartLayout.addView(mChartView);
} else {
setCorrectText();
}
}