Change "1000" to "1k" in plotly.js legend text

Good day, I’ve been scouring google for a solution to this but nothing has popped up. For consistency, I would like to convert all values ending 000 to 'k", but it looks like plotly only does this once a legend value hits 5 digits. Please see my screen shot: