Opened 12 years ago
Closed 12 years ago
#10994 closed defect (fixed)
Chart2D axis labels misaligned when first label is empty string
Reported by: | davec | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | high | Milestone: | 1.5 |
Component: | Charting | Version: | 1.4.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
The function _groupLabelWidth() in the Axis2D default attempts to measure the maximum label width by concatenating the labels together with line breaks between and then measuring the text box width. It detects whether strings or objects have been passed by testing for a "text" field on the first label element. However, if the text for the first label is empty "" this is falsy and the code assumes that the label element objects are actually strings and concatenates them with unusual and unexpected results. The label strings are misaligned in this case, and can readily overwrite the chart area itself.
Attachments (1)
Change History (3)
comment:1 Changed 12 years ago by
Milestone: | tbd → 1.5 |
---|---|
Status: | new → assigned |
Changed 12 years ago by
Attachment: | 100413-labels.patch added |
---|
comment:2 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
patch from Dave Clark (IBM, CCLA)