If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

ReportNet wishlist

Started by Merri, 17 Aug 2005 05:31:18 PM

Previous topic - Next topic

Merri

Here's one:

The ability to rotate text in column headings to any angle

Darek

First you would have to convince them ...  http://www.w3.org/

CoginAustin

CSS works to rotate text.


<div style="layout-flow: vertical-ideographic">

Column Header Field
</div>

Also DHTML can rotate text on all axis..

Darek


CoginAustin

You can rotate to any angle. However, it must be absolutely positioned and it would take extra real estate(vertcal length+horizontal length) since the actually column do not display at the same angle. With this in mind you will also have to adjust the column height and width manually as the text is basically not part of that cell. I have no idea what issues there are as far as printing.

Another easier way to go about it is to just create a .gif of the text at the angle you want  ;D

Real estate required:

*Vertical text
abcdefg

*Horizontal
a
b
c
d
e
f
g

Diagonal
a
b
  c
   d
     e
      f
       g





To do it:


<STYLE>
.positioned { position: relative; }
</STYLE>
<SCRIPT>
var id = 0;
function displayTextDiagonal (text, down, deg, lsp) {
  deg = deg || 45;
  deg = Math.PI / 180 * deg;
  lsp = lsp || 10;
  dy = lsp * Math.tan(deg);
  var html = '';
  html += '<DIV ID="td' + id + '"' + ' CLASS="positioned"' + '>';
  if (down) {
    for (var r = 0; r < text.length; r++) {
      html += '<SPAN ID="td' + id + r
             + '" CLASS="positioned" STYLE="left: '
             + (r * lsp) + 'px; top: ' + (r * dy) + 'px;">';
      html += text.charAt(r);
      html += '</SPAN>';
    }
  }
  else {
    for (var r = 0; r < text.length; r++) {
      html += '<SPAN ID="td' + id + r
              + '" CLASS="positioned" STYLE="left: '
              + (r * lsp) + 'px; top: '
              + ((text.length - r) * dy) + 'px;">';
      html += text.charAt(r);
      html += '</SPAN>';
    }
  }
  html += '<\/DIV>';
  id++;
  document.write(html);
}
</SCRIPT>
<SCRIPT>
displayTextDiagonal('Column Heading', true, 45);
</SCRIPT>

Merri

"Any" angle was a big ask, I know. Personally, I'd be happy with 90deg anti-clockwise. Currently I can only get 90deg clockwise. I raised this with Cognos and they've created an enhancement request.

With my user hat on, I can see how it would be easier to read at a more acute angle such as
45 or 60; the sort of thing you can do in Excel (much as I hate the beast, it does have good layout options). Granted it does take up more real estate. And I was also thinking that this should be EASY for non-technie authors to implement - which tends to rule out workarounds heavy on the scripting and graphics manipulation.

But I will try the suggested css option & see if that helps - thanks, guys!

wneuman

Here's another one - How about a Gantt Chart format without having to buy a third party application?