Package com.strategyquant.tradinglib
Class BarChart
java.lang.Object
com.strategyquant.tradinglib.AbstractChart
com.strategyquant.tradinglib.charts.AbstractXYChart
com.strategyquant.tradinglib.BarChart
public class BarChart
extends com.strategyquant.tradinglib.charts.AbstractXYChart
The Class BarChart.
-
Nested Class Summary
-
Field Summary
Fields inherited from class com.strategyquant.tradinglib.charts.AbstractXYChart
disableEvents, displayXAxesLabels, displayYAxesLabels, fontSize, invertIfNegative, maxXTicksLimit, maxYTicksLimit, pointRadius, tooltips, xAxisRangeMax, xAxisRangeMin, xAxisTickformat, xAxisTitle, xAxisType, yAxisRangeMax, yAxisRangeMin, yAxisTitle
Fields inherited from class com.strategyquant.tradinglib.AbstractChart
categoryAxis, showLegend, title, type, xAxisTicksDurationInMS, yAxisTicksMemory
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addValue(String name, Comparable x, Number y)
Adds the value.void
addValue(String name, Comparable x, Number y, String color)
void
setCategoryColor(String name, String color)
Sets the category color.org.json.JSONObject
toJSON()
To JSON.Methods inherited from class com.strategyquant.tradinglib.charts.AbstractXYChart
getOptions, invertIfNegative
-
Constructor Details
-
BarChart
public BarChart()Instantiates a new bar chart.
-
-
Method Details
-
addValue
Adds the value.- Parameters:
name
- the namex
- the xy
- the y
-
addValue
-
setCategoryColor
Sets the category color.- Parameters:
name
- the namecolor
- the color
-
toJSON
public org.json.JSONObject toJSON()To JSON.- Specified by:
toJSON
in classAbstractChart
- Returns:
- the JSON object
-