xForIndex method
The pixel x of column index. A single column is centered; otherwise
columns span the full plot width with count - 1 equal gaps.
Implementation
double xForIndex(int index) {
if (count <= 1) return bounds.left + bounds.width / 2;
return bounds.left + bounds.width * index / (count - 1);
}