Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.12.7
-
None
Description
when we use localizeNumbers without labelformat or use labelformat without localizeNumbers every things is ok, but when we usr both of them in same time on a chartview and axis chartview can not show axis numbers.
according to qtcharts/chartaxiselement.cpp there is two regex for localizeNumbers and normal case.
normal case --> labelFormatMatchString = "%\\-\\+#\\s\\d\\.\\'lhjztL*([dicuoxfegXFEG])"
localizeNumbers --> labelFormatMatchLocalizedString = "^([^%])%\\.(
d+)([defgiEG])(.)$"
and in first match string printf signature string like "%d" is valid
but in second match string "%d" is not valid.
what is problem ?
why "%d" is not valid input in localizeNumber and what is valid string to show int values without decimal point and fraction values ?
sample code :
in blow code problem occur
ChartView
{ id: chart legend.visible: false margins\{bottom: 0; left: 0; right: 0; top: 0;}locale: Qt.locale("en_EN")
antialiasing: true
localizeNumbers: true
ValueAxis
{ labelFormat: "%d"}}