Branch Coverage

blib/lib/Imager/Graph/Horizontal.pm
Criterion Covered Total %
branch 84 142 59.1


line true false branch
108 0 6 unless ($self->_valid_input)
116 0 6 unless $self->_make_img
119 0 6 unless my $img = $self->_get_image
127 0 6 if ($$style{'title'}{'text'})
128 0 0 unless $self->_draw_title($img, \@chart_box)
133 0 6 unless $self->_get_data_range
144 5 1 if ($col_height > 1) { }
167 6 0 if ($self->_feature_enabled('graph_outline'))
168 0 6 unless my(@line) = $self->_get_line('graph.outline')
183 0 6 unless my(@back_fill) = $self->_get_fill('graph.fill', \@fill_box)
196 6 0 if ($value_range)
200 2 4 if ($min_value < 0)
202 0 2 unless my(@neg_fill) = $self->_get_fill('negative_bg', \@neg_box)
220 5 1 if ($self->_get_data_series->{'bar'})
223 1 5 if ($self->_get_data_series->{'line'})
227 0 6 if ($self->_get_x_tics)
230 5 1 if ($self->_get_labels(\%opts))
254 0 6 if (defined $config_max and $config_max < $max_value)
257 0 6 if (defined $config_min and $config_min > $min_value)
262 0 6 if (defined $config_min) { }
266 4 2 if ($min_value > 0)
269 0 6 if ($range_padding and $min_value < 0)
271 0 0 if ($min_value < -1 and $difference > -1)
277 0 6 if (defined $config_max) { }
281 0 6 if ($range_padding and $max_value > 0)
283 0 0 if ($max_value > 1 and $difference < 1)
290 0 6 if ($self->_get_number('automatic_axis'))
293 0 0 if ($@)
319 6 6 unless defined $value
320 6 0 if ($value < $min)
330 6 18 unless defined $value
331 12 6 if ($value > $min)
339 5 1 unless $series
349 1 0 if (scalar @data > $column_count)
354 2 5 if ($value > $max_value)
355 6 1 if ($value < $min_value)
368 1 5 unless $series
380 1008 22 if ($value > $max_value)
381 27 1003 if ($value < $min_value)
396 5 1 if (my $series = $self->_get_data_series->{'bar'})
400 0 0 if ($$style{'features'}{'legend'} and scalar @labels)
401 0 0 unless $self->SUPER::_draw_legend($self->_get_image, \@labels, $chart_box)
432 0 1 defined $self->_get_data_series->{'column'} || $self->_get_data_series->{'stacked_column'} ? :
448 0 1 if ($has_columns) { }
469 0 6 unless $img->line('x1', $x1, 'y1', $y1, 'x2', $x2, 'y2', $y2, 'aa', $line_aa, 'color', $color)
478 1 0 if ($self->_feature_enabled('linemarkers'))
519 0 5 if ($$style{'features'}{'outline'})
542 1000 30 if ($y2 < $y1)
550 1028 2 if ($data[$i] > 0) { }
0 2 elsif ($data[$i] == 0) { }
553 0 1028 if ($$style{'features'}{'outline'})
562 0 2 if ($$style{'features'}{'outline'})
637 0 0 unless @_ > 1
652 0 0 if ($@)
692 4 2 if (my(@box) = $self->_text_bbox($self->_get_max_value, 'legend'))
710 1 5 unless ($labels)
714 1 4 unless my(%text_info) = $self->_text_style('legend')
723 8 22 if ($width > $max_width)
739 2 4 unless my(%text_info) = $self->_text_style('legend')
751 0 0 if ($height > $max_height)
775 4 1 if ($has_columns)
779 1 4 unless my(%text_info) = $self->_text_style('legend')
790 30 0 if ($has_columns)
796 0 30 unless my(@box) = $self->_text_bbox($label, 'legend')
827 0 0 unless my(%text_info) = $self->_text_style('legend')
842 0 0 unless my(@box) = $self->_text_bbox($value, 'legend')
854 0 0 if ($show_gridlines and $x1 != $$graph_box[0] and $x1 != $$graph_box[2])
866 0 6 unless (defined $self->_get_data_series and keys %{$self->_get_data_series;})
871 0 6 if (defined $$data{'line'} and not scalar @{$$data{'line'}[0]{'data'};})
874 0 6 if (defined $$data{'column'} and not scalar @{$$data{'column'}[0]{'data'};})
877 0 6 if (defined $$data{'stacked_column'} and not scalar @{$$data{'stacked_column'}[0]{'data'};})