plotly / plotly/plotly.js

Feature Request: Add vertical spacing option between plot and rangeslider

オープン
#7,510 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

feature P3
主要言語
JavaScript
スター
18.3k
フォーク
2k
平均マージ
2日 12時間
マージ済み PR(30日)
28

説明

Hi Plotly team ,

I'm working with rangeslider in a dual-axis layout (xaxis + xaxis2, yaxis2), and I’d like to request a feature that allows more control over the vertical spacing between the plot area and the rangeslider.

In the current setup, the rangeslider always appears directly below the main plot and sometimes the labels are inside the rangeslider.

Screenshot of plotly figure

The definition of the layout is:

function staticLayout(): object {
  
  return {
    margin: {l: 70, r: 20, t: 10, b: 20},
    showlegend: true,
    legend: {
      orientation: 'h',
      x: 0,
      y: 1.02,
      yanchor: 'bottom',
    },
    xaxis: {
      domain: [0.0, 1.0],
      anchor: 'y',     
      side: 'bottom',    
      title: {
        text: 'Time (s)',
        standoff: 15
      },
      automargin: true,
      rangeslider: {
        visible: true,
        thickness: 0.07,
        bgcolor: "#f5f5f5",
        bordercolor: "black",
        borderwidth: 1,
      },
      showticklabels: false,
      showgrid: false,
      zeroline: false,
      fixedrange: true,
    },
    yaxis: {
      visible: false,
      showticklabels: false,
      showgrid: false,
      zeroline: false,
      showline: false,
      overlaying: 'y2',
    },
    xaxis2: {
      anchor: 'y2',      
      side: 'bottom',    
      // type: 'log',
      ticklabelposition: 'outside',
    },
    yaxis2: {
      anchor: 'x2',
      zeroline: false,
      showticklabels: true,
      ticklabelposition: 'outside',
    }
  };
}

How can I fix the spacing?

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、xaxis.rangeslider を使った、提示された2軸レイアウトと、スクリーンショットにあるラベルの重なり方を再現します。次に、プロットと rangeslider の間隔がどこで決まるかを追跡し、要求された間隔オプションを定義して、例でプロットと rangeslider が分離され、ラベルがその内部に配置されないことを検証します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
data-visualization
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。