I am wanting to have a one tick per month and dynamically set the date range with the component. Here is the current code for the x axis:
"type": "date",
"title": "Month",
"tickformat": "%B %Y",
"tickmode":"linear"
"tick0":"{{procedureDate.value.start}}", **Wasn't sure if this is possible with retool/plotly
"dtick":"30%d",Here I wanted to make the distance between ticks 30 days or 1 month
"automargin": true,
"fixedrange": true,
"gridcolor": "#fff",
"zerolinecolor": "#fff"
Would love to see some examples of other dashboards incorporating various different user inputs for data visualization.
To adjust the x-axis to have one tick per month, it seems like we need to change the 'dtick' property value in your x-axis configuration to "M1" (we add this json in the PlotlyJSON->Layout section towards the bottom of the chart component configuration):
You can certainly pass in dynamic values from the app using {{}}, but they don't need to be wrapped in extra quotes. ("{{procedureDate.value.start}}" should be changed to {{procedureDate.value.start}})
Also, it seems like to get the "tick0" property to work, you also need to add a range, as I've shown in my example: