How to set dynamic x axis ticks based off user input with date picker component

Hi @Matthew_Driggers,

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:

"range": [{{dateRange1.value.start}}, {{dateRange1.value.end}}],

Hope that helps! Remember to check the Retool documentation and resources for more information on customization and its built-in features: https://docs.retool.com/docs/building-bar-charts. Also, here in the Retool community forum, you might find examples of dashboards incorporating user inputs, such as this one: http://community.retool.com/t/display-total-value-on-stacked-bar-charts/4720/3

1 Like