mirror of https://github.com/qt/qtgraphs.git
Update GraphsView documentation
Update the GraphsTheme changes and axis locations.
Task-number: QTBUG-130649
Change-Id: I35c4abcc68b5fd17866f06059d1eff356601c6fd
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
(cherry picked from commit 28b42fcdd6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
0165fbdfe2
commit
0b832fd03e
Binary file not shown.
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 14 KiB |
|
|
@ -168,23 +168,25 @@ import QtGraphs
|
||||||
|
|
||||||
GraphsView {
|
GraphsView {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
theme: GraphTheme {
|
theme: GraphsTheme {
|
||||||
colorTheme: GraphTheme.ColorThemeDark
|
colorScheme: GraphsTheme.ColorScheme.Dark
|
||||||
gridMajorBarsColor: "#ccccff"
|
seriesColors: ["#E0D080", "#B0A060"]
|
||||||
gridMinorBarsColor: "#eeeeff"
|
borderColors: ["#807040", "#706030"]
|
||||||
axisYMajorColor: "#ccccff"
|
grid.mainColor: "#ccccff"
|
||||||
axisYMinorColor: "#eeeeff"
|
grid.subColor: "#eeeeff"
|
||||||
|
axisY.mainColor: "#ccccff"
|
||||||
|
axisY.subColor: "#eeeeff"
|
||||||
|
}
|
||||||
|
axisX: BarCategoryAxis {
|
||||||
|
categories: ["2023", "2024", "2025"]
|
||||||
|
lineVisible: false
|
||||||
|
}
|
||||||
|
axisY: ValueAxis {
|
||||||
|
min: 0
|
||||||
|
max: 10
|
||||||
|
subTickCount: 4
|
||||||
}
|
}
|
||||||
BarSeries {
|
BarSeries {
|
||||||
axisX: BarCategoryAxis {
|
|
||||||
categories: ["2023", "2024", "2025"]
|
|
||||||
lineVisible: false
|
|
||||||
}
|
|
||||||
axisY: ValueAxis {
|
|
||||||
min: 0
|
|
||||||
max: 10
|
|
||||||
minorTickCount: 4
|
|
||||||
}
|
|
||||||
BarSet {
|
BarSet {
|
||||||
values: [7, 6, 9]
|
values: [7, 6, 9]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -799,7 +799,7 @@ void QGraphsView::clearSeriesFunc(QQmlListProperty<QObject> *list)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty GraphTheme GraphsView::theme
|
\qmlproperty GraphsTheme GraphsView::theme
|
||||||
The theme used by the graph. Determines coloring,
|
The theme used by the graph. Determines coloring,
|
||||||
axis lines, fonts etc. If theme has not been set,
|
axis lines, fonts etc. If theme has not been set,
|
||||||
the default theme is used.
|
the default theme is used.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue