Skip to content

Commit 3295f5a

Browse files
authored
Update 2015-04-09-axes-labels.html
1 parent 2975fd8 commit 3295f5a

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

_posts/plotly_js/layout/axes/2015-04-09-axes-labels.html

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Set and Style Axes Title Labels and Ticks
3-
plot_url: https://codepen.io/michaelbabyn/embed/KBMmov/?height=500&theme-id=15263&default-tab=result
3+
plot_url: https://codepen.io/plotly/embed/ZjOxXw/?height=500&theme-id=15263&default-tab=result
44
language: plotly_js
55
suite: axes
66
order: 0
@@ -12,15 +12,13 @@
1212

1313

1414
Plotly.d3.csv("https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv", function(err, rows){
15-
1615
function unpack(rows, key) {
1716
return rows.map(function(row) { return row[key]; });
1817
}
1918

2019
var x = unpack(rows, 'Date')
2120
var y = unpack(rows, 'AAPL.Volume')
22-
23-
21+
2422
var trace = {
2523
type: "scatter",
2624
mode: "lines",
@@ -31,7 +29,8 @@
3129
}
3230

3331
var data = [trace];
34-
var layout = {
32+
33+
var layout = {
3534
title: 'Volume of Apple Shares Traded',
3635
xaxis: {
3736
title: 'AXIS TITLE',
@@ -41,7 +40,7 @@
4140
color: 'lightgrey'
4241
},
4342
showticklabels: true,
44-
tickangle: 45,
43+
tickangle: 'auto',
4544
tickfont: {
4645
family: 'Old Standard TT, serif',
4746
size: 14,
@@ -70,4 +69,4 @@
7069
};
7170

7271
Plotly.newPlot('myDiv', data, layout);
73-
})
72+
})

0 commit comments

Comments
 (0)