Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » DataPoint Label
DataPoint Label [message #263368] Mon, 17 December 2007 12:39 Go to next message
Eclipse UserFriend
Originally posted by: anupgokhale.rediffmail.com

I have a line chart, in which I want to print an arbitary text as the
label of the datapoint. The text I want to print will be determined from
the orthogonal value of the data point. Any pointers on how to achieve
this?

Thanx.

Anup
Re: DataPoint Label [message #263399 is a reply to message #263368] Mon, 17 December 2007 16:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Anup,

Try something like this:

function beforeDrawDataPointLabel(dph, label, icsc)
{
myval = dph.getOrthogonalValue();
mylab = label.getCaption().setValue("datapoint "+myval);
}

Jason


Anup wrote:
> I have a line chart, in which I want to print an arbitary text as the
> label of the datapoint. The text I want to print will be determined from
> the orthogonal value of the data point. Any pointers on how to achieve
> this?
>
> Thanx.
>
> Anup
>
Re: DataPoint Label [message #263429 is a reply to message #263399] Tue, 18 December 2007 03:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: anupgokhale.rediffmail.com

Thanks. Works like a charm. But this has led me to another scenario. To
draw my line chart, I am pulling data from a database table essentially
having four fileds:
1. GUID : contains a unique row identifier
2. X Axis value : contains the base values of the line chart
3. Y Axis value: contains the orthogonal values of the line chart
4. Some Text : contains some additional text

Now for drawing the line chart, I am creating two arraylists representing
the "X axis value" (String) and the "Y Axis value" (Double) and setting
these as the dataset for the two series (base and orthogonal
respectively). till this step every thing works fine. Now my problem is I
want to print the text in the "Some Text" field as the datapoint label for
each datapoint. How ever I am not able to do this as there is no reference
to the "GUID" field in the orthogonal dataset and hence I cannot retrieve
the corresponding "Some Text" value.

Any pointers? Thanks.

Anup
Re: DataPoint Label [message #263470 is a reply to message #263429] Tue, 18 December 2007 16:20 Go to previous message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Anup,

I do not know of a way to do this. If your array list is available, may
be you can call out to it from the script to get the text value.

Jason

Anup wrote:
> Thanks. Works like a charm. But this has led me to another scenario. To
> draw my line chart, I am pulling data from a database table essentially
> having four fileds:
> 1. GUID : contains a unique row identifier
> 2. X Axis value : contains the base values of the line chart
> 3. Y Axis value: contains the orthogonal values of the line chart
> 4. Some Text : contains some additional text
>
> Now for drawing the line chart, I am creating two arraylists
> representing the "X axis value" (String) and the "Y Axis value" (Double)
> and setting these as the dataset for the two series (base and orthogonal
> respectively). till this step every thing works fine. Now my problem is
> I want to print the text in the "Some Text" field as the datapoint label
> for each datapoint. How ever I am not able to do this as there is no
> reference to the "GUID" field in the orthogonal dataset and hence I
> cannot retrieve the corresponding "Some Text" value.
>
> Any pointers? Thanks.
>
> Anup
>
>
>
Previous Topic:Library and style reuse
Next Topic:Replacing Null Values in a Chart
Goto Forum:
  


Current Time: Tue Nov 12 19:50:56 GMT 2024

Powered by FUDForum. Page generated in 0.03143 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top