Home
Analytics
Apply Optional Y Series Grouping only in Series 1 but not Series 2?
leeysh
Hi,
I'm trying to draw up line charts with Series 1 - the different category of cost incurred yearly basis, and Series 2 - the total of the cost incurred in that year.
Been trying a few days already but what I managed to come up till now is that Series 1 shows correctly the different cost incurred yearly, however, for Series 2 (Total), it is showing the total of each category that year, which is not what I want. Is it possible to only show the Total of that year regardless of the category?
I noticed it's due to Optional Y Series Grouping that splits the category. Is there ways to apply Optional Y Series Grouping in Series 1 but not Series 2??
Urgently need help! Thanks in advance!!
Cheers,
Genevieve
Find more posts tagged with
Comments
mwilliams
I'm pretty sure that if you use the y-series grouping, that it will apply for all series. I don't think there's a way to disclude a series.
leeysh
Hi Michael,
Thanks for your response.
Cheers,
Genevieve
mwilliams
So, what you want is a chart that shows the date on the x-axis, the value on the y-axis and then have optional grouping to split each year up by category. Then have your first series show the values by category for each year and the second series just show the total? Is this correct? You might be able to do a union in your dataSet to do this if using SQL or use joint dataSets and computed columns within BIRT to do it. This would essentially make "total" a category, so you'd only have a single series, but Total would be called out as a separate color in your legend. Just an idea to workaround the issue.
leeysh
Hi Michael,
Thanks for the suggestion. Yup, that's what I need to show and your suggestion works fine too! Didn't thought of that. Thanks again!!
Cheers,
Genevieve
mwilliams
Not a problem at all. Glad to help! Let us know whenever you have questions!
giridhar
Hi michael,
my name is giridhar.I have a data like this.
state Month Type Sale
Ap March N 10
Ap March P 20
Ap March s 30
Ap April N 25
Ap April P 35
Ap April s 45
I want do display statewise monthwise product type sales using chart.
In x-axis category,i mentioned as month.
In Vaule(Y-axis) category,i mentioned as sales
In optional Y Series grouping category,i mentioned as Type.Till now its good.
But i want to display the state details in the chart.How can i mention in the chart.please help me.
giridhar
Hi friends,
please help me. i have a to display a date in chart area as duration.
this date is a report parameter that i give.
How to display date in the top of the chart.please help me.
giridhar
Hi Michael,
Is there anyway to display some text on chart apart from the Heading and. Y-Series.
i want to display data of a report parameter in the chart area,so that it will display the data according to given report parameter.how should i display,please help me.
kclark
The best way to do this is to put your chart in a grid with labels above, bellow, or beside the grid and then change the value of the label to your parameter.
Re-Porter
Hi!<br />
<br />
I've got the same problem. I use the <strong class='bbc'>Java API</strong> and tried to add a grid with labels but I wasn't very successful.<br />
<br />
As far as I found out I can set a grid like that: [ChartWithAxes].getBlock().setRow(int)<br />
Then I should somehow be able to place the actual chart in the middle and have one row above and one below the chart. But I couldn't find out how to place a label in one of those rows. I actually couldn't find out how to cycle through the rows or address one particular row with the Java-API.<br />
Am I completely wrong with my approach? Thanks for further advice or solutions.
Re-Porter
I'm still looking for a solution. So <em class='bbc'>any </em>help is welcome.<br />
<br />
Further questions:<br />
I tried to use this class org.eclipse.birt.chart.model.component.impl.GridImpl.<br />
But I found no possibility to define the number of rows with the Java API. Is there a way to do this?<br />
And if so, the most important thing: Will the grid be part of the rendered chart (using IDeviceRenderer)?
kclark
Sorry about the late reply. Here's how you would set an object in the center of the grid.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>ReportDesignHandle design = session.createDesign( );
ElementFactory efactory = design.getElementFactory( );
DesignElementHandle element = efactory.newSimpleMasterPage( "Page Master" );
design.getMasterPages( ).add( element );
GridHandle grid = efactory.newGridItem( null, 3 /* cols */, 3 /* row */ );
design.getBody( ).add( grid );
grid.setWidth( "100%" );
// Get the first row
RowHandle row = (RowHandle) grid.getRows( ).get(0);
row = (RowHandle) grid.getRows( ).get(1);
LabelHandle label = efactory.newLabel( null );
cell = (CellHandle) row.getCells( ).get( 1 );
cell.getContent( ).add( label );
label.setText( "This label will appear in the center row, first colmn" );
// Change to the second row
row = (RowHandle) grid.getRows( ).get(1);
LabelHandle secondLabel = efactory.newLabel( null );
cell = (CellHandle) row.getCells( ).get( 1 );
cell.getContent( ).add( secondLabel );
label.setText( "This label will appear in the middle of the grid" );</pre>
<br />
I used labels as an example to keep it simple. You choose the column that the item will appear in with <br />
<br />
cell = (CellHandle) row.getCells( ).get( 1 );<br />
<br />
Then when you want to change rows you would do this with<br />
<br />
row = (RowHandle) grid.getRows( ).get(1);
Re-Porter
Thanks for the detailed answer, kclark.
This solution seems to be based on a birt report - uses mainly classes of org.eclipse.birt.report.
Up to now I only use classes of org.eclipse.birt.chart. With your solution, will it be possible to render the grid including a chart as one SVG or PNG image?
giridhar
Hi all,
i need to display the data in the format like this,
[sale1]: [sale2]: [Totalsale]:
[discount1]:[discount2]:[totaldiscount]:
[vat1]: [vat2]: [totalvat]:
[Total1]:[Total2]:[wholeTotal]:
the sale1,discount1,vat1,total1 should be displayed in individual block like list or table format.
tha sale2,discount2,vat2,total2 should be displayed in individual block like list or table format.
that totalsal,totaldiscount,totalvat,wholetotal are the values that come from adding sale1 and sale2,adding
vat1 and vat2,adding discount1 and discount2 etc.
what should is use to display like this.should i use table or grid or crosstab or list.
please help me.
thanks
giridhar.