ScatterSeries QML Type
El tipo ScatterSeries presenta los datos en gráficos de dispersión. Más...
| Import Statement: | import QtCharts 2.11 |
| In C++: | QScatterSeries |
| Inherits: |
Propiedades
- borderColor : color
- borderWidth : real
- brush : brush
- brushFilename : string
- count : int
- markerShape : enumeration
- markerSize : real
Descripción detallada
Los datos de dispersión se muestran como una colección de puntos en el gráfico. Para cada punto se especifican dos valores que determinan su posición en el eje horizontal y en el eje vertical.

El siguiente código QML muestra cómo crear un gráfico con dos series de dispersión simples:
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 } } }
Para más información, consulte Gráficos con la Galería QML.
Documentación de propiedades
borderColor : color
El color utilizado para dibujar los bordes del marcador.
borderWidth : real
La anchura de la línea de borde. Por defecto, la anchura es de 2,0.
brush : brush
El pincel utilizado para dibujar los marcadores de las series de dispersión.
brushFilename : string
El nombre del archivo utilizado como pincel para la serie.
count : int
El número de puntos de datos de la serie.
markerShape : enumeration
La forma utilizada al representar los elementos de marcador:
| Constante | Descripción |
|---|---|
ScatterSeries.MarkerShapeCircle | El marcador es un círculo. Este es el valor por defecto. |
ScatterSeries.MarkerShapeRectangle | El marcador es un rectángulo. |
markerSize : real
El tamaño del marcador utilizado para representar los puntos de la 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.