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 other aggregate fields to chart that are not present on y axis?
Arif shah
<p>Hi,</p>
<p> </p>
<p>On x axis, I have months and on y axis, I have sale. I wanted add the number of units sold to the tooltip (along with sale amount)</p>
<p> </p>
<p>To do this, I open the the chart data binding, and added an aggregation field, and created aggregation for units sold. Then I added this to the tooltip of Y series values. I also added the aggregation for sale amount</p>
<p> </p>
<p>What I have found is that If I put my mouse over a month bar, the tooltip shows units sold and sale amount for all months rather than for that specific month</p>
<p> </p>
<p>My question is how is the aggregation grouped by months so that if I put the mouse on a bar, it only shows sale and units for that month only. I am not sure how the grouping works for aggregation</p>
<p> </p>
<p>When I was creating the aggregation, the group was disabled and only list was selectable as can be seen in the below image</p>
<p> </p>
<p>Arif</p>
Find more posts tagged with
Comments
pricher
<p>Hi,</p>
<p> </p>
<p>The easiest way is to create your aggregations in a table, embed your chart in the table footer, and bind your chart to the data container. You will then be able to create tooltips that use aggregations created at the table level. See attached example.</p>
<p> </p>
<p>Hope this helps,</p>
<p> </p>
<p>P.</p>
Arif shah
<p>Hi,</p>
<p> </p>
<p>Many thanks for the tip. two more question.</p>
<p> </p>
<p>1) If I want to add the same aggregation (that is being used by the chart y series), do I still have to do it through table or can I add it by simply adding the field to the tooltip</p>
<p> </p>
<p>For example, If my y series is using sum(budget), do I have to add row["budget"] to the tooltip because I cannot find any function for aggregation in tooltip. I actually want to edit the text of tooltip so I would like to show something like "The budget amount is: " row["budget"]. However this expression shows a value that is much less than what is being plotted on the bars</p>
<p> </p>
<p>2) How do I format the number of the default tooltip data label...(I am not editing the tooltip text/expression of the Y values series)</p>
pricher
<p>1: You cannot add an aggregation at the tooltip level. That's why it is preferable to create your aggregations at the table level and reuse them in the chart.</p>
<p> </p>
<p>2: To format the aggregation value in the tooltip, use the BIRT Formatter function, such as:</p>
<p><span style="font-family:'courier new', courier, monospace;">Formatter.format(row["Sales"],"#,##0.00")</span></p>
<p> </p>
<p>P.</p>
Arif shah
<p>If I do not want to edit the tooltip and let the chart shows its default label, how do I format that label? I tried to edit the Y values series expression <span style="font-family:'courier new', courier, monospace;">Formatter.format(row["Sales"],"$#,##0.00")</span> the tooltip is still not showing the $</p>
<p> </p>
<p>Arif</p>
pricher
<p>Strange... Formatter with the $ sign works well for me. Resending an updated rptdesign.</p>
<p> </p>
<p>P.</p>
Arif shah
<p>Hi,</p>
<p> </p>
<p>I have tried to create a group in a table and then in the footer I have dragged a chart. I have used the container dataset but the table group is not appearing in the list of chart. Can you please explain how to use the table/container group in the chart that is inside the table</p>
<p> </p>
<p>Arif</p>
Arif shah
<p>Also, If I have a table with EmployeeName, Month and leaves count. I want the months on x axis, names on grouping/legends and leavescounts on y axis</p>
<p> </p>
<p>I created two groups, One for employees and one for months and I want the leaves count to be grouped by both employees and months, how can I create this grouping so that I can use it in the chart?</p>
<p> </p>
<p>Arif</p>
pricher
<p>Hi,</p>
<p> </p>
<p>1. If you choose "Inherit Columns and Groups" in the Select Data tab of the chart wizard, the groups you have defined at the table level will appear. The example I had already posted is set up this way.</p>
<p> </p>
<p>2. The type of chart you describe in your last post is better done by letting the chart engine create the groupings on Month (Category X Series) and Employee Name (Optional Y Series Grouping)</p>
<p> </p>
<p>P.</p>
Arif shah
<p>If I do the grouping through chart and not use table grouping, It gives me the correct chart. On x axis, I have months, Option Y grouping has EmployeeName and on Y axis is the count of leaves. This gives me the correct chart. The problem is that I want to edit the tool tip and show EmployeeName, Month and Y value in the tooltip of a point. I cannot sumup the leaves in the tooltip unless I have a count of leaves grouped by Month, EmployeeName etc</p>
<p> </p>
<p>Arif</p>