# Rounding stats output in hover from plotly express Violin chart

**URL:** <https://community.plotly.com/t/rounding-stats-output-in-hover-from-plotly-express-violin-chart/67323>\
**Category:** 📊 Plotly Python\
**Created:** [August 24, 2022, 7:59pm UTC](https://community.plotly.com/t/rounding-stats-output-in-hover-from-plotly-express-violin-chart/67323 "2022-08-24T19:59:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![trakstar](https://avatars.discourse-cdn.com/v4/letter/t/85f322/32.png) [@trakstar](https://community.plotly.com/u/trakstar)\
**Post date:** [August 24, 2022, 7:59pm UTC](https://community.plotly.com/t/rounding-stats-output-in-hover-from-plotly-express-violin-chart/67323/1 "2022-08-24T19:59:06Z")

</div>

I cant seem to find a way to apply formatting to hovertext in the violin chart. I specifically want to round the statistics to 2 decimal places. Same issue found here:

> <https://stackoverflow.com/questions/67877814/how-to-set-the-number-of-decimal-places-in-plotly-violin-hover-text>

Any help with be appreciated.

---

<div class="post-metadata">

**Author:** ![trakstar](https://avatars.discourse-cdn.com/v4/letter/t/85f322/32.png) [@trakstar](https://community.plotly.com/u/trakstar)\
**Post date:** [August 26, 2022, 3:51pm UTC](https://community.plotly.com/t/rounding-stats-output-in-hover-from-plotly-express-violin-chart/67323/2 "2022-08-26T15:51:02Z")

</div>

fig.update\_traces(hovertemplate=“y: %{y:.2f}”)

This works for the y values but cannot seem to targe KDE or other stats in the violin output.
