Package com.storedobject.svg.chart
Class Plot
java.lang.Object
com.storedobject.svg.Svg
com.storedobject.svg.chart.Chart
com.storedobject.svg.chart.Plot
-
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
Modifier and TypeMethodDescriptionfinal voidbuild()Build the plot SVG.protected StringgridLine(double y) Generate the SVG for a grid line.voidsetAxisColor(String axisColor) Set the color for the axes.voidsetGridLineColor(String gridLineColor) Set the color for the grid lines.voidsetPlotColor(String plotColor) Set the color for the plot line.voidsetShowGridLines(boolean showGridLines) Set whether to show grid lines.Methods 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
-
Plot
Constructor.- Parameters:
values- The data values to be plotted.tickStart- The starting value for Y-axis ticks.tickStep- The step value between Y-axis ticks.tickCount- The number of ticks on the Y-axis.
-
-
Method Details
-
setShowGridLines
public void setShowGridLines(boolean showGridLines) Set whether to show grid lines.- Parameters:
showGridLines- True to show grid lines.
-
setAxisColor
Set the color for the axes.- Parameters:
axisColor- Color string.
-
setGridLineColor
Set the color for the grid lines.- Parameters:
gridLineColor- Color string.
-
setPlotColor
Set the color for the plot line.- Parameters:
plotColor- Color string.
-
build
-
gridLine
Generate the SVG for a grid line.- Parameters:
y- Y coordinate of the grid line.- Returns:
- SVG string for the grid line.
-