Update OnLegendStyle.js

change in the code, earlier it was truncating decimal values also of lower values. Now it truncates decimal values above 10000.