File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
_posts/plotly_js/layout/axes Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
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
4
4
language: plotly_js
5
5
suite: axes
6
6
order: 0
12
12
13
13
14
14
Plotly.d3.csv("https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv", function(err, rows){
15
-
16
15
function unpack(rows, key) {
17
16
return rows.map(function(row) { return row[key]; });
18
17
}
19
18
20
19
var x = unpack(rows, 'Date')
21
20
var y = unpack(rows, 'AAPL.Volume')
22
-
23
-
21
+
24
22
var trace = {
25
23
type: "scatter",
26
24
mode: "lines",
31
29
}
32
30
33
31
var data = [trace];
34
- var layout = {
32
+
33
+ var layout = {
35
34
title: 'Volume of Apple Shares Traded',
36
35
xaxis: {
37
36
title: 'AXIS TITLE',
41
40
color: 'lightgrey'
42
41
},
43
42
showticklabels: true,
44
- tickangle: 45 ,
43
+ tickangle: 'auto' ,
45
44
tickfont: {
46
45
family: 'Old Standard TT, serif',
47
46
size: 14,
70
69
};
71
70
72
71
Plotly.newPlot('myDiv', data, layout);
73
- })
72
+ })
You can’t perform that action at this time.
0 commit comments