Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
min and max scale in Y axis
XFabien
Hello,
I have a problem is that I wanted that my chart can take the min value and max value in the dataset for its Y axis sacale.
I have done the research in the forum or google, but I didn't find the solution. Is there anyone who knows how to do that and help me please?
I am not very good at javascript, that's why I can't do that by myself...
Thanks you very much in advance.
Yao
Find more posts tagged with
Comments
mwilliams
Hi Yao,
The max that is set is typically just over the max value in the chart, unless you specify otherwise. Are you wanting the max to be exactly the highest value in the chart? So, no space above? The minimum value in the scale is usually similar to this as well, I think. Let me know.
XFabien
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="82325" data-time="1315318481" data-date="06 September 2011 - 07:14 AM"><p>
Hi Yao,<br />
<br />
The max that is set is typically just over the max value in the chart, unless you specify otherwise. Are you wanting the max to be exactly the highest value in the chart? So, no space above? The minimum value in the scale is usually similar to this as well, I think. Let me know.<br /></p></blockquote>
<br />
Hi Michael,<br />
<br />
Yes, I saw that,too. In this case, I think I just want that the min value should be a little less than the min value in the dataset. Is it possible to do that?<br />
<br />
Thanks a lot.<br />
<br />
Yao
mwilliams
You should be able to grab the min value in the afterDataSetFilled function and then use this value to determine what you want the min value to be and set this in the beforeGeneration of the chart. Let me know if you need help with this.
XFabien
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="82465" data-time="1315498342" data-date="08 September 2011 - 09:12 AM"><p>
You should be able to grab the min value in the beforeDataSetFilled function and then use this value to determine what you want the min value to be and set this in the beforeGeneration of the chart. Let me know if you need help with this.<br /></p></blockquote>
<br />
I'm very sorry that I know just a little about javascript, I am not sure that I can make it work.<br />
<br />
Could you just give me a little exemple? I appriciate very much for that.<br />
<br />
Yao
mwilliams
What is your BIRT version? I'll work in that version. Let me know.
XFabien
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="82592" data-time="1315856423" data-date="12 September 2011 - 12:40 PM"><p>
What is your BIRT version? I'll work in that version. Let me know.<br /></p></blockquote>
<br />
My birt version is 2.6.2<br />
<br />
Thanks Michael<br />
<br />
Yao
mwilliams
Take a look at this report. It sets both the min and max dynamically. The min is 90% that of the minimum value and the max is 110% of the maximum value.
Hope this helps.
XFabien
Thank you very much Michael, it works very well.
XFabien
Just a little bit question, if I have 2 or more series in Y axis and now I will hide one or tow series.
How can I exclure the series hidden with your script?
mwilliams
You can check for a series with this:
if (series.getSeriesIdentifier() == "Series 1"){}
So, you can check for series' that you're dropping and not replace the min/max based on that series.