Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Eclipse BIRT Bar Chart
Priya R
Hi,
I am creating a report in Eclipse BIRT 4.2. I need to use a bar chart to display some data. When I try to add a row of type string in the Y axis I'm getting datatype error.
Is it possible to use String data in the Y axis of a Bar Chart? If not, is there any other way I can do that?
Please help.
Thanks,
Priya
Find more posts tagged with
Comments
mwilliams
The y-axis is for numerical fields, only, I believe. If you use a string field, you'd have to use a count aggregation. If you're wanting to display a string on the y-axis, you can create a computed field that assigns a particular numeric value, for a value in your string column. Then, you'd use the numeric value as your y-axis field and then in your chart script, you could replace the y-axis labels with the string values.
Priya R
Thank you so much for the quick response Williams. I will try that.
mwilliams
Let me know if you have issues. I have an old example of this somewhere, that I might be able to find. If not, I can make another. It's not too much work, to do.
Priya R
Hi Williams,
I have attached a doc that contains a table and a chart. I need to create the chart exactly like that in BIRT. In the X- axis I need to display the NAME column and in the Y-axis I need to display the data in the SELECTED column but the label should be like ANSWER column. Is it possible to do that? Any help is much appreciated.
Thanks in advance
Regards,
Priya
mwilliams
Take a look at this example. Be sure to set the location of the flat file, in the dataSource, to where you save the csv file. Be sure to take a look at the computed column field, in the dataSet, and the script in the chart.
Priya R
It is perfectly working fine. Thank you so much for you help.
Regards,
Priya
mwilliams
Great! Glad to help. Let us know whenever you have questions!
Priya R
Hi Williams,
How can we add different footer for each page in BIRT?
I have a report that is in DOC format. I need to display different footer for first page and another one for rest of the pages. Is it possible?
Regards,
Priya
mwilliams
Put all of the elements for both setups, in the masterpage footer. You'll have to put a 2 row grid, with the first page items in one grid cell and the rest in the other. Then, in the onRender for the grid row of elements you want on the first page, try:
if (pageNumber != 1){
this.getStyle().display = "NONE";
}
In the other, put:
if (pageNumber == 1){
this.getStyle().display = "NONE";
}
You might have to make sure you run separate run and render tasks for this to work. Let me know.
Priya R
Thank you William..it is working fine.
One thing I noticed is, I changed the font of the text in my report and it is not reflecting when I see the preview in 'View Report as PDF' however it is reflecting when I preview as 'View Report in Web Viewer'. Do you know what is the reason?
Priya R
Hi William,
How can we set the interval between the labels in the chart? As you know the y-axis labels is set on the script as per your email. I need to add more Series to a single Y-axis but when I added that the labels are not showing properly. Check the image attached.
Regards,
Priya
mwilliams
Can you modify the example I attached, above, to show this issue?
Priya R
PFA..
mwilliams
The logic is still working correctly. The problem is, you're getting large values in your second series that don't match your string axis. Since you have a value of 4, for all series2 values, you're going to get 16 each time because it adds all 4 values together. That's why we had 0's for the other rows, in the first series. What are you trying to show with the second series?
Priya R
Yes you are right. It is adding up the values. I need to show the weighting scale of each question as the subset of user answer. I guess I can modify the weighting scale value in the database. I will try that way and let you know the result. Thank you Williams.
mwilliams
In this report, since all the values are 4, you could simply choose the second series in the drop down on the select data tab, then choose the aggregation of "First", in the aggregation drop down, under the series expression text box. Let me know if you get stuck trying to achieve what you're wanting.
Priya R
Hi Williams,
Is there any way we can create a chart like this in the attached file using BIRT?
Regards,
Priya
Priya R
Hi Williams,
I am able to create the chart almost the same that I attached in my previous post. But the only thing is not working is the Marker Line and the Label on the top of the marker. I need to set that dynamically based on the value from the table.
Priya R
I fixed my problem..thank you.
mwilliams
Sorry for the delayed response. Glad you found a solution to your issue! Let us know whenever you have questions!
Priya R
Williams,<br />
<br />
I have a report that contain few static text and lots of dynamic fields. I need to internationalise the report. How do we internationalise a report that contain lots of dynamic fields. <br />
<br />
For example in the below paragraph<br />
<br />
"<strong class='bbc'>Steve</strong> has a <strong class='bbc'>Master's Degree</strong> and professional qualification in <strong class='bbc'>Certificate</strong>. The key industries <strong class='bbc'>he</strong> has worked in include <strong class='bbc'>IT & Telco</strong> with functional experience in the I<strong class='bbc'>CT</strong> area. In terms of sector experience this is outlined in the chart below."<br />
<br />
The words in bold are dynamic fields and the rest are static text. How do I internationalize the paragraph?<br />
<br />
Thanks in advance<br />
Cheers,<br />
Priya
mwilliams
I responded in your other thread with the same question.
http://www.birt-exchange.org/org/forum/index.php/topic/27800-internationalizing-a-report-with-lots-of-dynamic-text/