<small id='Js34a'></small><noframes id='Js34a'>

<tfoot id='Js34a'></tfoot>

    • <bdo id='Js34a'></bdo><ul id='Js34a'></ul>
    1. <legend id='Js34a'><style id='Js34a'><dir id='Js34a'><q id='Js34a'></q></dir></style></legend>
      <i id='Js34a'><tr id='Js34a'><dt id='Js34a'><q id='Js34a'><span id='Js34a'><b id='Js34a'><form id='Js34a'><ins id='Js34a'></ins><ul id='Js34a'></ul><sub id='Js34a'></sub></form><legend id='Js34a'></legend><bdo id='Js34a'><pre id='Js34a'><center id='Js34a'></center></pre></bdo></b><th id='Js34a'></th></span></q></dt></tr></i><div id='Js34a'><tfoot id='Js34a'></tfoot><dl id='Js34a'><fieldset id='Js34a'></fieldset></dl></div>

      是否可以在 plotly.js 中有一个水平颜色条

      时间:2023-09-30

    2. <tfoot id='UUVlz'></tfoot>
    3. <i id='UUVlz'><tr id='UUVlz'><dt id='UUVlz'><q id='UUVlz'><span id='UUVlz'><b id='UUVlz'><form id='UUVlz'><ins id='UUVlz'></ins><ul id='UUVlz'></ul><sub id='UUVlz'></sub></form><legend id='UUVlz'></legend><bdo id='UUVlz'><pre id='UUVlz'><center id='UUVlz'></center></pre></bdo></b><th id='UUVlz'></th></span></q></dt></tr></i><div id='UUVlz'><tfoot id='UUVlz'></tfoot><dl id='UUVlz'><fieldset id='UUVlz'></fieldset></dl></div>
      <legend id='UUVlz'><style id='UUVlz'><dir id='UUVlz'><q id='UUVlz'></q></dir></style></legend>
        <bdo id='UUVlz'></bdo><ul id='UUVlz'></ul>

                <tbody id='UUVlz'></tbody>

              <small id='UUVlz'></small><noframes id='UUVlz'>

              • 本文介绍了是否可以在 plotly.js 中有一个水平颜色条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在使用 plotly.js 中的等值线图表.有没有办法让颜色条比例在图表底部水平显示,而不是在右侧或左侧垂直显示?

                I am working with choropleth charts in plotly.js. Is there a way to get the colorbar scale to display horizontally at the bottom of the chart instead of vertically along the right or left sides?

                作为参考,请查看 Plotly 网站上给出的第一个示例 https://plot.ly/javascript/choropleth-maps/#world-choropleth-map-robinson-projection

                For reference, check out the first example given at the Plotly site 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 上已经有一个关于它的错误记录

                Unfortunately No. There is already a bug logged about it on Github on Apr 15, 2016

                https://github.com/plotly/plotly.js/issues/1244

                我没有看到任何进展.

                这篇关于是否可以在 plotly.js 中有一个水平颜色条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:plotly js:如何仅在加载绘图图像后运行我的 javascript 下一篇:修复标题在两行上拆分时的 plotly ggplotly() 标题重叠图

                相关文章

                <tfoot id='fEr6S'></tfoot>

                1. <legend id='fEr6S'><style id='fEr6S'><dir id='fEr6S'><q id='fEr6S'></q></dir></style></legend>

                  1. <i id='fEr6S'><tr id='fEr6S'><dt id='fEr6S'><q id='fEr6S'><span id='fEr6S'><b id='fEr6S'><form id='fEr6S'><ins id='fEr6S'></ins><ul id='fEr6S'></ul><sub id='fEr6S'></sub></form><legend id='fEr6S'></legend><bdo id='fEr6S'><pre id='fEr6S'><center id='fEr6S'></center></pre></bdo></b><th id='fEr6S'></th></span></q></dt></tr></i><div id='fEr6S'><tfoot id='fEr6S'></tfoot><dl id='fEr6S'><fieldset id='fEr6S'></fieldset></dl></div>

                    <small id='fEr6S'></small><noframes id='fEr6S'>

                      <bdo id='fEr6S'></bdo><ul id='fEr6S'></ul>