On April 27, 2024, our Sign-in and Create Account options will be unavailable from 9am-12pm ET. During this maintenance window, developer account access and free trial registration will be unavailable.
Making the scales of a dual-axis chart the same
When generating a dual-axis chart, the scale of each axis is determined by the low and high values of the series contributing to each axis. Although this behaviour makes sense, in some cases it is desirable to have the same scale for both axes even though the values may differ in range.<br />
<br />
It is possible to change the scale of each axis independently using the chart wizard; however, if we don't know in advance the range of values that can be charted, this is not sufficient.<br />
<br />
A bit of Java scripting using the chart API can resolve the problem. In this example, we override the beforeGeneration method of the chart onRender event. First, we get the low and high values for the two series. Secondly, we round up to the top value. Finally, we apply set the min and max values of the scale to each axis.<br />
<br />
Thanks to Scott Rosenbaum for providing the original Java Event Handler example.<br />
<br />
P.
<br />
It is possible to change the scale of each axis independently using the chart wizard; however, if we don't know in advance the range of values that can be charted, this is not sufficient.<br />
<br />
A bit of Java scripting using the chart API can resolve the problem. In this example, we override the beforeGeneration method of the chart onRender event. First, we get the low and high values for the two series. Secondly, we round up to the top value. Finally, we apply set the min and max values of the scale to each axis.<br />
<br />
Thanks to Scott Rosenbaum for providing the original Java Event Handler example.<br />
<br />
P.
Categories
- All Categories
- Cloud Editions
- 1 Thrust Services
- cat as link
- 1 Core SaaS Application development
- 10 Developer Announcements
- 15 General Questions
- 33.4K TeamSite
- 141 Application Governance & Archiving
- 15.2K Designing Analytics Reports
- 1K DevShare Downloads
- Core SaaS Applications
- nested parent
- 4.3K Developing Analytics Applications
- 8.8K Documentum Developer Forum
- Media Management developer
- 159 Transactional Content Processing (TCP)
- 1.7K Web Experience Management
- 55 Tempo Social
- 1 XM Fax