The recently introduced logic has an incorrect understanding of the `unit` parameter.
This would result in too many ticks being outputted, particularly as datasets got larger.
This fixes it by re-calculating the tick count using the `unit` param as originally intended.
This reduces the loop frequency to one or two iterations in all cases.
I have been unable to find any single line equation that can produce this same behavior, but one likely exists.
This provides two improvements to how the X Axis is rendered:
* The calculation for where a tick should exist has been improved. It now will ensure a tick is always at both the start of the axis and the end of the axis. This makes it clear exactly what data span is captured in the graph.
* The second improvement is how the label on the last tick is written. It used to often get partially cut off, and with the change to ensure a tick is always at the end this could be seen more easily. Now the last tick has it's label written to the left so that it can be fully displayed.