Dynamically change Meter chart scale
Comments
-
Hi Daron,
Sorry for the delayed response. Check out this devShare post:
http://www.birt-exchange.org/org/devshare/designing-birt-reports/377-change-meter-scale-with-script/Warning No formatter is installed for the format ipb0 -
Hi Michael,
That's exactly what I was looking for! But the example is still somewhat static in that the .setMin and .setMax values are nothing more than literals in the script itself.
I would like to set the min/max value 10% lesser/greater than the current performance value I'm obtaining from my db query. For example, if the current performance value is -51, then I want to set the min value to -55. The performance value is derived from row["CURRENTPERFORMANCE"]. There must be some way to reference the this column from the dataset directly in the script. Can I reference a dataset column in the script?
As you can see, I'm not too familiar with the scripting model. Where would I begin to learn more about such?
Thank you,
Daron0 -
Since your dataSet is only 1 row, you can simply set a persistentGlobalVariable with the values you need to access in the chart. You'd do this in the onFetch method of your dataSet. Then, in your chart script, you can recall the PGV(s) you set to determine what you need to do with the scale. Let me know if you need an example.Warning No formatter is installed for the format ipb0
-
I'm just getting back to this having returned from vacation.
As luck would have it, I use your guidance for this on another similar - non chart - report and all is well after a bit of trial and error. A few google searches and I stumbled acrossed reportContext.setPersistentGlobalVariable() & .getsetPersistentGlobalVariable()
The chart required some further searches to realize the context was the 2nd parameter of the chart's beforeGeneration function.
Thanks for pointing me in the right direction!0
Categories
- All Categories
- 117 Developer Announcements
- 52 Articles
- 147 General Questions
- 133 Services
- 56 OpenText Hackathon
- 35 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 8.9K Extended ECM
- 912 Cloud Fax and Notifications
- 81 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 166 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 4 XM Fax