Class StackedBarChartBuilder
- java.lang.Object
-
- com.trivago.cluecumber.engine.rendering.pages.charts.StackedBarChartBuilder
-
public class StackedBarChartBuilder extends Object
The builder class for stacked bar charts.
-
-
Constructor Summary
Constructors Constructor Description StackedBarChartBuilder(ChartConfiguration chartConfiguration)The builder for this chart.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StackedBarChartBuilderaddValues(List<Float> values, Status status)Add values of a specific status to the chart.Chartbuild()Builds the final chart.StackedBarChartBuildersetLabels(List<String> labels)Add labels to this chart.StackedBarChartBuildersetStacked(boolean stacked)Set if this chart should be stacked.StackedBarChartBuildersetxAxisLabel(String xAxisLabel)Set the label for the x axis.StackedBarChartBuildersetyAxisLabel(String yAxisLabel)Set the label for the y axis.StackedBarChartBuildersetyAxisStepSize(float yAxisStepSize)Set the label for the y axis.
-
-
-
Constructor Detail
-
StackedBarChartBuilder
public StackedBarChartBuilder(ChartConfiguration chartConfiguration)
The builder for this chart.- Parameters:
chartConfiguration- TheChartConfigurationinstance.
-
-
Method Detail
-
addValues
public StackedBarChartBuilder addValues(List<Float> values, Status status)
Add values of a specific status to the chart.- Parameters:
values- The list of values.status- TheStatusenum that these values belong to.- Returns:
- The
StackedBarChartBuilder.
-
setLabels
public StackedBarChartBuilder setLabels(List<String> labels)
Add labels to this chart.- Parameters:
labels- The list of string labels.- Returns:
- The
StackedBarChartBuilderinstance.
-
setxAxisLabel
public StackedBarChartBuilder setxAxisLabel(String xAxisLabel)
Set the label for the x axis.- Parameters:
xAxisLabel- The label to use.- Returns:
- The
StackedBarChartBuilderinstance.
-
setyAxisLabel
public StackedBarChartBuilder setyAxisLabel(String yAxisLabel)
Set the label for the y axis.- Parameters:
yAxisLabel- The label to use.- Returns:
- The
StackedBarChartBuilderinstance.
-
setyAxisStepSize
public StackedBarChartBuilder setyAxisStepSize(float yAxisStepSize)
Set the label for the y axis.- Parameters:
yAxisStepSize- The step size for this axis.- Returns:
- The
StackedBarChartBuilderinstance.
-
setStacked
public StackedBarChartBuilder setStacked(boolean stacked)
Set if this chart should be stacked.- Parameters:
stacked- true means stacked.- Returns:
- The
StackedBarChartBuilderinstance.
-
-