Hi,
How do I change the tick labels for a grouped horizontal bar chart? From the sample code below, the xaxes tick labels would always show the ranges for trace2. What I want to do is to show labels for trace2 on top of the chart and labels for trace1 at the bottom of the chart.
Thanks!
var trace1 = {
x: [“0.02”, “0.02”, “0.03”, “0.03”, “0.03”, “0.04”, “0.04”, “0.05”, “0.09”, “.14”],
y: [“a”, “b”, “c”, “d”, “e”, “f”, “g”, “h”, “i”, “j”],
name: ‘SF Zoo’,
type: ‘bar’,
orientation: ‘h’
};
var trace2 = {
x: [“2”, “5”, “1”, “3”, “3”, “1”, “4”, “5”, “3”, “21”],
y: [“a”, “b”, “c”, “d”, “e”, “f”, “g”, “h”, “i”, “j”], name: ‘LA Zoo’,
type: ‘bar’,
orientation: ‘h’
};
var data = [trace1, trace2];
var layout = {barmode: ‘group’};
Plotly.newPlot(“plotdiv”, this.data, this.layout, this.options);