Restyle button Plotly.js not working as expected

Hello,
I’m trying to use a restyle button (docs) to change the data displayed in one trace, my setting looks like this:


var testUpdateMenus=[
    {
        buttons: [
            {
                args: ['y', [4,3,1,7,5,9,21,14,7,11], [1]],
                label: 'Update1',
                method: 'restyle'
            }
        ],
        direction: 'left',
        pad: {'r': 10, 't': 10},
        showactive: false,
        type: 'buttons',
        x: 0.1,
        xanchor: 'left',
        y: 1.1,
        yanchor: 'top'
    }
]

and in the layout I have "layout": { "updatemenus": testUpdateMenus, ...

Problem is that when I click on the button, the data changes but no matter what values I put in the array and how many, the trace will be from 0 to 9, like this: enter image description here enter image description here

Any clue?