Issue #1 Fixed cache problem.
Refactoring due to preparation for implementing other chart types