Add support for calculation periods
Improvements for drawing with different precisions