Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Get the value of a computed column or of a data column binding from script
afertel
Hi:
I need to set the max value of an y-axis dynamicly. It is a stacked bar chart so for that I would need to sum each variable in each stack bar. I can calculate the sum of them as a computed column or as a data column binding, and the result is what I want, but then I don't know how to retrieve those values from the script so I can compare them and set the maximum one as the max value in the yScale.
Does anybody know how to achieve this?
Thank you very much in advance
Kind regards
Afertel
Find more posts tagged with
Comments
mwilliams
Take a look at this forum thread. There is an example that shows how you can grab the min and max value, in your chart script, and then set the value based on that. No need to compute the value outside the chart. Let me know if you have questions.
http://www.birt-exchange.org/org/forum/index.php/topic/23322-min-and-max-scale-in-y-axis/
afertel
Hi mwilliams:
Thanks for your answer. This would work perfectly for a normal bar chart, but i am working on a stacked bar chart. That code is giving me the max value in the dataset, but what i need is the max value of the stacked bars, which would be the sum of the columns that build the chart.
Is there anyway to achieve this?
Thanks
Kind regards
afertel
Hi
I finally got to a solution getting the values from the dataset and using algorithmia. Thanks for pointing me in the right direction. Really appreciate it.
Kind regards
mwilliams
Sorry for not catching you before you got it, but you did what I would have suggested.
Glad you got it! Let us know whenever you have questions!