Home » Archived » BIRT » Adding comments to the graph generated by BIRT.(I have a requirement where clients will add comments to the graph generated by BIRT..)
|
Re: Adding comments to the graph generated by BIRT. [message #854321 is a reply to message #853621] |
Mon, 23 April 2012 21:59 |
|
I do not know of an easy solution to this. The chart engine is either
generating an image or an svg file depending on the chart output type
selected. If you used client side javascript you could add text
elements around the chart but when you exported these to pdf they would
be lost.
Jason
On 4/23/2012 3:20 AM, Debarshi Dasgupta wrote:
> Hello All,
>
> My requirement is to allow users to add comments on the chart generated
> by BIRT. Please suggest me some possible solutions to implement the same.
>
> My platform details are as follows :
>
> BIRT runtime version : 3_7_2
> Server : Tomcat 6/WAS 6
> Java : 1.5
> I am trying to use BIRT with jsf4birt so that I can integrate BIRT with
> my existing applications (most of them are using jsf 1.2).
>
> Thanks in advance !!
|
|
| | |
Re: Adding comments to the graph generated by BIRT. [message #855161 is a reply to message #854678] |
Tue, 24 April 2012 15:09 |
|
I really do not have an example of this. But take a look at this post
to get an idea of how to call some client side script from a chart.
http://birtworld.blogspot.com/2010/05/more-on-chart-interactivity.html
Maybe you could call a servlet from the client side script to add some
comments to a db. What do you need on tooltips?
Jason
On 4/24/2012 2:38 AM, Debarshi Dasgupta wrote:
> Hi Jason,
>
> Thanks for the reply.
>
> My requirement is allow users to add comments on the chart generated and
> retain the comments in a database so that they can be displayed on load
> next time some one views the same report.
>
> It is fine with me if comments are not displayed in the pdf reports.
> Please suggest me a feasible solution for the same. Please share some
> links where you have posted about tooltip.
|
|
|
Re: Adding comments to the graph generated by BIRT. [message #870724 is a reply to message #855161] |
Wed, 09 May 2012 13:12 |
Debarshi Dasgupta Messages: 25 Registered: April 2012 |
Junior Member |
|
|
Hi Jason,
Now I am trying to do the same using Labels. I want to display the label while rendering the chart and the label will come from a database.
Example is as follows
Customer Name Transactions Comments
A 10 Premium
B 20 Basic
C 30 Gold
Can you please suggest a way if I render a chart with the following parameter :
X Axis : Customer Name
Y Axis : Transactions
Label : Comments
My dataset query is like this :
select Customer_Name,Transactions,Comments from sample_table;
[Updated on: Wed, 09 May 2012 13:13] Report message to a moderator
|
|
|
Re: Adding comments to the graph generated by BIRT. [message #870821 is a reply to message #870724] |
Wed, 09 May 2012 19:08 |
|
You should be able to do this with a hidden table and some script. Take
a look at the attached example.
Jason
On 5/9/2012 9:13 AM, Debarshi Dasgupta wrote:
> Hi Jason,
>
> Now I am trying to do the same using Labels. I want to display the label
> while rendering the chart and the label will come from a database.
>
> Example is as follows
>
> Customer Name Transactions Comments A 10 Premium B 20 Basic C 30 Gold
>
> Can you please suggest a way if I render a chart with the following
> parameter :
>
> X Axis : Customer Name
> Y Axis : Transactions Label : Comments
> My dataset query is like this :
> select Customer_Name,Transactions,Comments sample_table;
>
>
>
|
|
|
Re: Adding comments to the graph generated by BIRT. [message #870822 is a reply to message #870724] |
Wed, 09 May 2012 19:08 |
|
You should be able to do this with a hidden table and some script. Take
a look at the attached example.
Jason
On 5/9/2012 9:13 AM, Debarshi Dasgupta wrote:
> Hi Jason,
>
> Now I am trying to do the same using Labels. I want to display the label
> while rendering the chart and the label will come from a database.
>
> Example is as follows
>
> Customer Name Transactions Comments A 10 Premium B 20 Basic C 30 Gold
>
> Can you please suggest a way if I render a chart with the following
> parameter :
>
> X Axis : Customer Name
> Y Axis : Transactions Label : Comments
> My dataset query is like this :
> select Customer_Name,Transactions,Comments sample_table;
>
>
>
|
|
|
Re: Adding comments to the graph generated by BIRT. [message #870823 is a reply to message #870724] |
Wed, 09 May 2012 19:08 |
|
You should be able to do this with a hidden table and some script. Take
a look at the attached example.
Jason
On 5/9/2012 9:13 AM, Debarshi Dasgupta wrote:
> Hi Jason,
>
> Now I am trying to do the same using Labels. I want to display the label
> while rendering the chart and the label will come from a database.
>
> Example is as follows
>
> Customer Name Transactions Comments A 10 Premium B 20 Basic C 30 Gold
>
> Can you please suggest a way if I render a chart with the following
> parameter :
>
> X Axis : Customer Name
> Y Axis : Transactions Label : Comments
> My dataset query is like this :
> select Customer_Name,Transactions,Comments sample_table;
>
>
>
|
|
|
Re: Adding comments to the graph generated by BIRT. [message #870824 is a reply to message #870724] |
Wed, 09 May 2012 19:08 |
|
You should be able to do this with a hidden table and some script. Take
a look at the attached example.
Jason
On 5/9/2012 9:13 AM, Debarshi Dasgupta wrote:
> Hi Jason,
>
> Now I am trying to do the same using Labels. I want to display the label
> while rendering the chart and the label will come from a database.
>
> Example is as follows
>
> Customer Name Transactions Comments A 10 Premium B 20 Basic C 30 Gold
>
> Can you please suggest a way if I render a chart with the following
> parameter :
>
> X Axis : Customer Name
> Y Axis : Transactions Label : Comments
> My dataset query is like this :
> select Customer_Name,Transactions,Comments sample_table;
>
>
>
|
|
|
Re: Adding comments to the graph generated by BIRT. [message #870825 is a reply to message #870724] |
Wed, 09 May 2012 19:08 |
|
You should be able to do this with a hidden table and some script. Take
a look at the attached example.
Jason
On 5/9/2012 9:13 AM, Debarshi Dasgupta wrote:
> Hi Jason,
>
> Now I am trying to do the same using Labels. I want to display the label
> while rendering the chart and the label will come from a database.
>
> Example is as follows
>
> Customer Name Transactions Comments A 10 Premium B 20 Basic C 30 Gold
>
> Can you please suggest a way if I render a chart with the following
> parameter :
>
> X Axis : Customer Name
> Y Axis : Transactions Label : Comments
> My dataset query is like this :
> select Customer_Name,Transactions,Comments sample_table;
>
>
>
|
|
|
Re: Adding comments to the graph generated by BIRT. [message #870826 is a reply to message #870724] |
Wed, 09 May 2012 19:08 |
|
You should be able to do this with a hidden table and some script. Take
a look at the attached example.
Jason
On 5/9/2012 9:13 AM, Debarshi Dasgupta wrote:
> Hi Jason,
>
> Now I am trying to do the same using Labels. I want to display the label
> while rendering the chart and the label will come from a database.
>
> Example is as follows
>
> Customer Name Transactions Comments A 10 Premium B 20 Basic C 30 Gold
>
> Can you please suggest a way if I render a chart with the following
> parameter :
>
> X Axis : Customer Name
> Y Axis : Transactions Label : Comments
> My dataset query is like this :
> select Customer_Name,Transactions,Comments sample_table;
>
>
>
|
|
|
Re: Adding comments to the graph generated by BIRT. [message #870827 is a reply to message #870724] |
Wed, 09 May 2012 19:08 |
|
You should be able to do this with a hidden table and some script. Take
a look at the attached example.
Jason
On 5/9/2012 9:13 AM, Debarshi Dasgupta wrote:
> Hi Jason,
>
> Now I am trying to do the same using Labels. I want to display the label
> while rendering the chart and the label will come from a database.
>
> Example is as follows
>
> Customer Name Transactions Comments A 10 Premium B 20 Basic C 30 Gold
>
> Can you please suggest a way if I render a chart with the following
> parameter :
>
> X Axis : Customer Name
> Y Axis : Transactions Label : Comments
> My dataset query is like this :
> select Customer_Name,Transactions,Comments sample_table;
>
>
>
|
|
|
Re: Adding comments to the graph generated by BIRT. [message #870829 is a reply to message #870724] |
Wed, 09 May 2012 19:08 |
|
You should be able to do this with a hidden table and some script. Take
a look at the attached example.
Jason
On 5/9/2012 9:13 AM, Debarshi Dasgupta wrote:
> Hi Jason,
>
> Now I am trying to do the same using Labels. I want to display the label
> while rendering the chart and the label will come from a database.
>
> Example is as follows
>
> Customer Name Transactions Comments A 10 Premium B 20 Basic C 30 Gold
>
> Can you please suggest a way if I render a chart with the following
> parameter :
>
> X Axis : Customer Name
> Y Axis : Transactions Label : Comments
> My dataset query is like this :
> select Customer_Name,Transactions,Comments sample_table;
>
>
>
|
|
|
Re: Adding comments to the graph generated by BIRT. [message #870831 is a reply to message #870724] |
Wed, 09 May 2012 19:08 |
|
You should be able to do this with a hidden table and some script. Take
a look at the attached example.
Jason
On 5/9/2012 9:13 AM, Debarshi Dasgupta wrote:
> Hi Jason,
>
> Now I am trying to do the same using Labels. I want to display the label
> while rendering the chart and the label will come from a database.
>
> Example is as follows
>
> Customer Name Transactions Comments A 10 Premium B 20 Basic C 30 Gold
>
> Can you please suggest a way if I render a chart with the following
> parameter :
>
> X Axis : Customer Name
> Y Axis : Transactions Label : Comments
> My dataset query is like this :
> select Customer_Name,Transactions,Comments sample_table;
>
>
>
|
|
| |
Re: Adding comments to the graph generated by BIRT. [message #870880 is a reply to message #870873] |
Thu, 10 May 2012 07:14 |
Debarshi Dasgupta Messages: 25 Registered: April 2012 |
Junior Member |
|
|
Hi Jason I tried adding the following tag as you have used in the shared example.
I have four series in my chart
X Axis : Month
Y Axis
Series 1. A
Series 2. B
Series 3. C (Using this series as Lower Limit)
Series 4. D (Using this series as Upper Limit)
There is another column selected "comments" which I want to display as Series Label for points of intersection between A,Month.
Example
Customer Name Transactions Comments
A 10 Premium
B 20 Basic
C 30 Gold
Point A,10 will show a series label as "Premium"
Point B,20 will show a series label as "Basic"
<property name="comments">
But it is not working for me. Probably I am unable to use the script in the proper fashion.
<property name="comments">Copyright (c) 2007 <<Your Company Name here>>
Select Chart Type
Chart Type: Line
Subtype: Overlay
Select Data
Category Series: row["MONTH"]
Value Series-1: row["A"]
Value Series-2: row["B"]
Value Series-2: row["COMMENT"]
Format Chart
Series->Series Palette->Remove first two colors
Series->Value Series - 1:
Tick Show Labels
Tick Use Palette as Line Color: False
Series Line Color: Cream (249, 225, 191)
Marks->Marks: Triangle
Series->Value Series - 2:
Tick Show Labels
Tick Use Palette as Line Color: False
Series Line Color: Cream (249, 225, 191)
Marks->Marks: Triangle
Chart Area: Chart Title: Overlay Line Chart
Chart Area->Axis->X-Axis: Gridlines->Ticks Style: Below
Y-Axis: Gridlines->Ticks Style: Left
Plot: Area Within Axes->Background: RGB(255, 255, 225)
Legend: untick Visible</property>
[Updated on: Thu, 10 May 2012 07:34] Report message to a moderator
|
|
|
Re: Adding comments to the graph generated by BIRT. [message #871075 is a reply to message #870880] |
Thu, 10 May 2012 17:28 |
|
In the example I posted the first script is on the table detail rows
oncreate event. It has this script:
var var1 = this.getRowData().getColumnValue("series2");
var var2 = this.getRowData().getColumnValue("category");
reportContext.setPersistentGlobalVariable(var2,var1);
All this does is store a persistent variable named by the category with
a value that I want to access later. In this case my category has to be
unique. The second script is on the chart .
function beforeDrawDataPointLabel( dph, label, icsc )
{
var mycat = dph.getBaseDisplayValue();
var current = label.getCaption().getValue();
var ser2val =
icsc.getExternalContext().getScriptable().getPersistentGlobalVariable(mycat);
label.getCaption().setValue(current + "--" + ser2val);
}
The getBaseDisplayValue gets my unique category name and then I use this
to look up the variable I stored earlier.
Jason
On 5/10/2012 3:14 AM, Debarshi Dasgupta wrote:
> Hi Jason I tried adding the following tag as you have used in the shared
> example
> <property name="comments">
>
> But it is not working for me. Probably I am unable to use the script in
> the proper fashion.
>
>
> <property name="comments">Copyright (c) 2007 <<Your Company Name here>>
>
> Select Chart Type
> Chart Type: Line
> Subtype: Overlay
>
> Select Data
> Category Series: row["MONTH"]
> Value Series-1: row["A"]
> Value Series-2: row["B"]
> Value Series-2: row["COMMENT"]
>
> Format Chart
> Series->Series Palette->Remove first two colors
> Series->Value Series - 1: Tick Show Labels
> Tick Use Palette as Line Color: False
> Series Line Color: Cream (249, 225, 191)
> Marks->Marks: Triangle
> Series->Value Series - 2: Tick Show Labels
> Tick Use Palette as Line Color: False
> Series Line Color: Cream (249, 225, 191)
> Marks->Marks: Triangle
> Chart Area: Chart Title: Overlay Line Chart
> Chart Area->Axis->X-Axis: Gridlines->Ticks Style: Below
> Y-Axis: Gridlines->Ticks Style: Left
> Plot: Area Within Axes->Background: RGB(255, 255, 225)
> Legend: untick Visible
> ==============================================================
>
> Stacked Line Chart
> Select Chart Type
> Chart Type: Line
> Subtype: Stacked
>
> Select Data
> Category Series: row["MONTH"]
> Value Series-1: row["A"]
> Value Series-2: row["B"]
> Value Series-2: row["COMMENT"]
>
> Format Chart
> Series->Series Palette->Remove first two colors
> Series->Value Series - 1: Tick Show Labels
> Tick Use Palette as Line Color: False
> Series Line Color: Cream (249, 225, 191)
> Marks->Marks: Triangle
> Series->Value Series - 2: Tick Show Labels
> Tick Use Palette as Line Color: False
> Series Line Color: Cream (249, 225, 191)
> Marks->Marks: Triangle
> Chart Area: Chart Title: Stacked Line Chart
> Chart Area->Axis->X-Axis: Gridlines->Ticks Style: Below
> Y-Axis: Gridlines->Ticks Style: Left
> Plot: Area Within Axes->Background: RGB(255, 255, 225)
> Legend: untick Visible
> ==============================================================
>
> Percent Stacked Line Chart
> Select Chart Type
> Chart Type: Line
> Subtype: Percent Stacked
>
> Select Data
> Category Series: row["MONTH"]
> Value Series-1: row["A"]
> Value Series-2: row["B"]
> Value Series-2: row["COMMENT"]
>
> Format Chart
> Series->Series Palette->Remove first two colors
> Series->Value Series - 1: Tick Show Labels
> Tick Use Palette as Line Color: False
> Series Line Color: Cream (249, 225, 191)
> Marks->Marks: Triangle
> Series->Value Series - 2: Tick Show Labels
> Tick Use Palette as Line Color: False
> Series Line Color: Cream (249, 225, 191)
> Marks->Marks: Triangle
> Chart Area: Chart Title: Percent Stacked Line Chart
> Chart Area->Axis->X-Axis: Gridlines->Ticks Style: Below
> Y-Axis: Gridlines->Ticks Style: Left
> Plot: Area Within Axes->Background: RGB(255, 255, 225)
> Legend->Ticks Visible: False
> ==============================================================
> 3D Line Chart
> Select Chart Type
> Chart Type: Line
> Dimension: 3D
>
> Select Data
> Category Series: row["MONTH"]
> Value Series-1: row["A"]
> Value Series-2: row["B"]
> Value Series-2: row["COMMENT"]
>
> Format Chart
> Series->Series Palette->Remove first color
> Series->Value Series - 1: Tick Show Labels
> Series Line Color: Cream (249, 225, 191)
> Marks->Marks: Triangle
> Series->Value Series - 2: Tick Show Labels
> Series Line Color: Cream (249, 225, 191)
> Marks->Marks: Triangle
> Chart Area: Chart Title: 3D Line Chart
> Chart Area->Axis->Rotation X Y Z( -10, 25, 0 )</property>
>
|
|
| | | |
Goto Forum:
Current Time: Wed Sep 25 04:52:33 GMT 2024
Powered by FUDForum. Page generated in 0.05314 seconds
|