|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectandroid.view.View
cn.limc.androidcharts.view.BaseChart
cn.limc.androidcharts.view.GridChart
cn.limc.androidcharts.view.CandleStickChart
public class CandleStickChart
CandleStickChart is a kind of graph that draw the OHLCs on a GridChart if you want display some moving average lines on this graph, please use see MACandleStickChart for more information
CandleStickChartはGridChartの表面でロウソクを書いたラインチャードです。移動平均線など 分析線がお使いしたい場合、MACandleStickChartにご参照ください。
CandleStickChart是在GridChart上绘制K线(蜡烛线)的图表、如果需要支持显示均线,请参照 MACandleStickChart。
CandleStickChart
,
MACandleStickChart
Nested Class Summary |
---|
Nested classes/interfaces inherited from class android.view.View |
---|
android.view.View.BaseSavedState, android.view.View.MeasureSpec, android.view.View.OnClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnFocusChangeListener, android.view.View.OnKeyListener, android.view.View.OnLongClickListener, android.view.View.OnTouchListener |
Field Summary | |
---|---|
static int |
DEFAULT_CROSS_STAR_COLOR
Default price no change stick's color (cross-star,T-like etc.) |
static int |
DEFAULT_NEGATIVE_STICK_BORDER_COLOR
Default price down stick's border color |
static int |
DEFAULT_NEGATIVE_STICK_FILL_COLOR
Default price down stick's fill color |
static int |
DEFAULT_POSITIVE_STICK_BORDER_COLOR
Default price up stick's border color |
static int |
DEFAULT_POSITIVE_STICK_FILL_COLOR
Default price up stick's fill color |
Fields inherited from class android.view.View |
---|
DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, GONE, HAPTIC_FEEDBACK_ENABLED, INVISIBLE, KEEP_SCREEN_ON, NO_ID, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SOUND_EFFECTS_ENABLED, VISIBLE |
Constructor Summary | |
---|---|
CandleStickChart(android.content.Context context)
|
|
CandleStickChart(android.content.Context context,
android.util.AttributeSet attrs)
|
|
CandleStickChart(android.content.Context context,
android.util.AttributeSet attrs,
int defStyle)
|
Method Summary | |
---|---|
void |
addData(OHLCEntity entity)
add a new stick data to sticks |
java.lang.String |
getAxisXGraduate(java.lang.Object value)
calculate degree title on X axis |
java.lang.String |
getAxisYGraduate(java.lang.Object value)
calculate degree title on Y axis |
int |
getCrossStarColor()
|
int |
getMaxSticksNum()
|
float |
getMaxValue()
|
float |
getMinValue()
|
int |
getNegativeStickBorderColor()
|
int |
getNegativeStickFillColor()
|
java.util.List<OHLCEntity> |
getOHLCData()
|
int |
getPositiveStickBorderColor()
|
int |
getPositiveStickFillColor()
|
int |
getSelectedIndex()
get current selected data index |
boolean |
onTouchEvent(android.view.MotionEvent event)
|
void |
pushData(OHLCEntity entity)
add a new stick data to sticks and refresh this chart |
void |
setCrossStarColor(int crossStarColor)
|
void |
setMaxSticksNum(int maxSticksNum)
|
void |
setMaxValue(float maxValue)
|
void |
setMinValue(float minValue)
|
void |
setNegativeStickBorderColor(int negativeStickBorderColor)
|
void |
setNegativeStickFillColor(int negativeStickFillColor)
|
void |
setOHLCData(java.util.List<OHLCEntity> oHLCData)
|
void |
setPositiveStickBorderColor(int positiveStickBorderColor)
|
void |
setPositiveStickFillColor(int positiveStickFillColor)
|
Methods inherited from class android.view.View |
---|
addFocusables, addFocusables, addTouchables, bringToFront, buildDrawingCache, buildDrawingCache, cancelLongPress, checkInputConnectionProxy, clearAnimation, clearFocus, computeScroll, createContextMenu, destroyDrawingCache, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowVisibilityChanged, draw, findFocus, findViewById, findViewWithTag, focusSearch, forceLayout, getAnimation, getApplicationWindowToken, getBackground, getBaseline, getBottom, getContentDescription, getContext, getDefaultSize, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getId, getKeepScreenOn, getKeyDispatcherState, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMeasuredHeight, getMeasuredWidth, getNextFocusDownId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getParent, getResources, getRight, getRootView, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getTag, getTag, getTop, getTouchables, getTouchDelegate, getVerticalFadingEdgeLength, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, hasFocus, hasFocusable, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, isClickable, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isInEditMode, isInTouchMode, isLayoutRequested, isLongClickable, isOpaque, isPressed, isSaveEnabled, isScrollbarFadingEnabled, isSelected, isShown, isSoundEffectsEnabled, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, layout, measure, offsetLeftAndRight, offsetTopAndBottom, onCheckIsTextEditor, onCreateInputConnection, onFinishTemporaryDetach, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onStartTemporaryDetach, onTrackballEvent, onWindowFocusChanged, performClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, refreshDrawableState, removeCallbacks, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAnimation, setBackgroundDrawable, setBackgroundResource, setClickable, setContentDescription, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setEnabled, setFadingEdgeLength, setFocusable, setFocusableInTouchMode, setHapticFeedbackEnabled, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setId, setKeepScreenOn, setLayoutParams, setLongClickable, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnClickListener, setOnCreateContextMenuListener, setOnFocusChangeListener, setOnKeyListener, setOnLongClickListener, setOnTouchListener, setPadding, setPressed, setSaveEnabled, setScrollbarFadingEnabled, setScrollBarStyle, setScrollContainer, setSelected, setSoundEffectsEnabled, setTag, setTag, setTouchDelegate, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVisibility, setWillNotCacheDrawing, setWillNotDraw, showContextMenu, startAnimation, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_POSITIVE_STICK_BORDER_COLOR
Default price up stick's border color
値上がりローソクのボーダー色のデフォルト値
默认阳线的边框颜色
public static final int DEFAULT_POSITIVE_STICK_FILL_COLOR
Default price up stick's fill color
値上がりローソクの色のデフォルト値
默认阳线的填充颜色
public static final int DEFAULT_NEGATIVE_STICK_BORDER_COLOR
Default price down stick's border color
値下りローソクのボーダー色のデフォルト値
默认阴线的边框颜色
public static final int DEFAULT_NEGATIVE_STICK_FILL_COLOR
Default price down stick's fill color
値下りローソクの色のデフォルト値
默认阴线的填充颜色
public static final int DEFAULT_CROSS_STAR_COLOR
Default price no change stick's color (cross-star,T-like etc.)
クローススターの色のデフォルト値
默认十字线显示颜色
Constructor Detail |
---|
public CandleStickChart(android.content.Context context)
public CandleStickChart(android.content.Context context, android.util.AttributeSet attrs, int defStyle)
public CandleStickChart(android.content.Context context, android.util.AttributeSet attrs)
Method Detail |
---|
public java.lang.String getAxisXGraduate(java.lang.Object value)
GridChart
calculate degree title on X axis
X軸の目盛を計算する
计算X轴上显示的坐标值
getAxisXGraduate
in class GridChart
value
- value for calculate
計算有用データ
计算用数据
degree
目盛
坐标值
public int getSelectedIndex()
get current selected data index
選択したスティックのインデックス
获取当前选中的柱条的index
index
インデックス
index
public java.lang.String getAxisYGraduate(java.lang.Object value)
GridChart
calculate degree title on Y axis
Y軸の目盛を計算する
计算Y轴上显示的坐标值
getAxisYGraduate
in class GridChart
value
- value for calculate
計算有用データ
计算用数据
degree
目盛
坐标值
public void pushData(OHLCEntity entity)
add a new stick data to sticks and refresh this chart
新しいスティックデータを追加する,フラフをレフレシューする
追加一条新数据并刷新当前图表
entity
- data
データ
新数据
public void addData(OHLCEntity entity)
add a new stick data to sticks
新しいスティックデータを追加する
追加一条新数据
entity
- data
データ
新数据
public boolean onTouchEvent(android.view.MotionEvent event)
onTouchEvent
in class GridChart
public int getPositiveStickBorderColor()
public void setPositiveStickBorderColor(int positiveStickBorderColor)
positiveStickBorderColor
- the positiveStickBorderColor to setpublic int getPositiveStickFillColor()
public void setPositiveStickFillColor(int positiveStickFillColor)
positiveStickFillColor
- the positiveStickFillColor to setpublic int getNegativeStickBorderColor()
public void setNegativeStickBorderColor(int negativeStickBorderColor)
negativeStickBorderColor
- the negativeStickBorderColor to setpublic int getNegativeStickFillColor()
public void setNegativeStickFillColor(int negativeStickFillColor)
negativeStickFillColor
- the negativeStickFillColor to setpublic int getCrossStarColor()
public void setCrossStarColor(int crossStarColor)
crossStarColor
- the crossStarColor to setpublic java.util.List<OHLCEntity> getOHLCData()
public void setOHLCData(java.util.List<OHLCEntity> oHLCData)
oHLCData
- the oHLCData to setpublic int getMaxSticksNum()
public void setMaxSticksNum(int maxSticksNum)
maxSticksNum
- the maxSticksNum to setpublic float getMaxValue()
public void setMaxValue(float maxValue)
maxValue
- the maxValue to setpublic float getMinValue()
public void setMinValue(float minValue)
minValue
- the minValue to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |