Я работаю над линейной диаграммой с двумя осями у и пытаюсь показать данные по оси х в обратном порядке.
Мне кажется, что атрибут направления не работает.
оригинал - https://jsfiddle.net/api/post/library/pure/ вот мое изменение - https://jsfiddle.net/3m8vjows/
Я попытался указать направление оси x, как показано ниже.Но не работает.
var materialOptions = {
chart: {
title: 'Average Temperatures and Daylight in Iceland Throughout the Year'
},
width: 900,
height: 500,
series: {
// Gives each series an axis name that matches the Y-axis below.
0: {axis: 'Temps'},
1: {axis: 'Daylight'}
},
axes: {
// Adds labels to each axis; they don't have to match the axis names.
y: {
Temps: {label: 'Temps (Celsius)'},
Daylight: {label: 'Daylight'}
},
x:{direction:'-1'}
}
};