Reputation: 1946
I have a dataset where I'm referring to samples as numbers - when I try and do a bar graph using plotly (in JS) it's treating them as numbers and not as a label. How can I turn that off?
Upvotes: 7
Views: 5250
Reputation: 5011
You can override plotly's axis auto-type routine by specifying the axis type
. For example,
var data = [/* your data */];
var layout = {
xaxis: { type: 'category' }
};
Plotly.plot('graph', data, layout);
Upvotes: 14