iwbnwif / wxFreeChart

This is a clone (not fork) of the pbfordev/wxFreeChart repository. It has their original fixes to the the wxCode version.
Other
37 stars 21 forks source link

Logarithimic labels with a value < 1 are drawn incorrectly. #4

Closed iwbnwif closed 7 years ago

iwbnwif commented 8 years ago

From @iwbnwif on April 17, 2016 11:32

There is what looks like a bug in LogarithmicNumberAxis::GetLabel that causes the sign of the exponent to be removed.

This happens because of the lines:

    if (m_logBase == 10.0 && !m_longExponent) {
        label.erase(label.length() - 3, 1);
    }

I think that the problem is because exponents on Linux are 2 digits + sign whereas on Windows they are 3 digits + sign. Therefore on Linux the sign is removed rather than the most significant digit.

Copied from original issue: pbfordev/wxFreeChart#5

iwbnwif commented 7 years ago

This should already be fixed. The closure doesn't appear to have been copied across from the pbfordev github site.