almende / chap-links-library

a web based visualization library for displaying graphs, networks, and timelines
http://almende.github.com/chap-links-library
Apache License 2.0
599 stars 167 forks source link

Keep height of groups all the time #313

Closed JulienOrain closed 10 years ago

JulienOrain commented 10 years ago

Hi everyone ! I am wondering if there is a way to keep the height of each group to a certain size even if we zoom in or drag horizontally.

Here is an example : screen shot 2014-08-04 at 10 51 35 am screen shot 2014-08-04 at 10 51 51 am

The second screen shot was taken just after zoom in. The idea is to avoid to minify the line for Sandra. Any idea ?

Thanks, Julien

josdejong commented 10 years ago

Setting the option groupMinHeight to some value like 24 should do the trick

JulienOrain commented 10 years ago

Hi ! I set it to 24, but it does not change anything. Here are the options I used :

  dataOptions.setStyle(Timeline.Options.STYLE.BOX);
  dataOptions.setMin(DateUtil.getDate(getDateMin()));
  dataOptions.setMax(DateUtil.getDate(getDateMax()));
  dataOptions.setZoomMin(ZOOM_MIN);
  dataOptions.setShowButtonAdd(true);
  dataOptions.setShowCurrentTime(true);
  dataOptions.setShowNavigation(true);
  dataOptions.setAxisOnTop(true);
  dataOptions.setEditable(false);
  dataOptions.setGroupsWidth(GROUPS_WIDTH + "px");
  dataOptions.setStackEvents(true);
  dataOptions.setGroupMinHeight(24);
  dataOptions.setMinHeight(GROUPS_HEIGHT);
  dataOptions.setAnimate(true);
  dataOptions.setCustomStackOrder(createCustomStackOrderObject());

with

  private static final int GROUPS_WIDTH = 150;
  private static final int GROUPS_HEIGHT = 100;
josdejong commented 10 years ago

I just spend too much time trying to get these GWT projects up and running on my machine again but I'm stuck with vague GWT issues, so I can't even try to replicate the issue. I can't spend a lot of time on this right now, it would be great if anyone could try to figure out whats going on here (the option groupMinHeight works just fine with the JavaScript version of the library, it looks like something weird in the GWT library).

JulienOrain commented 10 years ago

Hi ! That was a cache problem in my browser...It stills get my old version of the timeline-min.js... Thanks for your time and answers ;-) ! Have a great end of week ! Julien

josdejong commented 10 years ago

ok glad to hear!