Skip to main content



      Home
Home » Archived » BIRT » Retrieve data within a chart's scripting context
Retrieve data within a chart's scripting context [message #198432] Tue, 31 October 2006 12:59 Go to next message
Eclipse UserFriend
Originally posted by: arentsch.fzi.de

Hi,

I want to add units to a line chart's axes dynamically, e.g. "time [ns]".
The type is available from my data set bound to the chart, but it seems to
me that I can't dynamically set it with an expression like: row["TimeUnit"]

Now I tried this:

function beforeDrawAxisTitle( axis, label, context ) {
if(label.getCaption().getValue() == "time")
label.getCaption().setValue(label.getCaption().getValue() +
DataSetRow[TimeUnit]);
}

It results in an error since DataSetRow is not available.
How can I retrieve data within a chart's scripting context?

Thanks in advance,

Andreas
Re: Retrieve data within a chart's scripting context [message #198846 is a reply to message #198432] Thu, 02 November 2006 15:23 Go to previous message
Eclipse UserFriend
You need to bind this column to a series, and make the series invisible.
Then you can access the data from the series.

Thanks,

David

"Andreas Rentschler" <arentsch@fzi.de> wrote in message
news:ei82um$mjq$1@utils.eclipse.org...
> Hi,
>
> I want to add units to a line chart's axes dynamically, e.g. "time [ns]".
> The type is available from my data set bound to the chart, but it seems to
> me that I can't dynamically set it with an expression like:
> row["TimeUnit"]
>
> Now I tried this:
>
> function beforeDrawAxisTitle( axis, label, context ) {
> if(label.getCaption().getValue() == "time")
> label.getCaption().setValue(label.getCaption().getValue() +
> DataSetRow[TimeUnit]);
> }
>
> It results in an error since DataSetRow is not available.
> How can I retrieve data within a chart's scripting context?
>
> Thanks in advance,
>
> Andreas
>
Previous Topic:Is Paging Available If Don't User BirtViewer or Servlet? [2.1.1]
Next Topic:Chart Fonts
Goto Forum:
  


Current Time: Sun Jun 08 08:42:41 EDT 2025

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

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

Back to the top