Home Analytics DevShare
The community of Analytics developers are invited to follow and participate in the developer network.
OpenText technical experts collaborate with supported customers and partners in the Magellan product area.

Multiple levels of X-Axis to show groups. This example shows two X-Axis (country and its states).

Clement WongClement Wong EM mod
edited August 1, 2015 in DevShare
Ever wanted to have multiple level of groups in the X-Axis? Want to duplicate the behavior in Excel?<br />
<br />
The sample using commercial BIRT (iHub 3.1) shows two x-axis or grouped x-axis labels using HTML5 charts.<br />
<br />
1. Changed the Category X Axis to: row["COUNTRY"] +":"+ row["STATE"]<br />
We will later parse out the two levels using JavaScript's split function.<br />
<br />
2. Modified beforeDrawAxis event to change height of chart to make room for 2nd x-axis. Parsed out the subgroup (in example it is STATE) and change the labels.<br />
<br />
3. Added a script in the Chart Area > Load event to build out the new parent group for the 2nd x-axis, built out the tick marks to separate the parent group, added the 2nd x-axis and then formated the labels by centering them.

Clement Wong
Principal Analytics Architect

OpenText Corporation
http://www.actuate.com | http://www.opentext.com

Sign In or Register to comment.