WOIBarGraph constructor
const
WOIBarGraph({
- Key? key,
- required List<
double> yaxisValues, - required List<
String> xaxisValues, - required double height,
- required double width,
- Text? yAxisLabel,
- Text? xAxisLabel,
- Text? graphHeadingText,
- Color barColors = Colors.blue,
- Color incrementColors = Colors.red,
- Color backgroundColor = Colors.white,
- double barPadding = 5,
- double yaxisTextAndLinePadding = 30,
- double? labelPadding,
- double? headingPadding,
- TextStyle? textStyle,
- double yaxisLabelTextBoxSize = 30,
- double headingTextBoxSize = 30,
- double xaxisLableTextBoxSize = 30,
- double topPadding = 0,
Implementation
const WOIBarGraph({
super.key,
/// Values for the y component of the data points
required this.yaxisValues,
/// Values for the y component of the data points
required this.xaxisValues,
/// Height of the graph
required this.height,
/// Width of the graph
required this.width,
/// Labels to mark what the data on the y axis represents.
this.yAxisLabel,
/// Labels to mark what the data on the x axis represents.
this.xAxisLabel,
/// Hrading to mark what the data of the graph represents.
this.graphHeadingText,
/// Color of the bars.
this.barColors = Colors.blue,
/// Color of the y axis increments in the background.
this.incrementColors = Colors.red,
/// Background color of the complete widget. To adjust the background color properly to enwrap the whole widget a [topPadding] might be needed.
this.backgroundColor = Colors.white,
/// The left and the right padding on the bars. Setting this to 0 changes the bar graph to a historgram.
this.barPadding = 5,
/// The gap between the y axis increment lines and the increment values.
this.yaxisTextAndLinePadding = 30,
/// The gap between the graph and its labels
this.labelPadding,
/// The gap between the graph and its labels
this.headingPadding,
/// Text style for the labels and the increments.
this.textStyle,
/// Size for the text box for the label on the y axis. Might need to adjust this to fit different sized labels.
this.yaxisLabelTextBoxSize = 30,
/// Size for the text box for the heading. Might need to adjust this to fit different sized headings.
this.headingTextBoxSize = 30,
/// Size for the text box for the label on the x axis. Might need to adjust this to fit different sized labels.
this.xaxisLableTextBoxSize = 30,
/// This is to adding a padding on top. This will add a colored piece on top of the graph so that the background color completely enwraps the graph.
this.topPadding = 0,
});