Hi all, long time viewer, first time caller... so here's my deal... any help would greatly be appreciated:
Let say I have 10 Companies, and each has ?? weeks of data that return, X-axis grouped by Company and Week, and Y-axis the NumberOfWidgits.
Within my Bar Chart, I have a Beanshell post-script that dynamically builds out my Y-axis based on the NumberOfWidgits returned in my mainQuery... works great.
Beanshell code here:
CategoryPlot chartPlot = chart.getCategoryPlot();
ValueAxis yAxis= chartPlot.getRangeAxis();
data = chartPlot.getDataset();
keys = data.getRowKeys();
ArrayList dataVals = new ArrayList();
for (int i=0;i<keys.size();i++)
HERE IS MY PROBLEM:
I have altered my mainQuery, I have added a 'Partition By' : ROW_NUMBER() OVER (PARTITION BY MemberId ORDER BY DateCreated desc)
This now allows me to return the last 10 Weeks of info of each Company... this works correctly
BUT now when the post script runs, it ONLY dynamically looks at the first partition, and bases the Y-axis MAX on that particular set of ten.
(Company 1 has a MAX of 500 Widgits, Company 4 has a MAX of 4000 Widgits, but the dynamic Y-axis only builds itself out to 500.)
How can I get the post-script to look at all partitions and returns and uses Any Companies Widgit MAX?