이 페이지에서

ScatterSeries QML Type

ScatterSeries 유형은 데이터를 산점도로 표시합니다. 더 보기...

Import Statement: import QtGraphs
In C++: QScatterSeries
Inherits:

XYSeries

속성

상세 설명

산점도 데이터는 그래프 상에 점의 집합으로 표시됩니다. 각 점에 대해서는 수평축과 수직축상의 위치를 결정하는 두 개의 값이 지정됩니다.

격자 형태로 배열된 데이터 점이 포함된 산점도

GraphsView 내부에 ScatterSeries를 생성하여 산점도 데이터를 표현할 수 있습니다. 각 점의 x 및 y 값을 정의하는 XYPoints를 ScatterSeries의 자식 요소로 생성하여 데이터를 그래프에 추가할 수 있습니다.

GraphsView {
    anchors.fill: parent
    axisX: ValueAxis {
        max: 3
    }
    axisY: ValueAxis {
        max: 3
    }

    ScatterSeries {
        color: "#00ff00"
        XYPoint { x: 0.5; y: 0.5 }
        XYPoint { x: 1; y: 1 }
        XYPoint { x: 2; y: 2 }
        XYPoint { x: 2.5; y: 1.5 }
    }
}

GraphsView 의 자식으로 여러 개의 ScatterSeries를 추가하여 여러 개의 산점도 그래프를 생성할 수 있습니다. 이 경우 축을 정의하는 시리즈는 하나만 있어야 하며, 여러 정의가 있을 경우 이전 정의만 우선 적용됩니다.

GraphsView {
    anchors.fill: parent
    ScatterSeries {
        color: "#00ff00"
        axisX: ValueAxis {
            max: 3
        }
        axisY: ValueAxis {
            max: 3
        }

        XYPoint { x: 0.5; y: 0.5 }
        XYPoint { x: 1; y: 1 }
        XYPoint { x: 2; y: 2 }
        XYPoint { x: 2.5; y: 1.5 }
    }

    ScatterSeries {
        color: "#ff0000"
        XYPoint { x: 0.5; y: 3 }
        XYPoint { x: 1; y: 2 }
        XYPoint { x: 2; y: 2.5 }
        XYPoint { x: 2.5; y: 1 }
    }
}

속성 설명서

pointDelegate : Component

주어진 QML 컴포넌트로 포인트를 표시합니다.

pointDelegate: Image {
    source: "images/happy_box.png"
}

© 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.