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 22 forks source link

Gridlines do not differentiate between major and minor ticks. #13

Closed iwbnwif closed 7 years ago

iwbnwif commented 7 years ago

There is a partial 'major' and 'minor' concept in LabelAxis, but the only real implementation is that labels are only drawn at 'major' intervals.

The implementation is in LabelAxis::DrawLabels where the modulo of the step is taken and compared with m_majorLabelStep to determine if the label is drawn or not.

If minor labels are defined as non-major labels, then the current implementation can be kept. However, the same comparison with m_majorLabelStep should be performed and either a major label pen or a minor label pen used to draw the gridline.

iwbnwif commented 7 years ago

Fixed by 9907aa3d which introduced methods for setting and getting the wxPen used for drawing the grid line labels.

LabelAxis::DrawLabels now uses the m_majorGridlinePen if a label is a major label and the m_minorGridlinePen otherwise.