Home
Intelligence (Analytics)
Want one chart instead of many for chart w/Optional Y-series
sbarkdull
<p>I have created a bar chart in BIRT that has:</p>
<p>Category (X) Series</p>
<p>Value (Y) Series</p>
<p>Optional Y Series Grouping</p>
<p> </p>
<p>The bar chart renders just fine, although not in the way I want it to. The report renders 3 different bar charts, one for each value in the Optional Y Series Grouping. (see attachment: not_how_i_want_it.png) (NOTE: generated by BIRT)</p>
<p> </p>
<p>I would like it to render a single bar chart, with the values from the Category (X) Series' bars grouped inside of the Optional (Y) series grouping. (see attachment: how_i_want_it.png) (NOTE: this image was generated by a tool that is not BIRT).</p>
<p> </p>
<p>See attachments for examples.</p>
Find more posts tagged with
Comments
pricher
<p>Hi,</p>
<p> </p>
<p>If it's creating more than one chart, it's more likely because you have put the chart inside the header or footer area of a table grouped on unit.</p>
<p> </p>
<p>Try creating the chart by itself. Based on your screenshot:</p>
<p>Category-X Series = what looks like a machine name,</p>
<p>Value-Y Series = activity</p>
<p>Y-Series grouping = Hour</p>
<p> </p>
<p>Hope this helps,</p>
<p> </p>
<p>P.</p>
sbarkdull
<p>Thank you for your response, let me clarify: </p>
<p> </p>
<p>Category-X Series = the time of day (in 0-23 hours) of an "activity"</p>
<p>Value-Y Series = the count of "activities"</p>
<p>Y-Series grouping = machine name (aka Unit)</p>
<p> </p>
<p>The report currently generated by BIRT is creating separate chart for each Unit. I would like it to create one chart with the "time of the activities" for each unit, grouped by unit, along the x-axis of the chart.</p>
<p> </p>
<p>Attached is a screen shot of the report designer. It hopefully demonstrates that I have placed the chart in the correct location. BIRT is creating a bar chart for each unit. To give you a sense of how things are grouped, here is an approximation of the sql query:</p>
<p> </p>
<p><b>select</b></p>
<p><strong> </strong>to_char(e.evt_tim::timestamp <b>-</b> <b>interval</b> '5 hour', 'HH24') <b>as</b> time,</p>
<p><b><strong> </strong>count</b>(e.evt_seq) <b>as</b> event_count, -- aka activity count</p>
<p><strong> </strong>u.unt_id</p>
<p><b>from</b></p>
<p><strong> </strong>event e <b>join</b> unit u <b>on</b> e.unit_id <b>=</b> u.id</p>
<p><b>where</b></p>
<p><strong> </strong>e.evt_time <b>>=</b> <b>Timestamp</b> '2015-03-08 05:00:00'</p>
<p><b><strong> </strong>and</b> e.evt_time < <b>Timestamp</b> '2015-03-09 05:00:00'</p>
<p><b>group</b> <b>by</b></p>
<p><strong> </strong>u.unt_id, <b>time</b></p>
pricher
<p>Hi,</p>
<p> </p>
<p>The screenshot you posted is exactly the behavior I described in my previous post. By putting the chart in the header area of of your grouping (by unit_id), you will get one chart per unit_id. If you want to group the Y-Series by unit_id, you need to put the chart <em>outside </em>of any header of footer area for the group. The easiest way would be to create the chart by itself, outside the table.</p>
<p> </p>
<p>Take a look at the attached design. It shows the behavior of creating the chart by itself (chart on the left side) vs. placing the chart inside the group header section. Keep in mind that the two charts are designed exactly the same way, with Y-Series grouping.</p>
<p> </p>
<p>Hope this helps,</p>
<p> </p>
<p>P.</p>
sbarkdull
<p>Perfect!</p>
<p>This is exactly what I needed, thank you.</p>