def METHOD_NAME(plotdata):
    if not plotdata:
        raise PreventUpdate
    if plotdata == "error":
        return MessageContainer(
            [
                MessageBody(
                    dcc.Markdown(
                        "XANES pattern not available for this selection."
                    )
                )
            ],
            kind="warning",
        )
    return dcc.Graph(
        figure=go.Figure(data=plotdata, layout=self.default_xas_layout),
        config={"displayModeBar": False},
    )