#20 Painting LBChart2D Labels Axis Labels Vertically

open
Jason J Simas
1
2002-02-11
2002-02-11
Bernt Elias
No

It would be very nice to able to align the
labelsAxisLabels vertical in the BBChart2D when the
labels get very long. I have been using the LBChart2D
in these cases, but my charts tend to get wide and
then the graphs don't fit into the screen (it goes
beyond the bottom of the browser-window). It would be
much better to use a BBChart2D so that the chart would
fit into the screen thus fitting into the screen (so I
don't have to scroll down to see the whole graph).

Discussion

  • Bernt Elias
    Bernt Elias
    2002-02-11

    • labels: --> Interface Improvements (example)
    • priority: 5 --> 6
    • assigned_to: nobody --> jjsimas
     
  • Jason J Simas
    Jason J Simas
    2002-02-11

    Logged In: YES
    user_id=179964

    Well, you are not describing your problem very well, but I
    think that I can help you. Whether "it would be much
    better" remains to be seen, and for you to say that, is a
    little offensive. Drawing the labels vertically would mean
    that your chart would be too tall. Why would that be any
    better?

    LBChart2D calculates its own preferred size. It prefers
    that the labels axis labels are only one line for example:

    Tuesday

    and not

    Tues
    day

    But you can get the labels to break as in the second way of
    the example. Use the method
    LBChart2D.setMaximumSize(Dimension) and choose an
    intelligent maximum size for the LBChart2D. That will
    cause the labels to break if there is room, if there isn't
    then the labels will not be painted. If there isn't room,
    then you can make their font smaller, or you have to choose
    more intelligent labeling... You really
    shouldn't have any more than say twelve labels for that
    axis, and I would imagine that you might be able to
    abbreviate them somehow...

    Jason

     
  • Jason J Simas
    Jason J Simas
    2002-02-11

    • priority: 6 --> 1
    • summary: Vertical align of labelsAxisLabels --> Painting LBChart2D Labels Axis Labels Vertically
     
  • Bernt Elias
    Bernt Elias
    2002-02-12

    Logged In: YES
    user_id=438512

    Sorry! I didn't mean to offend you :-)

    I wil try to explain why I mean it would be "better" to be
    able to paint Labels Axis Labels Vertically in the
    LBChart2D: First of all I use much more than 12 labels. For
    example a dataset can be like this: Dataset ds = new Dataset
    (1,40 or more,1) In other words i need a label for each
    point/value in the graph. And that becomes a "problem" even
    when the labels are just 4 characters long. Decreasing the
    fontsize isn't the ultimate soloution because then it gets
    too small and unreadable.
    And a second reason is that the types of graphs I make is
    easier to look at/understand with LBChart2D rather than
    LLChart2D and also it fits better in the web page.

     
  • Jason J Simas
    Jason J Simas
    2002-02-12

    Logged In: YES
    user_id=179964

    Why would you need to have so many labels? Chart2D doesn't
    require you to have a label for every point...

    Jason

     
  • Bernt Elias
    Bernt Elias
    2002-02-13

    Logged In: YES
    user_id=438512

    I can give you an example:
    Say you want to graph the population in each country of the
    world, then you would get about 200 points and if you
    wanted to see which countries that had more than 50 million
    people you would have to have a label for each point to
    identify the countries.

    Bernt Elias

     
  • Bernt Elias
    Bernt Elias
    2002-02-13

    Logged In: YES
    user_id=438512

    I can give you an example:
    Say you want to graph the population in each country of the
    world, then you would get about 200 points and if you
    wanted to see which countries that had more than 50 million
    people you would have to have a label for each point to
    identify the countries.

    Bernt Elias

     
  • Jason J Simas
    Jason J Simas
    2002-02-13

    Logged In: YES
    user_id=179964

    Good example...

    I look into adding this feature, but there must be some
    limit on how many labels a chart can have for fitting on
    your screen... Implementing your feature would allow a
    person to add more labels... but there would still be a
    limit. Anyway, as you know already LLChart2D may be a
    better choice since it already does this. Also, you might
    try only showing multiple charts with one chart showing how
    many countries each have certain ranges of popularion, then
    for each range show the countries specifically.

    Jason