이 페이지에서

GraphsTheme QML Type

그래프를 위한 시각적 스타일. 더 보기...

Import Statement: import QtGraphs
In C++: QGraphsTheme

속성

상세 설명

이 유형은 그래프 전체에 영향을 미치는 시각적 속성을 지정하는 데 사용됩니다. 그대로 사용하거나 자유롭게 수정할 수 있는 몇 가지 기본 제공 테마가 있습니다.

GraphsTheme.Theme.UserDefined 열거형 값을 사용하여 테마를 처음부터 새로 만들 수도 있습니다.

테마 사용자 정의

기본 테마는 QtGreen이지만, 각 속성을 사용자 정의할 수 있습니다.

다음 표에는 테마로 제어되는 속성과 ` QGraphsTheme.Theme.UserDefined`의 기본값이 나열되어 있습니다.

사용 예

수정 없이 내장 테마를 사용하는 경우:

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 열거형에 대해서는 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]

그래프 내의 모든 개체에 사용될 Color 유형의 기본 색상 목록으로, 시계열별로 적용됩니다. 시계열 수가 색상 수보다 많을 경우, 색상 목록은 순환되어 목록의 첫 번째 색상부터 다시 시작됩니다. 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 가 Uniform이 아닌 경우, 이 설정은 즉시 적용되지 않습니다.

colorScheme : QGraphsTheme::ColorScheme

사용 중인 그래프의 색상 구성.

QGraphsTheme::ColorScheme도 참조하십시오 .

colorStyle : GraphsTheme.ColorStyle

그래프 색상의 스타일입니다. ` QGraphsTheme::ColorStyle ` 열거형 값 중 하나입니다.

이 값은 시계열(series)에서 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.