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
Nested Classes -
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, yAxisTitleFields inherited from class com.strategyquant.tradinglib.AbstractChart
categoryAxis, showLegend, title, type, xAxisTicksDurationInMS, yAxisTicksMemory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddValue(String name, Comparable x, Number y)Adds the value.voidaddValue(String name, Comparable x, Number y, String color)voidsetCategoryColor(String name, String color)Sets the category color.org.json.JSONObjecttoJSON()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:
toJSONin classAbstractChart- Returns:
- the JSON object
-