Android 統計圖表引擎AChartEngine(五) - Dataset和Render參數介紹

下面只講解一個Renderer和一個DataSet,更多內容參看官方文檔

DefaultRenderer:

 void

 addSeriesRenderer(int index, SimpleSeriesRenderer renderer) 
增加一個renderermultiple  renderer中,index是指定的位置.

 void

 addSeriesRenderer(SimpleSeriesRenderer renderer)

增加一個renderermultiple  renderer

 int

 getAxesColor() 
得到X軸的顏色.

 int

 getBackgroundColor() 
得到背景色

 java.lang.String

 getChartTitle() 
得到圖表的標題

 float

 getChartTitleTextSize() 
得到圖表標題的字號

 int

 getLabelsColor() 
得到Y軸的顏色.

 float 

 getLabelsTextSize() 
得到Y軸的字號.

 int

 getLegendHeight() 
得到圖例的高度.

 float 

 getLegendTextSize() 
得到圖例的字號.

 int[]

 getMargins() 
得到圖表外邊框的大小.

 float

 getOriginalScale() 
  Returns the original value to be used for scaling the chart.

 float

 getScale() 
   Returns the value to be used for scaling the chart.

 int

 getSelectableBuffer() 
得到點的緩衝半徑值(在某點附件點擊時,多大範圍內都算點擊這個點)          

Returns the selectable radius value around clickable points.

SimpleSeriesRenderer

 getSeriesRendererAt(int index) 
在multiple  renderer中得到指定位置的 renderer.

 int

 getSeriesRendererCount() 得到multiple  renderer集合中renderer的個數.

 SimpleSeriesRenderer[]

 getSeriesRenderers() 
得到 multiple  renderer 中的renderer數組.

 float

 getStartAngle() 
得到圓形圖(例如:餅圖/圓環圖等)的開始角度.

 java.lang.String

 getTextTypefaceName() 

得到字體名.

 int

 getTextTypefaceStyle() 

得到字體類型.

 float

 getZoomRate() 

得到放大縮小的倍率.

 boolean

 isAntialiasing() 
Returns the antialiasing flag value.

 boolean

 isApplyBackgroundColor() 

得到是否應用背景色的設置結果(true/false).

 boolean

 isClickEnabled() 

得到是否啓用點擊事件.

 boolean

 isExternalZoomEnabled() 
Returns the enabled state of the external (application implemented) zoom.

 boolean 

 isFitLegend() 

得到是否設置圖例大小自適應.

 boolean

 isInScroll() 
 Returns if the chart is inside a scroll view and doesn't need to shrink.

 boolean

 isPanEnabled() 
得到是否允許拖動         

 Returns the enabled state of the pan.

 boolean

 isShowAxes() 

得到是否顯示X軸.

 boolean

 isShowCustomTextGrid() 

得到是否顯示X軸和Y軸網格.

 boolean

 isShowGridX() 

得到是否顯示X軸網格.

 boolean 

 isShowGridY() 

得到是否顯示Y軸網格.

 boolean

 isShowLabels() 

得到是否顯示刻度.

 boolean

 isShowLegend() 

得到是否顯示圖例.

 boolean

 isZoomButtonsVisible() 

得到是否顯示放到縮小按鈕.

 boolean

 isZoomEnabled() 

是否支持放大縮小.

 void

 removeSeriesRenderer(SimpleSeriesRenderer renderer) 
在multiple  renderer中移除一個renderer.

 void

 setAntialiasing(boolean antialiasing) 
 Sets the antialiasing value.

 void

 setApplyBackgroundColor(boolean apply) 

設置是否應用背景色.

 void

 setAxesColor(int color) 

設置X軸的顏色.

 void

 setBackgroundColor(int color) 

設置背景色.

 void

 setChartTitle(java.lang.String title)

設置圖表的標題.

 void

 setChartTitleTextSize(float textSize) 

設置圖表標題字號.

 void

 setClickEnabled(boolean enabled) 

設置是否允許單擊事件.

 void

 setExternalZoomEnabled(boolean enabled) 
   Sets the enabled state of the external (application implemented) zoom.

 void

 setFitLegend(boolean fit) 

設置圖例字號自適應.

 void

 setInScroll(boolean inScroll) 
   To be set if the chart is inside a scroll view and doesn't need to shrink when not enough space.

 void

 setLabelsColor(int color) 

設置座標顏色.

 void

 setLabelsTextSize(float textSize) 
設置座標字號.

 void

 setLegendHeight(int height) 
設置圖例高度(單位: pixels).

 void

 setLegendTextSize(float textSize) 

設置圖例字號.

 void

 setMargins(int[] margins) 

設置外邊框(單位:pixels)上/左/下/右.

 void

 setPanEnabled(boolean enabled) 
設置是否允許拖動   Sets the enabled state of the pan.

 void

 setScale(float scale) 
   Sets the value to be used for scaling the chart.

 void

 setSelectableBuffer(int buffer) 
設置點的緩衝半徑值(在某點附件點擊時,多大範圍內都算點擊這個點)           Sets the selectable radius value around clickable points.

 void

 setShowAxes(boolean showAxes) 

設置是否顯示X軸.

 void

 setShowCustomTextGrid(boolean showGrid) 
設置X軸和Y軸網格是否顯示.

 void

 setShowGrid(boolean showGrid) 

設置是否顯示網格.

 void

 setShowGridX(boolean showGrid) 

設置是否顯示X軸網格.

 void

 setShowGridY(boolean showGrid) 

設置是否顯示Y軸網格.

 void

 setShowLabels(boolean showLabels) 

設置是否顯示座標.

 void

 setShowLegend(boolean showLegend) 

設置是否顯示圖例.

 void

 setStartAngle(float startAngle) 
設置圓形圖(例如:餅圖/圓環圖等)的開始角度.

 void

 setTextTypeface(java.lang.String typefaceName, int style) 

設置字體名和類型.

 void

 setZoomButtonsVisible(boolean visible) 

設置是否顯示放大縮小按鈕.

 void

 setZoomEnabled(boolean enabled) 

設置是否允許放大和縮小.

 void

 setZoomRate(float rate) 
設置放大縮小的倍率.

 

XYMultipleSeriesDataset:

 void

 addSeries(int index, XYSeries series) 
            在指定位置增加一個序列.

 void

 addSeries(XYSeries series) 
           增加一個序列.

XYSeries[]

 getSeries() 
            得到序列的數組

XYSeries

 getSeriesAt(int index) 
          得到指定位置的序列.

 int

 getSeriesCount() 
            得到序列的個數.

 void

 removeSeries(int index) 
          移除指定位置的序列.

 void

 removeSeries(XYSeries series) 
          移除一個序列


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章