In questa pagina

BarCategoryAxis QML Type

Aggiunge categorie agli assi di un grafico. Altro...

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

AbstractAxis

Status: Deprecated

Questo tipo è deprecato. Si sconsiglia vivamente di utilizzarlo nel nuovo codice.

Proprietà

Segnali

Metodi

Descrizione dettagliata

Il tipo BarCategoryAxis può essere configurato per visualizzare una linea d'asse con indici, linee di griglia e ombreggiature. Le categorie vengono tracciate tra gli indici. Può essere utilizzato anche con una serie di linee.

Il seguente frammento di codice QML illustra come utilizzare BarCategoryAxis:

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

Documentazione delle proprietà

categories : list<string>

Le categorie di un asse.

count : int [read-only]

Il numero di categorie di un asse.

max : string

Il valore massimo sull'asse.

min : string

Il valore minimo sull'asse.

Documentazione sul segnale

rangeChanged(string min, string max)

Questo segnale viene emesso quando il valore dell'asse “ min ” o “ max ” cambia.

Il gestore di segnale corrispondente è onRangeChanged.

Nota: il gestore corrispondente è onRangeChanged.

Documentazione sui metodi

void clear()

Rimuove tutte le categorie. Imposta i valori massimo e minimo dell'intervallo dell'asse su 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.