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.
Runtime Control of Y-axis Labels in Chart
jeffreymac
Junior Member
Comments
-
Hi jeffreymac,
There are a couple of event handlers needed to get at the values, and format the axis label. Below is a javascript example that may work for you. This one will color the label corresponding to the largest data value.
var maxval=0;
var dataSetProcessor;
function beforeDataSetFilled(series, idsp, icsc) {
dataSetProcessor = idsp;
}
function afterDataSetFilled(series, dataSet, icsc) {
maxval = dataSetProcessor.getMaximum( dataSet );
}
function beforeDrawAxisLabel(axis, label, icsc)
{
importPackage(Packages.org.eclipse.birt.chart.model.attribute);
importPackage(Packages.org.eclipse.birt.chart.model);
importPackage(Packages.org.eclipse.birt.chart.model.data);
importPackage(Packages.org.eclipse.birt.chart.model.data.impl);
if (maxval <= parseFloat(label.getCaption().getValue())) {
if (axis.getType() != AxisType.TEXT_LITERAL) {
label.getCaption().getColor( ).set( 208, 32, 0);
}
}
} -
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