Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Add elements dinamically via scripting
Ilija Angulovich
<p>Hi all.<br><br>
I am trying to acommplish something simmilar to the screenshot (the grey and blue rectangles).<br><br>
Also I have a tradeoff: there is no cap maximum for the rectangles ammount, they must be generated dinamically.<br><br><br>
How can I do so?<br><br>
Thanks in advance.</p>
Find more posts tagged with
Comments
Matthew L.
<p>What version of BIRT are you using?</p>
<p>Also what chart type are you using (SVG,HTML5,etc)?</p>
<p>I'm pretty sure you could accomplish this using a stacked bar chart.</p>
<p>Then use some scripting to add spacing (or gridlines) between every block (at intervals of 1) to provide the appearance of blocks.</p>
Clement Wong
<p>Are you using OS BIRT, or commercial BIRT? What version?</p>
<p> </p>
<p>What data source are you using?</p>
<p> </p>
<p>The attached example was created in OS BIRT 4.5.0.</p>
<p> </p>
<p>It's similar to your screenshot, but without sample data or the data source used, I made a few assumptions:</p>
<p> </p>
<ul><li>Your mockup for the second row should be "2+9" instead of "2+3"</li>
<li>The data was sorted which could be done in either a SQL query or via Output Column/Computed Column sort.</li>
<li>"theMax" in the sample could be an aggregate (MAX) using a Computed Column if it were a JDBC Data Source.</li>
</ul><p> </p>
<p>The techniques used in the report design leverages DIVs as the rectangles for each count. Also, Highlights were used to alter the row colors.</p>
<p> </p>
<p>As Matthew mentioned, we can using scripting in a chart (especially HTML5 charts) to create a similar chart.</p>
<p> </p>
<p>
Ilija Angulovich
<p>Hi, I finally achieved this task as Mathew suggested: a stacked bar chart with flipped axes, picking up values from the table row and not from the dataset of the chart. <br><br>
The result was satisfactory almost automagicallý, then I just corrected separation between bars to 0 to make the bars fill all the height, and a small script to paint them.<br><br>
This is my final result:<br><br><img src="
http://s31.postimg.org/j0lee96mz/image.png"
; alt="image.png"></p>