peity
peity copied to clipboard
is there a way to easily modify the line graph output to have it be vertically centered for identical values?
Use case: <span class="peity">5,5,5,5</span>
when peity turns this into a line chart, the result is a line across the vertical top of the resulting box.
highlighted box is the svg, line goes across top
How hard would it be to modify the source js to have the line go across the vertical middle of the resulting box instead of along the top. I realize this is dependent on the min/max automatically taken from the source values, but when there's the same values, the resulting line is at vertical top instead of vertical middle.
I have a backup plan of going over the data myself vs js before applying peity and manually setting min/max values at -/+1 of the source data, which would achieve the same effect, but if there's a simpler way of modifying the source directly, I'd rather do that as it'd be all encomposing.