| 130 | } |
| 131 | |
| 132 | double bars::x_end_point(size_t cluster_index, size_t i) { |
| 133 | // get the x_value (automatic or manual) |
| 134 | double x_value = x_.size() > i ? x_[i] : i + 1; |
| 135 | // go to point where bar width starts |
| 136 | x_value -= bar_width_ / 2; |
| 137 | // advance according to the group index |
| 138 | x_value += range_for_cluster() * cluster_index; |
| 139 | // center |
| 140 | x_value += range_for_cluster() / 2; |
| 141 | return x_value; |
| 142 | } |
| 143 | |
| 144 | std::string bars::data_string() { |
| 145 | std::stringstream ss; |