Custom x axes transform

When using matplotlib I can make a custom transfer of an x_axes like:
ax.xaxis.set_major_formatter(plt.FuncFormatter(format_func_to_dbm))

def format_func_to_dbm(value, tick_number):
if value == 0:
return “-inf”
return f"{10 * np.log10(value) - 30:.1f}"

My goal is to have X axes in dBm.

Is there similar functionality available for plotly?