Skip to content

Commit 2b23c87

Browse files
authored
Merge pull request #1216 from plotly/multicat-axis
add multicat example
2 parents 1f98932 + 90eae96 commit 2b23c87

File tree

2 files changed

+43
-145
lines changed

2 files changed

+43
-145
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: Multi-Category Axes
3+
plot_url: https://codepen.io/plotly/embed/bOByWR/?height=456&theme-id=15263&default-tab=result
4+
language: plotly_js
5+
suite: axes
6+
order: 7.4
7+
sitemap: false
8+
arrangement: horizontal
9+
---
10+
11+
var trace1 = {
12+
x: [
13+
['SF Zoo','SF Zoo','SF Zoo'],
14+
['giraffes', 'orangutans', 'monkeys']
15+
],
16+
y: [20, 14, 23],
17+
name: 'SF Zoo',
18+
type: 'bar'
19+
};
20+
21+
var trace2 = {
22+
x: [
23+
['LA Zoo','LA Zoo','LA Zoo'],
24+
['giraffes', 'orangutans', 'monkeys']
25+
],
26+
y: [12, 18, 29],
27+
name: 'LA Zoo',
28+
type: 'bar'
29+
};
30+
31+
var data = [trace1, trace2];
32+
var layout = {
33+
showlegend: false,
34+
xaxis: {
35+
tickson: "boundaries",
36+
ticklen: 15,
37+
showdividers: true,
38+
dividercolor: 'grey',
39+
dividerwidth: 2
40+
}
41+
};
42+
43+
Plotly.newPlot('myDiv', data, layout);

_posts/plotly_js/layout/axes/2017-10-03-axes-subcategories.html

Lines changed: 0 additions & 145 deletions
This file was deleted.

0 commit comments

Comments
 (0)