Hi! I'm getting "ValueError: Invalid property specified for object of type plotly.graph_objs.layout.YAxis: 'titlefont'"

I used plotly for years now, and it worked fine all the time. Without being aware of any changes I have made, strangely now this error (see topic) occurs. Searched for some hours but didn´t find anything that helped: Upgraded (updated?) plotly to version 6.0.0 and upgraded Dash, still the same.
The line where plotly locates the error is:
“fig.update_layout(hovermode=“x unified”, xaxis=dict(domain=[0.99, 0.1]),”
One line below it says:
“Did you mean “tickfont”?”
Then a loooong list of “Valid properties:” is shown.
Restarting the computer also didn´t solve the problem.
Please, I’m grateful for any advice or ideas.
Thank you so much!

Hi Gunther,

welcome to the forum.
From the API YAxis has no “titlefont” property.
You could use following syntax:

fig.update_layout(
        dict(
            yaxis = dict(
                title=dict(
                    text = "Courier New",
                    font = dict(
                        size=22,
                        family="Courier New"
                    )
                )
            )
        )
    )

or the equivalent:

fig.update_layout(
        {
            "yaxis" : {
                "title" : {
                    "text" : "Courier New",
                    "font" : {
                        "size" : 22,
                        "family" : "Courier New"
                    }
                }
            }
        }
    )

See here:
Plotly API - YAxis

Hope this helps.

Hi Bakira
Thank you so much for your answer!
I expected an email in case of an answer to my post. Got emails from plotly but only general information. So I waited …
As I explained, I used plotly for years with no issues (except caused by myself : ) ), but recently strange things do occur.
I changed the code according to your answer, but because the described error shows up only randomly, by now, I cannot tell whether it helped.
However, I currently have another of these strange things which occur, that is only one curve of 14 is visible, in spite of all the names of the curves are listed and not “greyed” (to indicate invisibility on purpose). Without any changes in the code, mostly all the curves are plotted, but now and then only one curve is plotted, no idea why.
As I didn´t find anything that helped, I will post this issue separately.
However, really thank you. Hope with your suggested changes the “titlefont” error will stay away.