Load data from SignalR server

I need to plot the graph using data loaded from the Server…

I have a Hub set up in the Server and it has the method
public List GetX
{
get { return new List() {2,4,6,8,10}; }
}

I need to bind this data directly to x axis…

var trace1 = {
x: (method to call hub).get(“GetX”),
y: [1, 9, 4, 7, 5, 2, 4],
mode: ‘lines+markers’,
type: ‘scatter’
};

var data = [trace1];

Plotly.plot( TESTER, data, {
  margin: { t: 0 } }  );

When i do this, the graph get plotted but the x asis values are {0,1,2,3,4} … what should be the correct object to give data…