def METHOD_NAME(self, key, element, ranges, **kwargs):
    layout = super().METHOD_NAME(key, element, ranges)
    gridded = element.gridded
    xdim, ydim = gridded.dimensions()[:2]
    if self.invert_axes:
        xaxis, yaxis = ('yaxis', 'xaxis')
    else:
        xaxis, yaxis = ('xaxis', 'yaxis')
    shape = gridded.interface.shape(gridded, gridded=True)
    xtype = gridded.interface.dtype(gridded, xdim)
    if xtype.kind in 'SUO':
        layout[xaxis]['tickvals'] = np.arange(shape[1])
        layout[xaxis]['ticktext'] = gridded.dimension_values(0, expanded=False)
    ytype = gridded.interface.dtype(gridded, ydim)
    if ytype.kind in 'SUO':
        layout[yaxis]['tickvals'] = np.arange(shape[0])
        layout[yaxis]['ticktext'] = gridded.dimension_values(1, expanded=False)
    return layout