Package tech.tablesaw.plotly.traces
Class TraceBuilder
- java.lang.Object
-
- tech.tablesaw.plotly.traces.TraceBuilder
-
- Direct Known Subclasses:
BarTrace.BarBuilder,BoxTrace.BoxBuilder,ContourTrace.ContourBuilder,HeatmapTrace.HeatmapBuilder,Histogram2DTrace.Histogram2DBuilder,HistogramTrace.HistogramBuilder,PieTrace.PieBuilder,Scatter3DTrace.Scatter3DBuilder,ScatterTrace.ScatterBuilder,ViolinTrace.ViolinBuilder
public abstract class TraceBuilder extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected HoverLabelhoverLabelprotected String[]idsAssigns id labels to each datum.protected StringlegendGroupSets the legend group for this trace.protected StringnameSets the trace name.protected doubleopacitySets the opacity of the trace.protected BooleanshowLegendDetermines whether or not an item corresponding to this trace is shown in the legend.protected AbstractTrace.Visibilityvisibleprotected StringxAxisSets a reference between this trace's x coordinates and a 2D cartesian x axis.protected StringyAxisSets a reference between this trace's y coordinates and a 2D cartesian y axis.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static String[]columnToStringArray(tech.tablesaw.columns.Column<?> column)protected abstract StringgetType()protected TraceBuilderhoverLabel(HoverLabel hoverLabel)TraceBuilderlegendGroup(String group)TraceBuildername(String name)TraceBuilderopacity(double n)protected TraceBuildershowLegend(boolean showLegend)protected TraceBuildervisible(AbstractTrace.Visibility visibility)TraceBuilderxAxis(String xAxis)TraceBuilderyAxis(String yAxis)
-
-
-
Field Detail
-
visible
protected AbstractTrace.Visibility visible
-
showLegend
protected Boolean showLegend
Determines whether or not an item corresponding to this trace is shown in the legend.
-
legendGroup
protected String legendGroup
Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.
-
opacity
protected double opacity
Sets the opacity of the trace.
-
name
protected String name
Sets the trace name. The trace name appear as the legend item and on hover.
-
ids
protected String[] ids
Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
-
hoverLabel
protected HoverLabel hoverLabel
-
xAxis
protected String xAxis
Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If *x* (the default value), the x coordinates refer to `layout.xaxis`. If *x2*, the x coordinates refer to `layout.xaxis2`, and so on.
-
yAxis
protected String yAxis
Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If *y* (the default value), the y coordinates refer to `layout.yaxis`. If *y2*, the y coordinates refer to `layout.yaxis2`, and so on.
-
-
Method Detail
-
getType
protected abstract String getType()
-
name
public TraceBuilder name(String name)
-
opacity
public TraceBuilder opacity(double n)
-
legendGroup
public TraceBuilder legendGroup(String group)
-
showLegend
protected TraceBuilder showLegend(boolean showLegend)
-
visible
protected TraceBuilder visible(AbstractTrace.Visibility visibility)
-
hoverLabel
protected TraceBuilder hoverLabel(HoverLabel hoverLabel)
-
columnToStringArray
protected static String[] columnToStringArray(tech.tablesaw.columns.Column<?> column)
-
xAxis
public TraceBuilder xAxis(String xAxis)
-
yAxis
public TraceBuilder yAxis(String yAxis)
-
-