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)
Line Chart question (only show max value so far)
chavez_ant
A quick question. Let's say I have the following table:
Number Value
1 300
2 275
3 305
4 304
5 310
I'd like to set my line chart for this data to only display the maximum value so far, where Number is the x axis.
So the chart would only show an upward trend with the following values
Number Value
1 300
3 305
5 310
I'm in Birt 2.6.1. Any thoughts would be appreciated. I was hoping there's a setting in the chart I may have missed so far.
Thanks!
Find more posts tagged with
Comments
mwilliams
I don't think there's a setting for this. You could definitely put in an enhancement request:
http://www.birt-exchange.org/org/resources/bug-reporting/
One way to achieve this without a feature to do it might be to create a computed column in your dataSet that shows the value only if it's the next greatest value and shows a dummy value for all others. Then, you'd just have to put a filter on your chart to remove the rows with the dummy value. There shouldn't be too much scripting involved to make this happen. Let me know if you have any questions.
chavez_ant
Thanks for helping. To work around this, I was able to get a running maximum at the database level and use the value from the dataset in the chart directly. Here's the syntax used (for Oracle sql):
SELECT MAX(value) OVER (ORDER BY number)
FROM mytable
mwilliams
Ah. Glad you found something to work. You could add a devShare entry for this for other Oracle users that may try searching for the same thing. You'd also be eligible for the devShare contribution contest.
http://www.birt-exchange.org/org/wiki/index.php?title=DevShare_Contributor_of_the_Month_Contest