ScatterSeries QML Type
Il tipo ScatterSeries presenta i dati in grafici a dispersione. Maggiori informazioni...
| Import Statement: | import QtCharts 2.12 |
| In C++: | QScatterSeries |
| Inherits: | |
| Status: | Deprecated |
Questo tipo è deprecato. Si sconsiglia vivamente di utilizzarlo nel codice nuovo.
Proprietà
- borderColor : color
- borderWidth : real
- brush : brush
- brushFilename : string
- count : int
- markerShape : enumeration
- markerSize : real
Descrizione dettagliata
I dati del grafico a dispersione vengono visualizzati come un insieme di punti sul grafico. Per ciascun punto vengono specificati due valori che ne determinano la posizione sull'asse orizzontale e sull'asse verticale.

Il seguente codice QML mostra come creare un grafico con due semplici serie di dati a dispersione:
ChartView {
title: "Scatter Chart"
anchors.fill: parent
antialiasing: true
ScatterSeries {
id: scatter1
name: "Scatter A"
XYPoint { x: 1.5; y: 1.5 }
XYPoint { x: 1.5; y: 1.6 }
XYPoint { x: 1.57; y: 1.55 }
XYPoint { x: 1.8; y: 1.8 }
XYPoint { x: 1.9; y: 1.6 }
XYPoint { x: 2.1; y: 1.3 }
XYPoint { x: 2.5; y: 2.1 }
}
ScatterSeries {
name: "Scatter B"
XYPoint { x: 2.0; y: 2.0 }
XYPoint { x: 2.0; y: 2.1 }
XYPoint { x: 2.07; y: 2.05 }
XYPoint { x: 2.2; y: 2.9 }
XYPoint { x: 2.4; y: 2.7 }
XYPoint { x: 2.67; y: 2.65 }
}
}Per ulteriori informazioni, consultare la Galleria dei grafici con QML.
Documentazione delle proprietà
borderColor : color
Il colore utilizzato per disegnare i bordi dei marcatori.
borderWidth : real
La larghezza della linea di contorno. Per impostazione predefinita, la larghezza è 2,0.
brush : brush
Il pennello utilizzato per disegnare gli indicatori delle serie a dispersione.
brushFilename : string
Il nome del file utilizzato come pennello per la serie.
count : int
Il numero di valori della serie.
markerShape : enumeration
La forma utilizzata per il rendering degli elementi marcatori:
| Costante | Descrizione |
|---|---|
ScatterSeries.MarkerShapeCircle | L'indicatore è un cerchio. Questo è il valore predefinito. |
ScatterSeries.MarkerShapeRectangle | L'indicatore è un rettangolo. |
markerSize : real
La dimensione del marcatore utilizzato per rappresentare i punti della serie.
© 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.