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)
Dynamic Chart Value Series
mn1986
I want to create a bar chart in my report whose Y axis Series is decided based on input report parameter.
Any pointers for going about the same would be appreciated.
Thanks!
Find more posts tagged with
Comments
zqian
Can you elaborate a little more or attach a picture to show the exact chart look you want? Normally you can define filters bound with report parameters on Chart to control the data.
mn1986
Well thanks for the reply. Here's an example of what I want to do-
User selects option from report parameters.
Now the option selected from this set is to be the Y axis of the bar chart.
The X axis is always fixed.
E.g.
Say I have list of users with their height, weight and age values in my data set.
Report Parameters:
Choose one of the following:
1. Height
2. Weight
3. Age
Now based on this input, I would like to display the top 5 users based on their age,weight or height (whichever selected)
Hope this clears my question.
Thanks!
vikasg18
Hi,<br />
Did u got the soln for that...???<br />
Since, I too have a very similar query, ie: based on the report parameter values, the Y axis should plot those values.<br />
<br />
If u have the soln, kindly let me also know. its very urgent.<br />
mail to, <a href='mailto:' title='E-mail Link' class='bbc_email'>vikasg18@gmail.com</a> or reply here.<br />
<br />
-Vikas
mn1986
Its something like this -
In the expression builder of Y value series add a script something like:
if (params["yField"]=="height")
{
row["Height"];
}
else if (params["yField"]=="weight")
{
row["weight"];
}
else if (params["yField"]=="age")
{
row["Age"];
}
Let me know if this works!
vikasg18
I have written like this:
var ret;
switch (params[ "SummaryType" ].value)
{
case "sum" :
ret = Total.sum(row[ "amountpaid" ])
break
case "max" :
ret = Total.max(row[ "amountpaid" ])
break
case "min" :
ret = Total.min(row[ "amountpaid" ])
break
case "count" :
ret = Total.count(row[ "amountpaid" ])
break
case "avg" :
ret = Total.ave(row[ "amountpaid" ])
break
}
ret;
but it is showing the error after when we click on the OK in the expression builder window....
kindly try it and let me know..
-Vikas