@@ -107,6 +107,7 bool Axis::createLabels(QStringList &labels,qreal min, qreal max,int ticks) cons | |||||
107 |
|
107 | |||
108 | if (!category) { |
|
108 | if (!category) { | |
109 | int n = qMax(int(-floor(log10((max-min)/(ticks-1)))),0); |
|
109 | int n = qMax(int(-floor(log10((max-min)/(ticks-1)))),0); | |
|
110 | n++; | |||
110 | for (int i=0; i< ticks; i++) { |
|
111 | for (int i=0; i< ticks; i++) { | |
111 | qreal value = min + (i * (max - min)/ (ticks-1)); |
|
112 | qreal value = min + (i * (max - min)/ (ticks-1)); | |
112 | labels << QString::number(value,'f',n); |
|
113 | labels << QString::number(value,'f',n); |
General Comments 0
You need to be logged in to leave comments.
Login now