Ich arbeite mit Choropleth Charts in plotly.js. Gibt es eine Möglichkeit, die Farbbalkenskala horizontal am unteren Rand des Diagramms anstatt vertikal entlang der rechten oder linken Seite anzuzeigen?Ist es möglich, einen horizontalen Farbbalken in plotly.js zu haben
Als Referenz überprüft das erste Beispiel am Standort Plotly ausgegeben https://plot.ly/javascript/choropleth-maps/#world-choropleth-map-robinson-projection
Thank you!
Plotly.d3.csv('https://raw.githubusercontent.com/plotly/datasets/master/2010_alcohol_consumption_by_country.csv', function(err, rows){
function unpack(rows, key) {
return rows.map(function(row) { return row[key]; });
}
var data = [{
type: 'choropleth',
locationmode: 'country names',
locations: unpack(rows, 'location'),
z: unpack(rows, 'alcohol'),
text: unpack(rows, 'location'),
autocolorscale: true
}];
var layout = {
title: 'Pure alcohol consumption among adults (age 15+) in 2010',
geo: {
projection: {
type: 'robinson'
}
}
};
Plotly.plot(myDiv, data, layout, {showLink: false});
});