0
Я чувствую, как ив попробовал все, но ничего не похоже на работу:Plotly установить цвет
var charData = [{
x: x1,
y: y,
type: 'bar',
color: 'rgb(31,119,180)',
orientation: 'h',
name: 'Nuværende',
bar: {
color: 'rgb(rgb(31, 114, 225)'
}
}, {
x: x2,
y: y,
type: 'bar',
orientation: 'h',
name: 'Forventet'
}],
layout = {
title: 'Brugere',
barmode: 'stack',
legend: {
orientation: 'h'
}
};
Plotly.newPlot(area,charData,layout);
Ive также пытались:
var charData = [{
x: x1,
y: y,
type: 'bar',
color: 'rgb(31,119,180)',
orientation: 'h',
name: 'Nuværende',
color: '#23b7e5'
}, {
x: x2,
y: y,
type: 'bar',
orientation: 'h',
name: 'Forventet'
}],
layout = {
title: 'Brugere',
barmode: 'stack',
legend: {
orientation: 'h'
}
};
Plotly.newPlot(area,charData,layout);
Однако карта остается с по умолчанию цвета.
Так как я могу изменить цвета с помощью Plotly?