public class HIChartView
extends RelativeLayout
Modifier and Type | Field and Description |
---|---|
HIGlobal |
global
Global object.
|
HILang |
lang
Language object.
|
java.util.List<java.lang.String> |
plugins
Additional plugins to load into chart after preloading.
|
java.lang.String |
theme
Theme name to load from file system after preloading.
|
Constructor and Description |
---|
HIChartView(Context c)
Basic constructor with default chart size
|
HIChartView(Context c,
AttributeSet attrs)
Another basic constructor, this one is called automatically when you create view in XML
|
Modifier and Type | Method and Description |
---|---|
void |
addAnnotation(HIAnnotations annotations)
Add an annotation to the chart after render time.
|
void |
addAnnotation(HIAnnotations annotations,
boolean redraw)
Add an annotation to the chart after render time.
|
void |
addCredits(HICredits options)
Set a new credits label for the chart.
|
void |
addFont(int id) |
void |
addSeries(HISeries options)
Add a series to the chart after render time.
|
void |
addSeries(HISeries options,
boolean redraw)
Add a series to the chart after render time.
|
void |
addSeries(HISeries options,
boolean redraw,
HIAnimationOptionsObject animation)
Add a series to the chart after render time.
|
void |
addSeriesAsDrilldown(HIPoint point,
HISeries options)
Add a series to the chart as drilldown from a specific point in the parent series.
|
void |
addXAxis(HIXAxis options)
Add an axis to the chart after render time.
|
void |
addXAxis(HIXAxis options,
boolean redraw)
Add an axis to the chart after render time.
|
void |
addXAxis(HIXAxis options,
boolean redraw,
HIAnimationOptionsObject animation)
Add an axis to the chart after render time.
|
void |
addYAxis(HIYAxis options)
Add an axis to the chart after render time.
|
void |
addYAxis(HIYAxis options,
boolean redraw)
Add an axis to the chart after render time.
|
void |
addYAxis(HIYAxis options,
boolean redraw,
HIAnimationOptionsObject animation)
Add an axis to the chart after render time.
|
void |
cancelSonify()
Cancel current sonification and reset cursor.
|
void |
cancelSonify(boolean fadeOut)
Cancel current sonification and reset cursor.
|
void |
destroy()
Remove the chart and purge memory.
|
void |
drillUp()
When the chart is drilled down to a child series, calling chart.drillUp() will drill up to the parent series.
|
HIOptions |
getOptions() |
void |
hideLoading()
Hide the loading layer.
|
void |
loadJSONOptions(java.util.HashMap<java.lang.String,java.lang.Object> options) |
void |
openInCloud()
Experimental function to send a chart's config to the Cloud for editing.
|
void |
pauseSonify()
Pause the running sonification.
|
void |
pauseSonify(boolean fadeOut)
Pause the running sonification.
|
void |
print()
Exporting module required.
|
void |
redraw()
Redraw the chart after changes have been done to the data, axis extremes chart size or chart elements.
|
void |
redraw(HIAnimationOptionsObject animation)
Redraw the chart after changes have been done to the data, axis extremes chart size or chart elements.
|
void |
reload()
Deprecated.
|
void |
removeAnnotation(HIAnnotations annotation)
Remove an annotation from the chart.
|
void |
removeAnnotationById(java.lang.String id)
Remove an annotation from the chart.
|
void |
resetSonifyCursor()
Reset cursor to start.
|
void |
resetSonifyCursorEnd()
Reset cursor to end.
|
void |
setOnFocusChangeListener(OnFocusChangeListener l) |
void |
setOptions(HIOptions options)
Options are main configuration entry point for chart view, for more
information read API documentation.
|
void |
setSonifyCursor(HIPoint point)
Set the cursor to a point in different series
|
void |
setSonifyCursor(java.util.List<HIPoint> points)
Set the cursor to set of points in different series.
|
void |
setSubtitle(HISubtitle options)
Shortcut to set the subtitle options.
|
void |
setTitle(HISubtitle titleOptions,
HISubtitle subtitleOptions,
boolean redraw)
Set a new title or subtitle for the chart.
|
void |
showLoading(java.lang.String str)
Dim the chart and show a loading text.
|
void |
sonify(java.util.Map options)
Sonify a chart.
|
void |
update(HIOptions options)
A generic function to update any element of the chart.
|
void |
update(HIOptions options,
boolean redraw)
A generic function to update any element of the chart.
|
void |
update(HIOptions options,
boolean redraw,
boolean oneToOne)
A generic function to update any element of the chart.
|
void |
update(HIOptions options,
boolean redraw,
boolean oneToOne,
HIAnimationOptionsObject animation)
A generic function to update any element of the chart.
|
void |
viewData()
Export-data module required.
|
void |
zoomOut()
Zoom the chart out after a user has zoomed in.
|
public HIGlobal global
public HILang lang
public java.util.List<java.lang.String> plugins
public java.lang.String theme
public HIChartView(Context c)
c
- Context from Layout which will be containing chartpublic HIChartView(Context c, AttributeSet attrs)
c
- app contextattrs
- attributes from xmlpublic void addAnnotation(HIAnnotations annotations)
annotations
- The annotation options for the new, detailed annotation.public void addAnnotation(HIAnnotations annotations, boolean redraw)
annotations
- The annotation options for the new, detailed annotation.redraw
- Whether to redraw the chart after adding.public void addCredits(HICredits options)
options
- A configuration object for the new credits.public void addFont(int id)
public void addSeries(HISeries options)
options
- The config options for the series.public void addSeries(HISeries options, boolean redraw)
options
- The config options for the series.redraw
- Whether to redraw the chart after adding.public void addSeries(HISeries options, boolean redraw, HIAnimationOptionsObject animation)
options
- The config options for the series.redraw
- Whether to redraw the chart after adding.animation
- Whether to apply animation, and optionally animation configuration.public void addSeriesAsDrilldown(HIPoint point, HISeries options)
point
- The point from which the drilldown will start.options
- The series options for the new, detailed series.public void addXAxis(HIXAxis options)
options
- The axis options.public void addXAxis(HIXAxis options, boolean redraw)
options
- The axis options.redraw
- Whether to redraw the chart after adding.public void addXAxis(HIXAxis options, boolean redraw, HIAnimationOptionsObject animation)
options
- The axis options.redraw
- Whether to redraw the chart after adding.animation
- Whether and how to apply animation in the redraw.public void addYAxis(HIYAxis options)
options
- The axis options.public void addYAxis(HIYAxis options, boolean redraw)
options
- The axis options.redraw
- Whether to redraw the chart after adding.public void addYAxis(HIYAxis options, boolean redraw, HIAnimationOptionsObject animation)
options
- The axis options.redraw
- Whether to redraw the chart after adding.animation
- Whether and how to apply animation in the redraw.public void cancelSonify()
public void cancelSonify(boolean fadeOut)
fadeOut
- Fade out as we pause to avoid clicks.public void destroy()
public void drillUp()
public HIOptions getOptions()
public void hideLoading()
public void loadJSONOptions(java.util.HashMap<java.lang.String,java.lang.Object> options)
public void openInCloud()
public void pauseSonify()
public void pauseSonify(boolean fadeOut)
fadeOut
- Fade out as we pause to avoid clicks.public void print()
public void redraw()
public void redraw(HIAnimationOptionsObject animation)
animation
- If or how to apply animation to the redraw.@Deprecated public void reload()
public void removeAnnotation(HIAnnotations annotation)
annotation
- Direct annotation object.public void removeAnnotationById(java.lang.String id)
id
- The annotation's idpublic void resetSonifyCursor()
public void resetSonifyCursorEnd()
public void setOnFocusChangeListener(OnFocusChangeListener l)
public void setOptions(HIOptions options)
public void setSonifyCursor(HIPoint point)
point
- The point to set the cursor to.public void setSonifyCursor(java.util.List<HIPoint> points)
points
- The points to set the cursor to. The points have to be in different series that are being played simultaneously.public void setSubtitle(HISubtitle options)
options
- New subtitle options. The subtitle text itself is set by the options.text property.public void setTitle(HISubtitle titleOptions, HISubtitle subtitleOptions, boolean redraw)
titleOptions
- New subtitle options. The subtitle text itself is set by the options.text property.subtitleOptions
- New subtitle options. The subtitle text itself is set by the subtitleOptions.text property.redraw
- Whether to redraw the chart or wait for a later call to HIChartView.redraw().public void showLoading(java.lang.String str)
str
- A text to show in the loading label instead of the default one. The default text is set in HILang.loading.public void sonify(java.util.Map options)
options
- The options for sonifying this chart.public void update(HIOptions options)
options
- A configuration object for the new chart options.public void update(HIOptions options, boolean redraw)
options
- A configuration object for the new chart options.redraw
- Whether to redraw the chart.public void update(HIOptions options, boolean redraw, boolean oneToOne)
options
- A configuration object for the new chart options.redraw
- Whether to redraw the chart.oneToOne
- When true, the series, xAxis and yAxis collections will be updated one to one, and items will be either added or removed to match the new updated options. For example, if the chart has two series and we call chart.update with a configuration containing three series, one will be added. If we call chart.update with one series, one will be removed. Setting an empty series array will remove all series, but leaving out the series property will leave all series untouched. If the series have id's, the new series options will be matched by id, and the remaining ones removed.public void update(HIOptions options, boolean redraw, boolean oneToOne, HIAnimationOptionsObject animation)
options
- A configuration object for the new chart options.redraw
- Whether to redraw the chart.oneToOne
- When true, the series, xAxis and yAxis collections will be updated one to one, and items will be either added or removed to match the new updated options. For example, if the chart has two series and we call chart.update with a configuration containing three series, one will be added. If we call chart.update with one series, one will be removed. Setting an empty series array will remove all series, but leaving out the series property will leave all series untouched. If the series have id's, the new series options will be matched by id, and the remaining ones removed.animation
- Whether to apply animation, and optionally animation configuration.public void viewData()
public void zoomOut()