AndroidPlot: elimina los valores de dominio de GraphWidget

Tengo una configuración de la trama como esta:

aHistoryPlot = (XYPlot) findViewById(R.id.plot); aHistoryPlot.setRangeBoundaries(0, 255, BoundaryMode.FIXED); aHistoryPlot.setDomainBoundaries(0, HISTORY_SIZE, BoundaryMode.FIXED); aHistoryPlot.addSeries(YHistorySeries, new LineAndPointFormatter(Color.rgb(100, 200, 100), Color.TRANSPARENT, null)); aHistoryPlot.getGraphWidget().setMarginTop(10); aHistoryPlot.setDomainStepValue(5); aHistoryPlot.setTicksPerRangeLabel(3); aHistoryPlot.setDomainLabel(getResources().getString(R.string.string_time)); aHistoryPlot.getDomainLabelWidget().pack(); aHistoryPlot.setRangeLabel(getResources().getString(R.string.string_value)); aHistoryPlot.getRangeLabelWidget().pack(); aHistoryPlot.disableAllMarkup(); 

¿Cómo puedo eliminar los valores de dominio de la trama?

¡Gracias por adelantado!

Puedes entrar:

 aHistoryPlot.getGraphWidget().getDomainLabelPaint.setColor(Color.TRANSPARENT); 

Ajuste de la pintura a null Creo que es un poco mejor que también obtener el espacio de nuevo que los lables ocupan. Aquí está el código que tengo en mi código de prueba de velocidad para conmutar todos estos bits y desactivarlo.

  if (!mBackgroundOn) { // remove the background stuff. mDynamicPlot.setBackgroundPaint(null); mDynamicPlot.getGraphWidget().setBackgroundPaint(null); mDynamicPlot.getGraphWidget().setGridBackgroundPaint(null); } if (!mKeyOn) mDynamicPlot.getLayoutManager() .remove(mDynamicPlot.getLegendWidget()); if (!mDomainLabelOn) mDynamicPlot.getLayoutManager().remove( mDynamicPlot.getDomainLabelWidget()); if (!mDomainAxisOn) { mDynamicPlot.getGraphWidget().setDomainLabelPaint(null); mDynamicPlot.getGraphWidget().setDomainOriginLabelPaint(null); } if (!mBoarderOn){ //mDynamicPlot.setDrawBorderEnabled(false); mDynamicPlot.setBorderPaint(null); }if (!mRangeLabelOn) mDynamicPlot.getLayoutManager().remove( mDynamicPlot.getRangeLabelWidget()); if (!mRangeAxisOn) { mDynamicPlot.getGraphWidget().setRangeLabelPaint(null); mDynamicPlot.getGraphWidget().setRangeOriginLabelPaint(null); //mDynamicPlot.getGraphWidget().setRangeLabelVerticalOffset(rangeLabelVerticalOffset); } if (!mGridOn) { //mDynamicPlot.getGraphWidget().setGridLinePaint(null); mDynamicPlot.getGraphWidget().setDomainOriginLinePaint(null); mDynamicPlot.getGraphWidget().setRangeOriginLinePaint(null); } if (!mTitleOn) { mDynamicPlot.getLayoutManager().remove(mDynamicPlot.getTitleWidget()); } 

Establecer esto, le permitirá deshacerse de todas las cosas de rejilla / frontera, y le permiten tener un estilo de gráfico transparente.

 aprHistoryPlot.setPlotMargins(0, 0, 0, 0); aprHistoryPlot.setPlotPadding(0, 0, 0, 0); aprHistoryPlot.setDomainLabelWidget(null); aprHistoryPlot.setRangeLabelWidget(null); aprHistoryPlot.setBackgroundPaint(null); aprHistoryPlot.getGraphWidget().setBackgroundPaint(null); aprHistoryPlot.getGraphWidget().setGridBackgroundPaint(null); aprHistoryPlot.setBorderPaint(null); //aprHistoryPlot.setDomainLabel( null ); // crash //aprHistoryPlot.setRangeLabel( null ); aprHistoryPlot.getGraphWidget().setDomainLabelWidth(0.0f); aprHistoryPlot.getGraphWidget().setRangeLabelWidth(0.0f); aprHistoryPlot.getGraphWidget().setDomainLabelPaint(null); aprHistoryPlot.getGraphWidget().setDomainOriginLabelPaint(null); aprHistoryPlot.getGraphWidget().setRangeLabelPaint(null); aprHistoryPlot.getGraphWidget().setRangeOriginLabelPaint(null); aprHistoryPlot.getGraphWidget().setDomainOriginLinePaint(null); aprHistoryPlot.getGraphWidget().setRangeOriginLinePaint(null); aprHistoryPlot.getLayoutManager().remove(aprHistoryPlot.getTitleWidget()); aprHistoryPlot.getGraphWidget().getDomainGridLinePaint().setColor(Color.TRANSPARENT); aprHistoryPlot.getGraphWidget().getRangeGridLinePaint().setColor(Color.TRANSPARENT); aprHistoryPlot.getGraphWidget().getRangeSubGridLinePaint().setColor(Color.TRANSPARENT); aprHistoryPlot.getLayoutManager().remove(aprHistoryPlot.getLegendWidget()); aprHistoryPlot.getLayoutManager().remove(aprHistoryPlot.getDomainLabelWidget()); aprHistoryPlot.getLayoutManager().remove(aprHistoryPlot.getRangeLabelWidget()); 
  • InflateException en la llamada al método inflater.inflate ()
  • Android Studio activity_main.xml editor de diseño no me deja arrastrar y soltar nada ...?
  • Singleton con contexto en Android
  • Eclipse android sdk bundle no puede abrir Android SDK Manager
  • Cómo importar el escenario de Metaio en Android Studio?
  • Android: archivo de acceso desde la pantalla de activos \ PDF
  • Error al actualizar las entidades APIGEE
  • ¿Cómo lanzar draw9patch y es absolutamente necesario reescalar imágenes?
  • RecognizerIntent.ACTION_RECOGNIZE_SPEECH bloqueado cuando se produce un toque
  • El complemento com.android.ide.eclipse.adt no ha podido cargar la clase android
  • Android: No se pudo encontrar el método
  • FlipAndroid es un fan de Google para Android, Todo sobre Android Phones, Android Wear, Android Dev y Aplicaciones para Android Aplicaciones.