Skip to content

bar width not being correctly calculated #84

@Tarpon907

Description

@Tarpon907

I'm trying to generate a bar graph with no space between the bars. Instead, the bars overlap. bar_width is not set, and bar_space = 0.

image

When bar_space = 14, I get this, which is what I expected to get with bar_space = 0.

image

These are my settings.

array(29) {
  ["datetime_keys"]=>
  bool(true)
  ["datetime_text_format"]=>
  array(2) {
    [0]=>
    string(1) "l"
    [1]=>
    string(3) "M d"
  }
  ["back_colour"]=>
  string(5) "white"
  ["back_stroke_width"]=>
  int(0)
  ["stroke_width"]=>
  int(0)
  ["show_axes"]=>
  bool(true)
  ["bar_space"]=>
  int(0)
  ["group_space"]=>
  int(0)
  ["minimum_grid_spacing_v"]=>
  int(30)
  ["grid_division_h"]=>
  int(6)
  ["axis_min_h"]=>
  string(16) "2023-11-29 00:00"
  ["axis_levels_h"]=>
  int(2)
  ["axis_min_v"]=>
  array(2) {
    [0]=>
    int(0)
    [1]=>
    int(29)
  }
  ["axis_max_v"]=>
  array(2) {
    [0]=>
    int(95)
    [1]=>
    int(59)
  }
  ["structured_data"]=>
  bool(true)
  ["structure"]=>
  array(3) {
    ["key"]=>
    string(4) "Date"
    ["value"]=>
    array(2) {
      [0]=>
      string(5) "value"
      [1]=>
      string(7) "overlay"
    }
    ["colour"]=>
    array(2) {
      [0]=>
      string(6) "colour"
      [1]=>
      string(7) "colour2"
    }
  }
  ["axis_font_size"]=>
  string(2) "12"
  ["axis_font"]=>
  string(10) "sans-serif"
  ["axis_stroke_width"]=>
  int(1)
  ["axis_colour"]=>
  string(7) "#777777"
  ["label_font"]=>
  string(10) "sans-serif"
  ["label_font_size"]=>
  int(12)
  ["dataset_axis"]=>
  array(2) {
    [0]=>
    int(0)
    [1]=>
    int(1)
  }
  ["marker_size"]=>
  array(1) {
    [0]=>
    string(1) "1"
  }
  ["show_tooltips"]=>
  bool(true)
  ["tooltip_align"]=>
  string(4) "left"
  ["axis_max_h"]=>
  string(16) "2023-11-30 00:00"
  ["label_v"]=>
  array(2) {
    [0]=>
    string(3) "kWh"
    [1]=>
    string(2) "*F"
  }
}


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions