Python Plotly-Dash는 체크리스트에서 "인라인"을 제거하여 항목이 별도의 행에 있도록합니다.

션 맥카시

저는 Plotly의 Dash 라이브러리를 사용하여 체크리스트를 만들고 각 항목이 자체 라인에 있기를 원하지만 방법을 알 수 없습니다. 아래 이미지에서 "Delta P (PSI)"와 "Horsepower"가 동일한 라인에 있음을 알 수 있습니다.

어떤 아이디어? 내 코드는 다음과 같습니다.

import dash
import dash_html_components as html
import dash_core_components as dcc

# Items to chart (checklist), based on unit type
html.Label('Items to Chart'), 

dcc.Checklist(

    options = [
        {'label': 'Delta P (PSI)', 'value': 'dtp'},
        {'label': 'Horsepower', 'value': 'hpe'},
        {'label': 'Hydraulic temp (C)', 'value': 'ht_egas'},
    ], 

    # What to use for className???
    className="checkbox or something..."
),

여기에 이미지 설명 입력

션 맥카시

나는 그것을 알아:

labelStyle = dict(display='block') # not 'inline'

https://dash.plot.ly/dash-core-components/checklist

import dash
import dash_html_components as html
import dash_core_components as dcc

# Items to chart (checklist), based on unit type
html.Label('Items to Chart'), 

dcc.Checklist(

    options = [
        {'label': 'Delta P (PSI)', 'value': 'dtp'},
        {'label': 'Horsepower', 'value': 'hpe'},
        {'label': 'Hydraulic temp (C)', 'value': 'ht_egas'},
    ], 

    labelStyle = dict(display='block')
),

여기에 이미지 설명 입력

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

Related 관련 기사

뜨겁다태그

보관