Legend QML Type

차트의 범례를 표시합니다. 더 보기...

Import Statement: import QtCharts 2.8
In C++: QLegend

속성

상세 설명

범례는 차트의 범례를 표시하는 그래픽 개체입니다. 범례 상태는 시리즈가 변경될 때 ChartView 유형에 의해 업데이트됩니다. Legend 유형 속성은 ChartView 유형에 첨부할 수 있습니다. 예를 들어

ChartView {
    legend.visible: true
    legend.alignment: Qt.AlignBottom
    // Add a few series...
}

참고: 범례 마커를 수정하는 데 사용할 수 있는 QML API는 없습니다. 사용자 지정 범례를 만들어 마커를 수정할 수 있습니다. 자세한 내용은 범례 마커 사용하기를 참조하세요.

속성 문서

alignment : alignment

범례가 차트에 정렬되는 방식을 정의합니다. Qt.AlignLeft , Qt.AlignRight, Qt.AlignBottom, 또는 Qt.AlignTop. 플래그를 두 개 이상 설정하면 결과가 정의되지 않습니다.


backgroundVisible : bool

범례 배경을 표시할지 여부입니다.


borderColor : color

범례의 선 색상입니다.


color : color

범례의 배경(브러시) 색상입니다.


font : Font

범례에 사용되는 마커의 글꼴입니다.


labelColor : color

레이블을 그리는 데 사용되는 브러시 색상입니다.


markerShape : enumeration

범례 마커의 기본 모양입니다. 기본값은 MarkerShapeRectangle 입니다.

상수설명
Legend.MarkerShapeRectangle범례 마커는 직사각형입니다.
Legend.MarkerShapeCircle범례 마커는 원형
MarkerShapeRotatedRectangle범례 마커는 회전된 직사각형 모양입니다.
MarkerShapeTriangle범례 마커는 삼각형입니다.
MarkerShapeStar범례 마커는 별 모양입니다.
MarkerShapePentagon범례 마커는 오각형 모양입니다.
Legend.MarkerShapeFromSeries범례 마커 모양은 시리즈에 따라 결정됩니다.

QLegend::MarkerShape참조하십시오 .


reverseMarkers : bool

범례의 마커에 역순을 사용할지 여부입니다. 이 속성은 기본적으로 false 입니다.


showToolTips : bool

텍스트가 잘릴 때 도구 설명을 표시할지 여부입니다. 이 속성은 기본적으로 false 입니다. 현재 QML에서는 도구 설명이 지원되지 않으므로 이 속성은 효과가 없습니다.


visible : bool

범례 표시 여부.

기본적으로 이 속성은 true 입니다.

QGraphicsObject::visible참조하세요 .


© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.