[lib] bargraph should use generic X and Y