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)
Bar Chart from Table
smgomes
Hi,
i had a Table with the following information:
Header Group > Jan | Fev | Mar | Apr | Jun | Jul | Aug | ....
Details (Hidden)> d1 d2 d3 d4......
Footer Group > s1 s2 s3 s4...............
Where d1, d2, d3 is row["price"] * row["quantity"] (Data Element)
and S1 is an Aggregation from d1, S2 Aggregattion from d2....
When i add a Bar Chart i doesn't have the fields S1 and S2.... can you help me create a chart based on this information?
Thanks a lot.
Find more posts tagged with
Comments
mwilliams
Hi smgomes,
Are you using the table as the dataSet? Also, what version of BIRT are you using?
smgomes
<blockquote class='ipsBlockquote' data-author="mwilliams"><p>Hi smgomes,<br />
<br />
Are you using the table as the dataSet? Also, what version of BIRT are you using?</p></blockquote>
<br />
<br />
Yes Williams, <br />
<br />
my Dataset is a ScriptDataSet (Datanucleus), in Binding of Table i had my dataset.<br />
<br />
My Version is 2.2.2<br />
<br />
Thanks.
mwilliams
But for the chart, you're selecting the table from the drop down to use as your source, correct?
smgomes
<blockquote class='ipsBlockquote' data-author="mwilliams"><p>But for the chart, you're selecting the table from the drop down to use as your source, correct?</p></blockquote>
<br />
In Chart in property "Select Data" i selected "Use Data from" and choosed the name of my Dataset...
mwilliams
smgomes,
The aggregations are in your table, so you won't see them in your chart unless you name your table in the general tab of the property editor, and then choose the table name from the use report item option dropdown in the chart editor. In 2.2.2, you'll be able to use the aggregations you made in your table then, but you'll still need to use the chart x-axis grouping to combine like categories. Hope this helps.
smgomes
<blockquote class='ipsBlockquote' data-author="mwilliams"><p>smgomes,<br />
<br />
The aggregations are in your table, so you won't see them in your chart unless you name your table in the general tab of the property editor, and then choose the table name from the use report item option dropdown in the chart editor. In 2.2.2, you'll be able to use the aggregations you made in your table then, but you'll still need to use the chart x-axis grouping to combine like categories. Hope this helps.</p></blockquote>
<br />
Thanks mwilliams it helps me, but in chart editor when i select Report Item "Table" i can´t drag & drop to X series or Y series, any suggetion? <br />
<br />
X series and Y series are disable...<br />
<br />
Thanks.
mwilliams
Can you attach your report? If I'm understanding right, this should not be the case.
smgomes
<blockquote class='ipsBlockquote' data-author="mwilliams"><p>Can you attach your report? If I'm understanding right, this should not be the case.</p></blockquote>
<br />
Hi mwilliams,<br />
<br />
i'm using a ScritDataSet, when i try drag & drog the fields to X Series or Y Series the chart editor show an error...<br />
<br />
i want a Bar Chart with:<br />
<br />
X Series - Jan | Fev | Mar | Apr | .....<br />
Y Series - Aggregation value for each month<br />
<br />
Thanks.
smgomes
My rptdesign file.
mwilliams
smgomes,
I cannot access your data, so I have an error in the chart editor at the tip of the select data tab. Are you getting an error in there as well? This may be causing your x and y series to be disabled. If you can reproduce this with a simple scripted dataSource or with the sample database, that'd be great!
smgomes
<blockquote class='ipsBlockquote' data-author="mwilliams"><p>smgomes,<br />
<br />
I cannot access your data, so I have an error in the chart editor at the tip of the select data tab. Are you getting an error in there as well? This may be causing your x and y series to be disabled. If you can reproduce this with a simple scripted dataSource or with the sample database, that'd be great!</p></blockquote>
<br />
Hi mwilliams,<br />
<br />
i'am using BIRT in Rich Client Platform application with Datanucleus, my data is initialized when i call the report through application in Java. My Dataset is a ScriptedDataSet...<br />
<br />
Thanks.
mwilliams
smgomes,
Is there an error at the top of the chart editor when you are seeing the x and y axis category boxes disabled?
smgomes
<blockquote class='ipsBlockquote' data-author="mwilliams"><p>smgomes,<br />
<br />
Is there an error at the top of the chart editor when you are seeing the x and y axis category boxes disabled?</p></blockquote>
<br />
Yes, mwilliams.
mwilliams
smgomes,
What is the error?
smgomes
<blockquote class='ipsBlockquote' data-author="mwilliams"><p>smgomes,<br />
<br />
What is the error?</p></blockquote>
<br />
A BIRT exception occurred: There are errors evaluating script "__bm_open()":<br />
ReferenceError: "entidadesmovimentos" is not defined. (<inline>#2).. See next exception for more information.<br />
There are errors evaluating script "__bm_open()":<br />
ReferenceError: "entidadesmovimentos" is not defined. (<inline>#2).<br />
<br />
<br />
d1-entidadesmovimentos > ScripteddataSet<br />
<br />
In script, at Open Method i had this: iterator_entidadesmovimentos = entidadesmovimentos.iterator();<br />
<br />
entidadesmovimentos is a collection (Java Object)<br />
<br />
Thanks.
mwilliams
smgomes,
So, it's probably not just the chart that's not working. You're probably not able to run a simple table tied to this dataSet either. Is this correct? Where do you define this collection? Is it in a jar file or do you just have it in a .java file? Also, where are you placing this file? Let me know.
smgomes
<blockquote class='ipsBlockquote' data-author="mwilliams"><p>smgomes,<br />
<br />
So, it's probably not just the chart that's not working. You're probably not able to run a simple table tied to this dataSet either. Is this correct? Where do you define this collection? Is it in a jar file or do you just have it in a .java file? Also, where are you placing this file? Let me know.</p></blockquote>
<br />
The collection is defined at Java File, when i call the report i use the EngineConfig.setProperty(<datasetname>, collection) to inicialize the dataset.<br />
<br />
Thanks.
mwilliams
If you open up your dataSet and click the "preview results" tab, do you see any data?
smgomes
<blockquote class='ipsBlockquote' data-author="mwilliams"><p>If you open up your dataSet and click the "preview results" tab, do you see any data?</p></blockquote>
<br />
If i edit the report, and click the Preview Results i can't see any data. The dataset is only initialize when i run the report....<br />
<br />
Thanks