refactoring
added scaling to trend chart