Package com.storedobject.svg.chart
Class YearPlot
java.lang.Object
com.storedobject.svg.Svg
com.storedobject.svg.chart.Chart
com.storedobject.svg.chart.Plot
com.storedobject.svg.chart.YearPlot
-
Nested Class Summary
Nested classes/interfaces inherited from class com.storedobject.svg.Svg
Svg.Anchor, Svg.Margin, Svg.Mover, Svg.Scale, Svg.ScaleTo -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.storedobject.svg.chart.Plot
build, gridLine, setAxisColor, setGridLineColor, setPlotColor, setShowGridLinesMethods inherited from class com.storedobject.svg.chart.Chart
addValue, addValue, colorize, getValues, isBuilt, setLabelName, setUnit, setValueNameMethods inherited from class com.storedobject.svg.Svg
add, add, add, escapeXml, flipHorizontally, flipVertically, getFilledSvg, getHeight, getScaledSvg, getSvg, getWidth, getX, getY, margin, margin, scale, scale, scaleTo, scaleToHeight, scaleToWidth, toString
-
Constructor Details
-
YearPlot
public YearPlot(Date startDate, double[] values, String unit, double tickStart, double tickStep, int tickCount) Constructor.- Parameters:
startDate- Starting date of the data.values- Array of values for each year.unit- Unit for the values.tickStart- Starting value for Y-axis ticks.tickStep- Step value between Y-axis ticks.tickCount- Number of ticks on the Y-axis.
-
YearPlot
public YearPlot(double[] values, String unit, double tickStart, double tickStep, int tickCount, Date endDate) Constructor. The start date is calculated based on the end date and the number of values.- Parameters:
values- Array of values for each year.unit- Unit for the values.tickStart- Starting value for Y-axis ticks.tickStep- Step value between Y-axis ticks.tickCount- Number of ticks on the Y-axis.endDate- Ending date of the data.
-
YearPlot
Constructor. The data ends today.- Parameters:
values- Array of values for each year.unit- Unit for the values.tickStart- Starting value for Y-axis ticks.tickStep- Step value between Y-axis ticks.tickCount- Number of ticks on the Y-axis.
-