Jump to content
We've recently updated our Privacy Statement, available here ×

Dynamic Bar Chart height and stacked bar color


rsreejithnair

Recommended Posts

Hi All,

I have an issue in creating chart with dynamic height..

Let me ellaborate the issue.. I have a bar chart (horizontally aligned) which can have many number of bars depending on the data fetched by the query. Now my issue is that, if more number of data comes throuh the query then the bars gets congested and the axis label values becomes illegible...

Please tell me if I can increase the height of the bar chart dynamically when I get more data??

 

I have another issue in stacked bar chart...

My requirement is to show the stacked bar's series values with different colors. For instance, if I have n number of series values in a stacked bar which can come in any order(i.e 'error', 'success', 'suspend', 'pending' etc as series values, for stacked bar category 'Result'). Now I want to show error in RED and success in GREEN. Giving color in Bar chart properties Color Series didnt work as the series values can come in any order..

please help!!!!

FYI, I am using iReport 2.0.5...

I tried searching the forum to find a solution for my problems but all i vain... Please help me....

 

Thanks in advance,

Sreejith :)



Post Edited by rsreejithnair at 08/03/2009 07:55
Link to comment
Share on other sites

  • 3 weeks later...
  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

 

The chart cannot grow depending on how many bars you have. You have to make sure you make the chart big enough, if you know you have many bars., Otherwise you have to group the data somehow to have fewer bars. Depends on what type of chart it is.

 

As for the color series, this is not possible. Feel free to post a feature request for controlling the color series, regardless of their order. But make sure you also suggest the way the declaration of the colors should be made. In dataset or where?

 

I hope this helps.

Teodor

 

Link to comment
Share on other sites

Hi,

I am interested into this topic, too. I tried to find a way to at least decrease the spacing between the bars, but I didn't find anything. Is this possible? The spacing seems to be constant, no matter how many bars there are in a chart.

Regards,

Dan

 

Link to comment
Share on other sites

Hi,

 

There are many things that might be possible with JRFreeChart, but the functionality is not exposed through JR.

In such cases, you just need to write a chart customizer, or maybe a chart theme.

There are samples for such things in the /demo/samples/charts and /demo/samples/chartthemes folders of the JR project package.

 

I hope this helps.
Teodor

 

Link to comment
Share on other sites

Hi

 

I'm new to Jasper report and I use iReport 3.5.3.

 

When I add a bar chart in iReport designer, the sample chart will appear with One, Two, Three, etc. and First, Second, Third label.

I note that the spacing between each category is greater than the spacing between each series bar.

It is look great.

But when I click Preview my report, the spacing between category and between series are almost same.

I tried with different number of categories in report. But the spacing are still almost same.

 

Is it normally same spacing ? or what's wrong with me?

Link to comment
Share on other sites

  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...