Jump to content

BIRT Developer Center Download


Submitter

File Information

  • Submitted: Jul 31 2015 09:11 PM
  • Last Updated: Jul 31 2015 09:11 PM
  • File Size: 42.75KB
  • Views: 8540
  • Downloads: 77
  • Approved by: Clement Wong
  • Approved on: 31 July 2015 - 09:11 PM
  • Summary: Multiple levels of X-Axis to show groups. This example shows two X-Axis (country and its states).
  • Content Type: Designs & Code
  • BIRT Version: iHub3

Download Two level x-axis labels or grouped labels in charts

* * * * * 2 Votes
multiple xaxis excel grouped xaxis two level axis group labels subgroup labels



Screenshots
Ever wanted to have multiple level of groups in the X-Axis? Want to duplicate the behavior in Excel?

The sample using commercial BIRT (iHub 3.1) shows two x-axis or grouped x-axis labels using HTML5 charts.

1. Changed the Category X Axis to: row["COUNTRY"] +":"+ row["STATE"]
We will later parse out the two levels using JavaScript's split function.

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.

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.




Hi Clement. Such thing will be possible in Open Source as well?

I want above chart in HTML, CSS, Javascript...is it possible...please help




0 user(s) are online (in the past 1 minutes)

0 members, 0 guests, 0 anonymous users