import QtQuick
import QtGraphs
Window {
id: root
width: 1280
height: 960
visible: true
title: qsTr("Graphs 3D - Bar Graph")
Bars3D {
id: barGraph
anchors.fill: parent
theme: GraphsTheme {
theme: GraphsTheme.Theme.UserDefined
baseColors: ["red"]
}
Bar3DSeries {
id: barSeries
ItemModelBarDataProxy {
itemModel: dataModel
columnRole: "xPos"
rowRole: "zPos"
valueRole: "yPos"
}
}
}
ListModel {
id: dataModel
Component.onCompleted: {
for (let i = -10; i <= 10; ++i) {
for (let j = -10; j <= 10; ++j) {
dataModel.append({"xPos": i, "yPos": (i + j), "zPos": j})
}
}
}
}
}