Search code examples
chartscrystal-reports

How to change the Height of bar chart dynamically


I want to change the height of bar chart based on Data dynamically. I tried different options but didn't succeeded. Can grow property is disabled in Charts. Do we have any option to change the height of chart dynamically.


Solution

  • Changing height of graph dynamically cannot be done in CR. And there is a very simple reason why is that. If you compare can grow option with character fields and graph there are several problems when applying can grow option in graphs

    1. what is the limit of graph (max height)
    2. if graph can grow, how to display it on several pages
    3. if graph is empty, what then (in character field its empty field)
    4. ...

    I think you understand what i am trying to say you. Since you have need for "different" sizes of graph i suggest you make several "sizes" of your graph in different sections and then show/suppress only one depending on your needs (messy but effective) since can grow option doesn't exist for graphs.

    Hope it helps you