plotly js bar chart x axis labels orientation

Solutions on MaxInterview for plotly js bar chart x axis labels orientation by the best coders in the world

showing results for - "plotly js bar chart x axis labels orientation"
Sara
02 Sep 2020
1var trace1 = {
2  x: ['2000-01-01', '2000-01-02', '2000-01-03', '2000-01-04', '2000-01-05', '2000-01-06', '2000-01-07', '2000-01-08', '2000-01-09', '2000-01-10', '2000-01-11', '2000-01-12', '2000-01-13', '2000-01-14', '2000-01-15', '2000-01-16', '2000-01-17', '2000-01-18', '2000-01-19', '2000-01-20', '2000-01-21', '2000-01-22', '2000-01-23', '2000-01-24', '2000-01-25', '2000-01-26', '2000-01-27', '2000-01-28', '2000-01-29', '2000-01-30', '2000-01-31'],
3  y: [4.3, 8.2, 4.1, 5.6, -3, -0.2, 0.3, 0.4, 4.1, 5, 4.6, -0.2, -8.5, -9.1, -2.7, -2.7, -17, -11.3, -5.5, -6.5, -16.9, -12, -6.1, -6.6, -7.9, -10.8, -14.8, -11, -4.4, -1.3, -1.1],
4  mode: 'lines',
5  type: 'scatter',
6  name: '2000'
7};
8
9var data = [ trace1 ];
10
11var layout = {
12  xaxis: {
13    type: 'date',
14    title: 'January Weather'
15  },
16  yaxis: {
17    title: 'Daily Mean Temperature'
18  },
19  title:'2000 Toronto January Weather'
20};
21
22Plotly.newPlot('myDiv', data, layout);
23