Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Are task width and column width attributes still functioning? #107

Closed
jwhendy opened this Issue · 3 comments

2 participants

John Hendy Chris Schlaeger
John Hendy

I've been trying to set the gantt chart width and found three posts on the mailing list referring to setting column width:

Steps to reproduce:

  • Download tutorial.tjp
  • Remove copyright symbol and change Sebastian and Klaus' names to prevent compilation errors per this bug report
  • Add width attribute to chart property
    taskreport overview "" {
    ...
       columns bsi { title 'WBS' },
           name, start, end, effort, cost,
           revenue, chart { ${TaskTip} width 1400}
     ...
    }
  • Compile with tj3 ~/path/to/tutorial.tjp
  • Open Overview.html
  • Chrome -> Inspect element and observe style for gantt chart <td> in table:
    element.style {
    position: relative;
    overflow: auto;
    width: 320px;
    height: 369px;
    }
  • Undo change above, then repeat for whole taskreport:
    taskreport overview "" {
      width 1400
      ...
    }

No change.

Am I doing something wrong, or are the width attributes not functioning properly?

Running Arch Linux x86_64, with these TJ/ruby details:

$ tj3 --version
TaskJuggler v3.4.0 - A Project Management Software  

$ ruby --version
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]

Thanks!
John

Chris Schlaeger
Owner

I cannot reproduce this. Please post a short example project with a 'width' attribute that is ignored.

John Hendy

Sorry, tried to do with the above, but I guess I didn't lay out the entire report section. I tried using width 1400 with both the taskreport definition (set overall width) as well as with the chart {} columnid definition. I get this:

2013-04-03_174205

My screen is 1400x900; that's at 100% zoom, so I'd estimate the full width of the report area to be around 1200 and the chart itself to be 2-300px. Either way, nothing is coming out at 1400px wide. Per my post above, inspect element also reveals that it's not 1400.

### project def

project test "Project" "1.0" 2013-03-01 +280d {
}
shift s40 "Part time shift" {
  workinghours wed, thu, fri off
}

task milestones "Milestones" {

  task task1 "Task 1" {
    start 2013-04-03
    milestone
  }
}

### end project def

### begin report def
macro TaskTip [
  tooltip istask() -8<-
    '''Start: ''' <-query attribute='start'->
    '''End: ''' <-query attribute='end'->
    ->8-
]

navigator navbar {
  hidereport 0
}

textreport frame "" {
  header -8<-
    == Project Plan ==
    <[navigator id="navbar"]>
  ->8-
  footer "----"

 textreport index "Overview" {
    formats html
    center '<[report id="overview"]>'
  }
}

taskreport overview "" {
  header -8<-
    === Timeline/Deliverables ===
  ->8-

  columns bsi { title 'WBS' },
          name, start, chart { ${TaskTip} width 1400}

  timeformat "%Y-%m-%d"
  loadunit days
  hideresource 1
  sorttasks tree

}

### end report def
Chris Schlaeger
Owner

The width attribute only specifies a maximum width. For columns with a fixed with (e. g. chart) you may end up with narrower columns. You can use the 'period' attribute to enlarge the reported interval in the chart column and hence the column.

The manual wasn't very clear about this. I'll fix that! Sorry for the confusion.

Chris Schlaeger scrapper closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.