En esta página

BarCategoryAxis QML Type

Añade categorías a los ejes de un gráfico. Más...

Import Statement: import QtCharts 2.12
In C++: QBarCategoryAxis
Inherits:

AbstractAxis

Status: Deprecated

Este tipo está obsoleto. Recomendamos encarecidamente no utilizarlo en código nuevo.

Propiedades

Señales

Métodos

Descripción detallada

El tipo BarCategoryAxis se puede configurar para mostrar una línea de eje con marcas de escala, líneas de cuadrícula y sombreados. Las categorías se dibujan entre las marcas de escala. También se puede utilizar con una serie de líneas.

El siguiente fragmento de código QML ilustra cómo utilizar BarCategoryAxis:

ChartView {
    BarCategoryAxis {
        id: categoryAxis
        categories: ["Jan", "Feb", "Mar", "Apr", "May", "Jun" ]
    }
// Add a few series...
}

Documentación de propiedades

categories : list<string>

Las categorías de un eje.

count : int [read-only]

El número de categorías de un eje.

max : string

El valor máximo del eje.

min : string

El valor mínimo del eje.

Documentación de Signal

rangeChanged(string min, string max)

Esta señal se emite cuando cambia un valor de min o max del eje.

El controlador de señal correspondiente es onRangeChanged.

Nota: El controlador correspondiente es onRangeChanged.

Documentación del método

void clear()

Elimina todas las categorías. Establece los valores máximo y mínimo del rango del eje en QString::null.

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