我正在plotly.js 中使用等值线图。有没有办法让颜色条比例在图表底部水平显示,而不是沿右侧或左侧垂直显示?
作为参考,请查看 Plotly 站点上给出的第一个示例https://plot.ly/javascript/choropleth-maps/#world-choropleth-map-robinson-projection
谢谢你!
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});
});
不幸的是,没有。2016 年 4 月 15 日,Github 上已经记录了一个关于它的错误
https://github.com/plotly/plotly.js/issues/1244
我没有看到任何进展。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)