19#ifndef a60_SVG_BAR_GRAPHS_H
20#define a60_SVG_BAR_GRAPHS_H 1
39{
return xstart + (k::age_value_to_multiple(
id,
true) * hspace); };
42using umids = std::unordered_map<string, id_size>;
43using vumids = std::vector<umids>;
47 const double yscale = 0.7,
const uint rwidth = 10)
50 vul vsum(k::age_values.size(), 0);
51 for (
const auto& val : agesvo)
53 auto [ id, count ] = val;
58 double rystart = voffstart - (rheight / 2);
60 get_metadata_style(), rwidth, rheight);
double scale_value_on_range(const ssize_type value, const ssize_type min, const ssize_type max, const ssize_type nfloor, const ssize_type nceil)
Scale value from min to max on range (nfloor, nceil).
const double ltopspace(10)
Distance between label and top/bottom of line or text.
const string to_string(const unit e)
const double ctopspace(60)
void point_to_rect_centered(element_base &obj, const point_2t origin, style s, double width=4, double height=4, const string filterstr="")
Center a rectangle at this point.
void sized_text(element_base &obj, svg::typography typo, const int sz, const string text, const int tx, const int ty)
Text at size.
uint get_xoffset(const string &id, const uint xstart, const double hspace)
Compute xoffset.