fix bug : color range did not show on page load when clicking color legend
refactor : add planService