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


Java XYSeriesRenderer.setShowLegendItem方法代碼示例

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


在下文中一共展示了XYSeriesRenderer.setShowLegendItem方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: addAlertSeries

import org.achartengine.renderer.XYSeriesRenderer; //導入方法依賴的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);

	}
 
開發者ID:crownstone,項目名稱:fridge-file-app,代碼行數:22,代碼來源:StatisticsActivity.java

示例2: addRenderer

import org.achartengine.renderer.XYSeriesRenderer; //導入方法依賴的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);
}
 
開發者ID:blackcj,項目名稱:GoogleFitExample,代碼行數:18,代碼來源:MultipleLineGraphs.java

示例3: initChart

import org.achartengine.renderer.XYSeriesRenderer; //導入方法依賴的package包/類
private void initChart() {

        mCurrentSeries = new XYSeries("Sample Data");
        mRenderer.setApplyBackgroundColor(true);
        mRenderer.setBackgroundColor(Color.parseColor("#555555"));
        mDataset.addSeries(mCurrentSeries);
        mRenderer.setShowAxes(false); //change back
        mRenderer.clearXTextLabels();
        //mRenderer.clearYTextLabels();
        mRenderer.setLabelsTextSize(16f);
        mRenderer.setYLabels(5);
        mRenderer.setShowAxes(false);
        mRenderer.setXLabels(0);
        mCurrentRenderer = new XYSeriesRenderer();
        mCurrentRenderer.setLineWidth(6);
        mCurrentRenderer.setShowLegendItem(false);
        mCurrentRenderer.setFillPoints(true);
        mCurrentRenderer.setColor(Color.parseColor("#FFFFFF"));
        mCurrentSeries.setTitle("");
        mRenderer.addSeriesRenderer(mCurrentRenderer);
        mRenderer.setMargins(new int[]{0, 12, 0, 0});
        mRenderer.setShowLegend(false);
        mRenderer.setMarginsColor(Color.parseColor("#555555"));
        mRenderer.setPanEnabled(false, false);
        mRenderer.setZoomEnabled(false, false);

    }
 
開發者ID:etdev,項目名稱:Altcoin,代碼行數:28,代碼來源:IndivFragmentChart.java

示例4: setUpRenderer

import org.achartengine.renderer.XYSeriesRenderer; //導入方法依賴的package包/類
private void setUpRenderer(Activity activity) {
    // Now we create the renderer
    XYSeriesRenderer mCurrentRenderer = new XYSeriesRenderer();
    mCurrentRenderer.setLineWidth(getDPI(2));
    mCurrentRenderer.setColor(activity.getResources().getColor(R.color.colorBarGraph));
    // Include low and max value
    mCurrentRenderer.setDisplayBoundingPoints(true);
    // we add point markers
    mCurrentRenderer.setPointStyle(PointStyle.CIRCLE);
    mCurrentRenderer.setPointStrokeWidth(getDPI(5));
    mCurrentRenderer.setShowLegendItem(false);

    // Creating XYSeriesRenderer to customize expenseSeries
    XYSeriesRenderer expenseRenderer = new XYSeriesRenderer();
    expenseRenderer.setColor(activity.getResources().getColor(R.color.colorBarGraph2));
    expenseRenderer.setPointStyle(PointStyle.POINT);
    expenseRenderer.setFillPoints(true);
    expenseRenderer.setLineWidth(getDPI(3));
    expenseRenderer.setShowLegendItem(false);

    mRenderer = new XYMultipleSeriesRenderer();
    mRenderer.addSeriesRenderer(mCurrentRenderer);
    mRenderer.addSeriesRenderer(expenseRenderer);
    // We want to avoid black border
    mRenderer.setMarginsColor(Color.argb(0x00, 0xff, 0x00, 0x00)); // transparent margins
    // Disable Pan on two axis
    mRenderer.setPanEnabled(true, false);
    mRenderer.setZoomEnabled(true, false);
    mRenderer.setLabelsTextSize(getDPI(15));
    mRenderer.setXLabelsColor(activity.getResources().getColor(R.color.colorWhite));
    mRenderer.setYLabelsColor(0, activity.getResources().getColor(R.color.colorWhite));
    mRenderer.setLabelsColor(activity.getResources().getColor(R.color.colorWhite));
    mRenderer.setAxesColor(activity.getResources().getColor(R.color.colorWhite));
    mRenderer.setBarSpacing(0.2);

    mRenderer.setShowGrid(true); // we show the grid
    mRenderer.setXLabels(0);

    // enable the chart click events
    mRenderer.setClickEnabled(true);
    mRenderer.setSelectableBuffer(10);
}
 
開發者ID:blackcj,項目名稱:GoogleFitExample,代碼行數:43,代碼來源:SingleBarGraphWithGoal.java


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