public interface ChartHandler
Modifier and Type | Interface and Description |
---|---|
static class |
ChartHandler.Builder
Builder class for chart setup
|
static class |
ChartHandler.LogLevel |
Modifier and Type | Method and Description |
---|---|
Indicator |
addComparer(markit.android.Comparison comparison) |
Indicator |
addComparer(java.lang.String symbol,
java.lang.String issueID,
int... lineColor)
Added a comparer to the chart
|
java.util.ArrayList<Indicator> |
addComparisons(java.util.ArrayList<markit.android.Comparison> comparisons) |
void |
adjustChartSizes(int percent,
boolean keepCurrentGapperSize)
Sets both upper and lower chart sizes.
|
void |
drawCharts(JSONObject json)
Draw a chart base on the the json
|
void |
drawCharts(java.lang.String json)
Draw a chart base on the the json
|
void |
drawOnChart(int drawingMode)
Enables draw mode on chart
|
void |
drawTextAnnotation(java.lang.String annotationText,
float textSize,
java.lang.String textColorSpec,
int backgroundResource,
float maxWidthDp)
Draw a text annotation
|
void |
endAnnotationMode()
End text annotation mode
|
java.util.ArrayList<Indicator<LowerIndicator>> |
getActiveLowerIndicators()
Returns the list of Indicators used for Lower Chart
|
java.util.ArrayList<LowerIndicator> |
getActiveLowerIndicatorsEnum()
Returns the list of LowerIndicators used for Lower Chart
|
java.util.ArrayList<Indicator<UpperIndicator>> |
getActiveUpperIndicators()
Returns the list of Indicators used for Upper Chart
|
java.util.ArrayList<UpperIndicator> |
getActiveUpperIndicatorsEnum()
Returns the list of UpperIndicators used for Upper Chart
|
ChartDataRequest |
getChartDataRequest()
Returns the current ChartDataRequest
|
java.util.ArrayList<java.lang.String> |
getCustomEventIDs() |
java.util.ArrayList<java.lang.String> |
getDrawnIDs() |
View |
getGapper()
Gets the Gapper view
|
Indicator |
getIndicatorById(java.lang.String id) |
Indicator |
getLightweightIndicatorById(java.lang.String id) |
java.util.ArrayList<Indicator<LowerIndicator>> |
getLowerIndicators()
Returns the list of Indicators used for Lower Chart
|
LowerIndicator |
getSelectedLowerIndicator() |
java.util.ArrayList<Indicator<UpperIndicator>> |
getUpperIndicators()
Returns the list of Indicators used for Upper Chart
|
void |
hideLowerChartAutomatically(boolean hide)
This will set whether or not the charts should automatically hide the lower chart or not.
|
void |
loadChartSettings(java.lang.String chartSettings)
Load chart settings
|
void |
loadChartTemplate(java.lang.String chartSettings)
Loads chart settings without previous data
|
void |
loadConfigurations(boolean showDark,
int... rawResourceIDs)
Loads configurations from XML
|
void |
loadConfigurations(int... rawResourceIDs)
Loads configurations from XML
|
void |
onNetworkError(int statusCode,
java.lang.String message)
Call when network request failed
|
void |
removeAllComparisons() |
void |
removeAllComparisons(boolean isDataRequested) |
void |
removeComparer(java.lang.String wsodIssue) |
void |
removeComparison(markit.android.Comparison comparison) |
void |
removeCustomEvent(java.lang.String id)
Removes the custom event by id
|
void |
removeDrawnObject(java.lang.String drawID)
Removes drawn object from chart base on id
|
void |
requestLowerChartScreenshot(java.lang.String fileName,
java.lang.String filePath)
Send a request to take a screenshot of the Lower chart
|
void |
requestUpperChartScreenshot(java.lang.String fileName,
java.lang.String filePath)
Send a request to take a screenshot of the Upper chart
|
java.lang.String |
saveChartSettings()
This will save all chart settings as well as the ChartDataRequest
|
java.lang.String |
saveChartTemplate()
This will save all chart settings but will not save ChartDataRequest
|
void |
setGapColor(int color)
Sets the color for the line separating the Upper and Lower Charts
|
void |
setIndicatorIsActive(java.lang.String indicatorId,
boolean isActive) |
void |
setLowerChartPercent(int percent)
Sets the Lower chart height using a percent 0% - 100%
|
void |
setLowerChartYAxisPosition(boolean showOnRight)
Sets the position of the Y axis for the Upper chart
|
void |
setLowerIndicatorIsActive(LowerIndicator lowerIndicatorKey,
boolean isActive) |
void |
setLowerIndicatorIsSelected(LowerIndicator lowerIndicatorKey,
boolean isSelected) |
void |
setLowerPlusIndicatorClick(View.OnClickListener onClickListener)
Deprecated.
|
void |
setMainIssueID(java.lang.String issueID)
Sets the main issueID
|
void |
setMultipleLowerChartsEnabled(boolean isMultipleLowerChartsEnabled)
Enable/disable more than one lower chart
|
void |
setResizeGripperEnabled(boolean isResizeGripperCentered)
Enable the resize gripper, using an SDK-supplied gripper image
|
void |
setResizeGripperEnabled(boolean isResizeGripperCentered,
int gripperDrawable)
Enable the resize gripper
|
void |
setUpperChartPercent(int percent)
Sets the Upper chart height using a percent 0% - 100%
|
void |
setUpperChartYAxisPosition(boolean showOnRight)
Sets the position of the Y axis for the Upper chart
|
void |
setUpperIndicatorIsActive(UpperIndicator upperIndicatorKey,
boolean isActive) |
void |
setUpperPlusIndicatorClick(View.OnClickListener onClickListener)
Deprecated.
|
void |
switchChartStyle(ChartStyle chartStyle)
Sets what style the price line to use
|
void |
updateChart(Indicator indicator)
This will update the charts based on what indicator was passed
|
void |
updateTimeFrameAndFrequency(TimeFrame timeFrame,
Frequency frequency)
Updates the current timeframe and frequency to use
|
void setUpperIndicatorIsActive(UpperIndicator upperIndicatorKey, boolean isActive)
void setIndicatorIsActive(java.lang.String indicatorId, boolean isActive)
void setLowerIndicatorIsActive(LowerIndicator lowerIndicatorKey, boolean isActive)
void setLowerIndicatorIsSelected(LowerIndicator lowerIndicatorKey, boolean isSelected)
LowerIndicator getSelectedLowerIndicator()
java.util.ArrayList<UpperIndicator> getActiveUpperIndicatorsEnum()
java.util.ArrayList<Indicator<UpperIndicator>> getActiveUpperIndicators()
java.util.ArrayList<LowerIndicator> getActiveLowerIndicatorsEnum()
java.util.ArrayList<Indicator<LowerIndicator>> getActiveLowerIndicators()
java.util.ArrayList<Indicator<UpperIndicator>> getUpperIndicators()
java.util.ArrayList<Indicator<LowerIndicator>> getLowerIndicators()
void updateChart(Indicator indicator)
indicator
- void hideLowerChartAutomatically(boolean hide)
hide
- @Deprecated void setUpperPlusIndicatorClick(View.OnClickListener onClickListener)
ChartViewIndicatorListener.addIndicatorUpperButtonTapped(View)
onClickListener
- @Deprecated void setLowerPlusIndicatorClick(View.OnClickListener onClickListener)
ChartViewIndicatorListener.addIndicatorLowerButtonTapped(View)
onClickListener
- void setGapColor(int color)
color
- void setUpperChartPercent(int percent)
percent
- void setLowerChartPercent(int percent)
percent
- ChartDataRequest getChartDataRequest()
void setUpperChartYAxisPosition(boolean showOnRight)
showOnRight
- void setLowerChartYAxisPosition(boolean showOnRight)
showOnRight
- void updateTimeFrameAndFrequency(TimeFrame timeFrame, Frequency frequency)
timeFrame
- frequency
- void drawCharts(java.lang.String json)
json
- void drawCharts(JSONObject json)
json
- void onNetworkError(int statusCode, java.lang.String message)
statusCode
- - error codemessage
- - error messagevoid setMainIssueID(java.lang.String issueID)
issueID
- Indicator addComparer(java.lang.String symbol, java.lang.String issueID, int... lineColor)
symbol
- issueID
- lineColor
- Indicator addComparer(markit.android.Comparison comparison)
java.util.ArrayList<Indicator> addComparisons(java.util.ArrayList<markit.android.Comparison> comparisons)
void removeCustomEvent(java.lang.String id)
id
- java.util.ArrayList<java.lang.String> getCustomEventIDs()
void loadConfigurations(boolean showDark, int... rawResourceIDs)
showDark
- rawResourceIDs
- void loadConfigurations(int... rawResourceIDs)
rawResourceIDs
- void drawOnChart(int drawingMode)
drawingMode
- IDs can be obtain from DrawingMode (IE: DrawingMode.TREND_LINE)void removeDrawnObject(java.lang.String drawID)
drawID
- java.util.ArrayList<java.lang.String> getDrawnIDs()
void requestUpperChartScreenshot(java.lang.String fileName, java.lang.String filePath)
fileName
- filePath
- void requestLowerChartScreenshot(java.lang.String fileName, java.lang.String filePath)
fileName
- filePath
- java.lang.String saveChartSettings()
void loadChartSettings(java.lang.String chartSettings)
chartSettings
- java.lang.String saveChartTemplate()
void loadChartTemplate(java.lang.String chartSettings)
chartSettings
- View getGapper()
void adjustChartSizes(int percent, boolean keepCurrentGapperSize)
percent
- keepCurrentGapperSize
- Indicator getIndicatorById(java.lang.String id)
Indicator getLightweightIndicatorById(java.lang.String id)
void removeComparer(java.lang.String wsodIssue)
void removeAllComparisons()
void removeAllComparisons(boolean isDataRequested)
void removeComparison(markit.android.Comparison comparison)
void switchChartStyle(ChartStyle chartStyle)
chartStyle
- The ids can be found with ChartStyle enum (ex: ChartStyle.Mountain)void drawTextAnnotation(java.lang.String annotationText, float textSize, java.lang.String textColorSpec, int backgroundResource, float maxWidthDp)
annotationText
- The text to place in the annotationtextSize
- The text size in scaled pixelstextColorSpec
- The text color spec in the form #RRGGBBbackgroundResource
- The ID of a drawable resource specifying border width, border color, and background colormaxWidthDp
- The maximum width of the TextView in dp - text will automatically wrap as neededvoid endAnnotationMode()
void setResizeGripperEnabled(boolean isResizeGripperCentered, int gripperDrawable)
isResizeGripperCentered
- - true if gripper should be in center, false if on the right edgegripperDrawable
- - drawable of gripper imagevoid setResizeGripperEnabled(boolean isResizeGripperCentered)
isResizeGripperCentered
- - true if gripper should be in center, false if on the right edgevoid setMultipleLowerChartsEnabled(boolean isMultipleLowerChartsEnabled)
isMultipleLowerChartsEnabled
- - if true, adding a lower indicator adds another lower chart