當前位置: 首頁>>代碼示例>>Java>>正文


Java XYMultipleSeriesRenderer.setYAxisMax方法代碼示例

本文整理匯總了Java中org.achartengine.renderer.XYMultipleSeriesRenderer.setYAxisMax方法的典型用法代碼示例。如果您正苦於以下問題:Java XYMultipleSeriesRenderer.setYAxisMax方法的具體用法?Java XYMultipleSeriesRenderer.setYAxisMax怎麽用?Java XYMultipleSeriesRenderer.setYAxisMax使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.achartengine.renderer.XYMultipleSeriesRenderer的用法示例。


在下文中一共展示了XYMultipleSeriesRenderer.setYAxisMax方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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);
}
 
開發者ID:InnoFang,項目名稱:FamilyBond,代碼行數:23,代碼來源:HeartBeatFragment.java

示例2: setUpRenderer

import org.achartengine.renderer.XYMultipleSeriesRenderer; //導入方法依賴的package包/類
/**
 * Set up a {@link XYMultipleSeriesRenderer} with the specs customized per plot tab.
 */
private void setUpRenderer(XYMultipleSeriesRenderer renderer, int tabNumber) {
  renderer.setXAxisMin(0);
  renderer.setXAxisMax(60);
  renderer.setYAxisMin(RENDER_HEIGHTS[tabNumber][0]);
  renderer.setYAxisMax(RENDER_HEIGHTS[tabNumber][1]);
  renderer.setYAxisAlign(Align.RIGHT, 0);
  renderer.setLegendTextSize(30);
  renderer.setLabelsTextSize(30);
  renderer.setYLabelsColor(0, Color.BLACK);
  renderer.setXLabelsColor(Color.BLACK);
  renderer.setFitLegend(true);
  renderer.setShowGridX(true);
  renderer.setMargins(new int[] {10, 10, 30, 10});
  // setting the plot untouchable
  renderer.setZoomEnabled(false, false);
  renderer.setPanEnabled(false, true);
  renderer.setClickEnabled(false);
  renderer.setMarginsColor(Color.WHITE);
  renderer.setChartTitle(mContext.getResources()
      .getStringArray(R.array.plot_titles)[tabNumber]);
  renderer.setChartTitleTextSize(50);
}
 
開發者ID:google,項目名稱:gps-measurement-tools,代碼行數:26,代碼來源:PlotFragment.java

示例3: 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);
    }
  }
}
 
開發者ID:sdrausty,項目名稱:buildAPKsApps,代碼行數:46,代碼來源:CombinedXYChart.java

示例4: 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;
}
 
開發者ID:gigabytedevelopers,項目名稱:CalcMate,代碼行數:36,代碼來源:Graph.java

示例5: setChartSettings

import org.achartengine.renderer.XYMultipleSeriesRenderer; //導入方法依賴的package包/類
/**
 * Sets a few of the series renderer settings.
 *
 * @param renderer the renderer to set the properties to
 * @param xMin the minimum value on the X axis
 * @param xMax the maximum value on the X axis
 * @param yMin the minimum value on the Y axis
 * @param yMax the maximum value on the Y axis
 * @param axesColor the axes color
 */
protected void setChartSettings(XYMultipleSeriesRenderer renderer,
                                double xMin, double xMax, double yMin,
                                double yMax, int axesColor) {
   renderer.setXAxisMin(xMin);
   renderer.setXAxisMax(xMax);
   renderer.setYAxisMin(yMin);
   renderer.setYAxisMax(yMax);
   renderer.setAxesColor(axesColor);
   renderer.setShowLabels(false);
   renderer.setShowLegend(false);
   renderer.setMarginsColor(Color.WHITE);
}
 
開發者ID:batoulapps,項目名稱:qamardeen-android,代碼行數:23,代碼來源:GraphWidget.java

示例6: setChartSettings

import org.achartengine.renderer.XYMultipleSeriesRenderer; //導入方法依賴的package包/類
private void setChartSettings(XYMultipleSeriesRenderer renderer) {
  renderer.setChartTitle("Chart demo");
  renderer.setXTitle("x values");
  renderer.setYTitle("y values");
  renderer.setXAxisMin(0.5);
  renderer.setXAxisMax(10.5);
  renderer.setYAxisMin(0);
  renderer.setYAxisMax(210);
}
 
開發者ID:ddanny,項目名稱:achartengine,代碼行數:10,代碼來源:GeneratedChartDemo.java

示例7: 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;
}
 
開發者ID:DeviceConnect,項目名稱:DeviceConnect-Android,代碼行數:60,代碼來源:HitoeProfileECGFragment.java

示例8: 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

示例9: getRenderer

