Reputation: 574
I'm developing a line chart using QML with qt creator and I'd like to add a character appended to every axis label: example I want to display °C appended to the numeber 15 which is on the axis x (final result: 15°C).
I tried using this QML code
ValueAxis {
min: 0;
max: 100;
labelFormat: "%d%1".arg("°C)
}
The result is 15?C.
Does someone help me to solve this problem? Many thanks in advance!
Upvotes: 1
Views: 3344
Reputation: 2380
From the QML example
ValueAxis {
min: 0;
max: 100;
labelFormat: "%d°C" // this formats label as 1°C
}
Upvotes: 3