Description
Hello,
I tried many ways to make the x axis value consistent with the time and font in line chart like using this.layout.xaxis["dtick"]= "M1"
this.layout.xaxis["tickmode"]= "auto",
tickformat= '%d-%b-%y \n %H:%M',
but nothing worked, range is picked dynamically.
layout = {
"showlegend": true,
"xaxis": {
"showline": true,
"showgrid": false,
"zeroline": false,
"automargin": true,
"tickformat": "%d-%b-%y \n %H:%M",
"tickangle": 0,
"dtick": "M1",
"tickmode": "auto",
"range": [
"2025-03-28 03:44:59.999",
"2025-03-28 03:45:00.001"
],
"type": "date",
"autorange": true
},
"yaxis": {
"showline": true,
"showgrid": true,
"automargin": true,
"title": {
"text": "abc Change [%]",
"font": {
"size": 10
}
}
},
"legend": {
"orientation": "h",
"x": 0,
"y": 2
},
"displayModeBar": false,
"margin": {
"l": 50,
"b": 45,
"t": 10,
"r": 10,
"pad": 4
}
};
config={
"scrollZoom": false,
"displayModeBar": true,
"editable": false,
"zooming": true,
"displaylogo": false,
"responsive": true
},
data=[ { "x": [], "y": [], "line": { "dash": "dot" }, "name": "Trace" }, { "x": [ "2025-03-28 03:45:00" ], "y": [ 1 ], "line": { "dash": "dot" }, "name": "X1 Leakage Current" } ]
Looking out for help here.
Activity
gvwilson commentedon Mar 31, 2025
thanks for filing the issue @Swathi-ext - we are trying to keep the issues and PRs in Plotly's public repositories tidy so that we can focus on things that are most important to our community. For tech support and "how-to" questions, please post in our community forum https://community.plotly.com/. Thank you - @gvwilson