import org.achartengine.renderer.XYMultipleSeriesRenderer; //導入方法依賴的package包/類
/**
	 * Create graph renderer
	 *
	 * @return renderer object
	 */
	public XYMultipleSeriesRenderer getRenderer() {
		XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();

		// set minimum for y axis to 0
		renderer.setYAxisMin(-20);
		renderer.setYAxisMax(+100);

		// scrolling enabled
//		renderer.setPanEnabled(true, false);
		renderer.setPanEnabled(true, true);
		// limits for scrolling (minx, maxx, miny, maxy)
		// zoom buttons (in, out, 1:1)
		renderer.setZoomButtonsVisible(true);
		// enable zoom
//		renderer.setZoomEnabled(true, false);
		renderer.setZoomEnabled(true, true);

		// set labels text size
		renderer.setLabelsTextSize(30f);

		renderer.setYLabelsAlign(Paint.Align.RIGHT);
		renderer.setAxisTitleTextSize(30f);
		renderer.setYTitle("Temperature [°C]");

		// hide legend
//		renderer.setShowLegend(false);
		renderer.setShowLegend(true);
		renderer.setLegendTextSize(30f);
		renderer.setLegendHeight(130);

		// set margins
//		renderer.setMargins(new int[] {20, 30, 15, 0});
		renderer.setMargins(new int[] {30, 70, 50, 0});

//		renderer.setApplyBackgroundColor(true);
//		renderer.setBackgroundColor(Color.WHITE);
//		renderer.setMarginsColor(Color.WHITE);

		renderer.setMarginsColor(Color.argb(0x00, 0x01, 0x01, 0x01));
		// todo: need to get background colour of activity, transparent is not good enough
//		renderer.setMarginsColor(((ColorDrawable) _layGraph.getBackground()).getColor());

		renderer.setXAxisMin(new Date().getTime() - 30 * 60 * 1000);

		renderer.setZoomButtonsVisible(false);
		renderer.setExternalZoomEnabled(true);

//		XYSeriesRenderer r = new XYSeriesRenderer();

		// set color
//		r.setColor(Color.GREEN);

		// set fill below line
//		r.setFillBelowLine(true);

//		renderer.addSeriesRenderer(r);
		return renderer;
	}
 
開發者ID:crownstone,項目名稱:fridge-file-app,代碼行數:64,代碼來源:StatisticsActivity.java

示例10: setChartSettings

import org.achartengine.renderer.XYMultipleSeriesRenderer; //導入方法依賴的package包/類
/**
 * Sets a few of the series renderer settings.
 * 
 * @param renderer the renderer to set the properties to
 * @param title the chart title
 * @param xTitle the title for the X axis
 * @param yTitle the title for the Y axis
 * @param xMin the minimum value on the X axis
 * @param xMax the maximum value on the X axis
 * @param yMin the minimum value on the Y axis
 * @param yMax the maximum value on the Y axis
 * @param axesColor the axes color
 * @param labelsColor the labels color
 */
protected void setChartSettings(XYMultipleSeriesRenderer renderer, String title, String xTitle,
    String yTitle, double xMin, double xMax, double yMin, double yMax, int axesColor,
    int labelsColor) {
  renderer.setChartTitle(title);
  renderer.setXTitle(xTitle);
  renderer.setYTitle(yTitle);
  renderer.setXAxisMin(xMin);
  renderer.setXAxisMax(xMax);
  renderer.setYAxisMin(yMin);
  renderer.setYAxisMax(yMax);
  renderer.setAxesColor(axesColor);
  renderer.setLabelsColor(labelsColor);
}
 
開發者ID:ddanny,項目名稱:achartengine,代碼行數:28,代碼來源:AbstractDemoChart.java

示例11: setChartSettings

import org.achartengine.renderer.XYMultipleSeriesRenderer; //導入方法依賴的package包/類
/**
 * Sets a few of the series renderer settings.
 * 
 * @param renderer
 *            the renderer to set the properties to
 * @param title
 *            the chart title
 * @param xTitle
 *            the title for the X axis
 * @param yTitle
 *            the title for the Y axis
 * @param xMin
 *            the minimum value on the X axis
 * @param xMax
 *            the maximum value on the X axis
 * @param yMin
 *            the minimum value on the Y axis
 * @param yMax
 *            the maximum value on the Y axis
 * @param axesColor
 *            the axes color
 * @param labelsColor
 *            the labels color
 */
protected void setChartSettings(XYMultipleSeriesRenderer renderer,
		String title, String xTitle, String yTitle, double xMin,
		double xMax, double yMin, double yMax, int axesColor,
		int labelsColor) {
	renderer.setChartTitle(title);
	renderer.setXTitle(xTitle);
	renderer.setYTitle(yTitle);
	renderer.setXAxisMin(xMin);
	renderer.setXAxisMax(xMax);
	renderer.setYAxisMin(yMin);
	renderer.setYAxisMax(yMax);
	renderer.setAxesColor(axesColor);
	renderer.setLabelsColor(labelsColor);
}
 
開發者ID:jhmgbl,項目名稱:learnforandroidfragAS,代碼行數:39,代碼來源:AbstractDemoChart.java


注:本文中的org.achartengine.renderer.XYMultipleSeriesRenderer.setYAxisMax方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。