Opened 9 years ago

Closed 5 years ago

#14340 closed defect (patchwelcome)

Axis shortening when labels are longer

Reported by: cheewe Owned by: cjolif
Priority: low Milestone: 1.13
Component: Charting Version: 1.6.1
Keywords: X Axis Label Cc: cjolif
Blocked By: Blocking:


I created some clustered columns in chart2D dojox 1.6.1. I noticed that when the longer the X axis labels, the shorter the X-Axis and the more squeezed the chart becomes.

Please use the attached example code that illustrates the "squeezing effect"

Can someone let me know if this is intended or there can be a bug fix for this?

Many thanks!

Attachments (1)

ofa_test-4.html (1.7 KB) - added by cheewe 9 years ago.
Test file to show squeezing effect

Download all attachments as: .zip

Change History (10)

Changed 9 years ago by cheewe

Attachment: ofa_test-4.html added

Test file to show squeezing effect

comment:1 Changed 9 years ago by Adam Peller

Cc: cjolif added
Component: DojoxCharting
Owner: changed from Adam Peller to Eugene Lazutkin

comment:2 Changed 9 years ago by cjolif

This comes from the axis getOffsets() method that does return for a horizontal axis a right and left offset of the max label width divided by 2. There is certainly a good reason for that but I don't see it at first glance. To be investigated...

comment:3 Changed 9 years ago by cjolif

After more investigations this is needed if you have a label on the first and/or last tick of the horizontal axis. To make sure (as the label is centered on the tick) that there is enough room for the label to be displayed. Obviously we could be smarter and do that only when this is needed instead of always.

This looks more like a enhancement request than a defect to me.

The code that causes the issue in in axisd2/Default.js

case 180:
  offsets[side] = size;
  // line to comment to don't get the pb
  offsets.l = offsets.r = labelWidth / 2;

comment:4 Changed 9 years ago by cheewe

This is helpful. Thanks. Aside, for long labels, is there a way we can get the labels to wrap, even manually, by inserting a line break of some sort?

comment:5 Changed 9 years ago by bill

Milestone: tbd

comment:6 Changed 9 years ago by cjolif

cheewe unfortunately this is not possible but it would definitely make sense. Feel free to enter a request for enhancement.

comment:7 Changed 9 years ago by Colin Snover

Priority: highblocker

Bulk update of open ticket priorities.

comment:8 Changed 9 years ago by cjolif

Owner: changed from Eugene Lazutkin to cjolif
Priority: blockerlow
Status: newassigned

This is not a blocker, actually this is more a enhancement request that purely a defect.

comment:9 Changed 5 years ago by dylan

Milestone: tbd1.12
Resolution: patchwelcome
Status: assignedclosed

Given that no one has shown interest in creating a patch in the past 4+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.