added console log if data-ratio attribute is missing in the html