GraphsTheme QML Type
그래프를 위한 시각적 스타일입니다. 더 보기...
| Import Statement: | import QtGraphs |
| In C++: | QGraphsTheme |
- 상속된 멤버를 포함한 모든 멤버 목록
- 그래프 테마는 Qt Graphs QML 공통 유형의 일부입니다.
속성
- GraphsLine.labelTextColor : color
- GraphsLine.mainColor : color
- GraphsLine.mainWidth : real
- GraphsLine.subColor : color
- GraphsLine.subWidth : real
- axisX : GraphsLine
- axisXLabelFont : font
- axisY : GraphsLine
- axisYLabelFont : font
- axisZ : GraphsLine
- axisZLabelFont : font
- backgroundColor : color
- backgroundVisible : bool
- baseColors : list<Color>
- baseGradients : list<Gradient>
- borderColors : list<color>
- colorScheme : QGraphsTheme::ColorScheme
- colorStyle : GraphsTheme.ColorStyle
- grid : GraphsLine
- gridVisible : bool
- labelBackgroundColor : color
- labelBackgroundVisible : bool
- labelBorderVisible : bool
- labelFont : font
- labelTextColor : color
- labelsVisible : bool
- multiHighlightColor : color
- multiHighlightGradient : Gradient
- plotAreaBackgroundColor : color
- plotAreaBackgroundVisible : bool
- seriesColors : list<color>
- singleHighlightColor : color
- singleHighlightGradient : Gradient
- theme : GraphsTheme.Theme
상세 설명
이 유형은 전체 그래프에 영향을 주는 시각적 속성을 지정하는 데 사용됩니다. 여러 가지 기본 제공 테마를 그대로 사용하거나 자유롭게 수정할 수 있습니다.
테마는 GraphsTheme.Theme.UserDefined 열거형 값을 사용하여 처음부터 새로 만들 수 있습니다.
테마 커스터마이징하기
기본 테마는 QtGreen이지만 각 속성을 사용자 정의할 수 있습니다.
다음 표에는 테마로 제어되는 속성과 QGraphsTheme.Theme.UserDefined 의 기본값이 나열되어 있습니다.
| 속성 | 기본값 |
|---|---|
| backgroundVisible | true |
| seriesColors | Qt::black |
| baseGradients | QLinearGradient. 기본적으로 완전히 검은색입니다. |
| colorStyle | Uniform |
| labelFont | QFont |
| gridVisible | true |
| labelBackgroundVisible | true |
| labelBorderVisible | true |
| labelsVisible | true |
사용 예
기본 제공 테마를 수정하지 않고 사용:
Scatter3D { theme: GraphsTheme { theme: GraphsTheme.Theme.YellowSeries } ...
기본 제공 테마를 사용하고 일부 속성을 수정합니다:
Bars3D { theme: GraphsTheme { theme: GraphsTheme.Theme.QtGreenNeon labelBorderVisible: true labelFont.pointSize: 35 labelBackgroundVisible: false } ...
사용자 정의 테마 사용:
Surface3D { theme: GraphsTheme { theme: GraphsTheme.Theme.UserDefined backgroundColor: "red" backgroundVisible: true seriesColors: ["blue"] colorStyle: GraphsTheme.ColorStyle.Uniform labelFont.family: "Lucida Handwriting" labelFont.pointSize: 35 gridVisible: false grid.mainColor: "red" grid.subColor: "blue" labelBackgroundColor: "black" labelBackgroundVisible: true labelBorderVisible: false labelTextColor: "white" multiHighlightColor: "green" singleHighlightColor: "darkRed" } ...
그래프 테마 열거형은 GraphsTheme::colorStyle 및 GraphsTheme::theme 을 참조하세요.
속성 문서
GraphsLine.labelTextColor : color
레이블에 사용되는 텍스트의 색상입니다. 기본값은 colorScheme 에 따라 달라집니다.
GraphsLine.mainColor : color
메인 라인의 색상입니다. 기본값은 colorScheme 에 따라 다릅니다.
GraphsLine.mainWidth : real
주 줄의 너비입니다. 기본값은 2.0 입니다.
격자 선으로 설정된 경우 GraphsItem3D::gridLineType 인 경우에만 적용됩니다. Graphs3D.GridLineType.Shader
Graphs3D.GridLineType 를참조하세요 .
GraphsLine.subColor : color
하위 줄의 색상입니다. 기본값은 colorScheme 에 따라 다릅니다.
GraphsLine.subWidth : real
하위 줄의 너비입니다. 기본값은 1.0 입니다.
격자선에 대해 설정된 경우 GraphsItem3D::gridLineType 인 경우에만 적용됩니다. Graphs3D.GridLineType.Shader
Graphs3D.GridLineType 를참조하세요 .
axisX : GraphsLine
X축의 GraphsLine 을 보유합니다.
GraphsLine.mainColor, GraphsLine.subColor, GraphsLine.mainWidth, GraphsLine.subWidth, GraphsLine.labelTextColor도 참조하세요 .
axisXLabelFont : font
axisX 에서 레이블에 사용할 글꼴을 설정합니다.
axisY : GraphsLine
Y축의 GraphsLine 을 보유합니다.
GraphsLine.mainColor, GraphsLine.subColor, GraphsLine.mainWidth, GraphsLine.subWidth, GraphsLine.labelTextColor도 참조하세요 .
axisYLabelFont : font
axisY 에서 레이블에 사용할 글꼴을 설정합니다.
axisZ : GraphsLine
Z축의 GraphsLine 을 보유합니다.
GraphsLine.mainColor, GraphsLine.subColor, GraphsLine.mainWidth, GraphsLine.subWidth, GraphsLine.labelTextColor도 참조하세요 .
axisZLabelFont : font
axisZ 에서 레이블에 사용할 글꼴을 설정합니다.
backgroundColor : color
그래프가 그려지는 보기의 색상입니다. 기본값은 colorScheme 에 따라 다릅니다.
backgroundVisible : bool
backgroundColor 값을 사용하여 뷰 배경을 그릴지 여부를 정의합니다. 기본값은 true 입니다.
baseColors : list<Color> [read-only]
그래프의 모든 개체에 사용할 색상 유형의 기본 색상 목록으로, 계열별로 나열됩니다. 색보다 계열이 많은 경우 색 목록이 래핑되고 목록의 첫 번째 색으로 다시 시작됩니다. colorStyle 이 GraphsTheme.ColorStyle.Uniform 이 아닌 경우 즉시 적용되지 않습니다.
사용 예시:
baseColors: [ Color { color: "red" } ]계열에 Abstract3DSeries.baseColor 을 명시적으로 설정하여 재정의할 수 있습니다.
baseGradients : list<Gradient> [read-only]
그래프의 모든 개체에 사용할 기본 그라데이션 목록으로, 계열별로 나열됩니다. 그라데이션보다 많은 계열이 있는 경우 그라데이션 목록이 래핑되고 목록의 첫 번째 그라데이션부터 다시 시작됩니다.
colorStyle 가 GraphsTheme.ColorStyle.Uniform 인 경우 즉시 적용되지 않습니다.
사용 예시:
baseGradients: [ Gradient {
GradientStop { position: 1.0; color: "#DBEB00" }
GradientStop { position: 0.0; color: "#373F26" }
} ]계열에 Abstract3DSeries.baseGradient 을 명시적으로 설정하여 이 값을 재정의할 수 있습니다.
borderColors : list<color>
그래프의 모든 개체에 사용할 테두리 색상을 계열별로 나열한 목록입니다.
계열이 색상보다 많으면 색상 목록이 래핑되고 목록의 첫 번째 색상으로 다시 시작됩니다.
colorStyle 이 유니폼이 아닌 경우 즉시 적용되지 않습니다.
colorScheme : QGraphsTheme::ColorScheme
사용 중인 그래프의 색 구성표입니다.
QGraphsTheme::ColorScheme도 참조하세요 .
colorStyle : GraphsTheme.ColorStyle
그래프 색상의 스타일입니다. QGraphsTheme::ColorStyle 열거형 값 중 하나입니다.
이 값은 시리즈에서 Abstract3DSeries.colorStyle 을 명시적으로 설정하여 재정의할 수 있습니다.
참고: 이 속성은 2D용 Qt Graphs 에는 영향을 미치지 않습니다.
QGraphsTheme::ColorStyle 를참조하세요 .
grid : GraphsLine
GraphsLine 테마를 보유합니다.
GraphsLine.mainColor, GraphsLine.subColor, GraphsLine.mainWidth, GraphsLine.subWidth, GraphsLine.labelTextColor도 참조하세요 .
gridVisible : bool
격자선 그리기 여부를 정의합니다. 이 값은 모든 격자선에 영향을 줍니다. 기본값은 true 입니다.
labelBackgroundColor : color
레이블 배경의 색상입니다. labelBackgroundVisible 이 false 인 경우 영향을 미치지 않습니다. 기본값은 colorScheme 에 따라 달라집니다.
labelBackgroundVisible : bool
레이블을 labelBackgroundColor (알파 포함)를 사용하는 배경으로 그릴지, 아니면 완전히 투명한 배경으로 그릴지 정의합니다. 배경이 있는 레이블은 가장 긴 레이블을 기준으로 축마다 동일한 크기로 그려지며 텍스트가 중앙에 배치됩니다. 배경이 없는 레이블은 그대로 그려지며 그래프에서의 위치에 따라 왼쪽 또는 오른쪽으로 정렬됩니다. 기본값은 true 입니다.
labelBorderVisible : bool
배경이 있는 레이블에 레이블 테두리를 그릴지 여부를 정의합니다. labelBackgroundVisible 이 false 인 경우 영향을 미치지 않습니다. 기본값은 true 입니다.
labelFont : font
레이블에 사용할 글꼴을 설정합니다.
labelTextColor : color
레이블에 사용되는 글꼴의 색상입니다.
축에 labelTextColor 을 명시적으로 지정한 경우 이 값은 적용되지 않습니다.
기본값은 colorScheme 에 따라 달라집니다.
labelsVisible : bool
레이블을 그릴지 여부를 정의합니다. false 인 경우 다른 모든 레이블 속성은 영향을 미치지 않습니다. 기본값은 true 입니다.
multiHighlightColor : color
선택한 객체의 강조 표시 색상입니다. selectionMode 에 Graphs3D.SelectionFlag.Row 또는 Graphs3D.SelectionFlag.Column 플래그가 설정된 경우 사용됩니다. 기본값은 colorScheme 에 따라 다릅니다.
Graphs3D.SelectionFlag 를참조하세요 .
multiHighlightGradient : Gradient
선택한 객체의 강조 그라데이션입니다. selectionMode 에 Graphs3D.SelectionFlag.Row 또는 Graphs3D.SelectionFlag.Column 플래그가 설정된 경우 사용됩니다. 기본값은 colorScheme 에 따라 다릅니다.
Graphs3D.SelectionFlag 를참조하세요 .
plotAreaBackgroundColor : color
그래프 플롯 영역 배경의 색상입니다. 기본값은 colorScheme 에 따라 다릅니다.
plotAreaBackgroundVisible : bool
plotAreaBackgroundColor 값을 사용하여 플롯 영역 배경을 그릴지 여부를 정의합니다. 기본값은 true 입니다.
seriesColors : list<color>
그래프의 모든 개체에 사용할 색상을 계열별로 나열한 목록입니다. 계열이 색상보다 많으면 색상 목록이 래핑되고 목록의 첫 번째 색상부터 다시 시작됩니다. colorStyle 이 GraphsTheme.ColorStyle.Uniform 이 아닌 경우 즉시 적용되지 않습니다.
사용 예시:
seriesColors: [ "red" ]
계열에 Abstract3DSeries.baseColor 을 명시적으로 설정하여 재정의할 수 있습니다.
singleHighlightColor : color
선택한 객체의 강조 표시 색상입니다. selectionMode 에 Graphs3D.SelectionFlag.Item 플래그가 설정된 경우 사용됩니다. 기본값은 colorScheme 에 따라 다릅니다.
Graphs3D.SelectionFlag 를참조하세요 .
singleHighlightGradient : Gradient
선택한 객체의 하이라이트 그라데이션입니다. selectionMode 에 Graphs3D.SelectionFlag.Item 플래그가 설정된 경우 사용됩니다. 기본값은 colorScheme 에 따라 달라집니다.
Graphs3D.SelectionFlag 를참조하세요 .
theme : GraphsTheme.Theme
테마의 유형입니다. 유형이 설정되지 않은 경우 유형은 GraphsTheme.Theme.QtGreen 입니다. 항목이 구성된 후 테마 유형을 변경하면 테마의 다른 모든 속성이 미리 정의된 테마가 지정한 대로 변경됩니다. 그래프의 활성 테마의 테마 유형을 변경하면 첨부된 모든 시리즈도 새 테마를 사용하도록 재설정됩니다.
© 2026 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.