Skip to main content



      Home
Home » Archived » BIRT » Empty row set problem for chart
Empty row set problem for chart [message #211528] Mon, 15 January 2007 08:06 Go to next message
Eclipse UserFriend
Originally posted by: vgryn.yahoo.com

Hi!

Using BIRT 2.2M2.

I created Bar chart with lots of complex expressions over the data set, such
as
row[...].toSrting()

When row set for chart is empty (include after chart row set filtering), bar
chart is not displayed at all. Also it causes errors in preview mode
(toString() obviously cannot be evaluated).
I would like to display some sort of message or so in such case.

Question 1. Is it possible somehow to check in run-time if row set for chart
is empty from outside of the chart object?

Question 2. Is it possible to check above from inside (in the chart
scripts)?

Question 3. Is it possible to draw something custom inside of the chart? Can
I hide plot and legend areas and leave just chart title to display a
message? I know I can, but would not BIRT evaluate Plot area expression
(like row[...].toSrting()) anyway and thus entire chart fails because
errors?

Note that I cannot just check data - because chart contains filtering as
well (that is changed dynamically by user input).

General question is: does BIRT contain any features for charts to deal with
empty row sets?

--
WBR,
Vlad Grynchyshyn
Re: Empty row set problem for chart [message #211552 is a reply to message #211528] Mon, 15 January 2007 08:25 Go to previous message
Eclipse UserFriend
You could try to check for null in your expression.

if ( row[...] != null )
{
row[...].toString();
}

This will generate null points that are handled by the chart engine. The
problem you're seeing is a javascript evaluation error from the Rhino JS
engine, when calling toString() on a null object.

We decided not to ignore script errors while rendering the chart, so that
the designer could see them, otherwise they might go unnoticed in production.

Thanks,

David

> Hi!
>
> Using BIRT 2.2M2.
>
> I created Bar chart with lots of complex expressions over the data
> set, such
> as
> row[...].toSrting()
> When row set for chart is empty (include after chart row set
> filtering), bar
> chart is not displayed at all. Also it causes errors in preview mode
> (toString() obviously cannot be evaluated).
> I would like to display some sort of message or so in such case.
> Question 1. Is it possible somehow to check in run-time if row set for
> chart is empty from outside of the chart object?
>
> Question 2. Is it possible to check above from inside (in the chart
> scripts)?
>
> Question 3. Is it possible to draw something custom inside of the
> chart? Can I hide plot and legend areas and leave just chart title to
> display a message? I know I can, but would not BIRT evaluate Plot area
> expression (like row[...].toSrting()) anyway and thus entire chart
> fails because errors?
>
> Note that I cannot just check data - because chart contains filtering
> as well (that is changed dynamically by user input).
>
> General question is: does BIRT contain any features for charts to deal
> with empty row sets?
>
Previous Topic:Pie wedge dynamic (script) coloring issues
Next Topic:Cairo error with BIRT charts on Solaris
Goto Forum:
  


Current Time: Fri Apr 25 21:21:15 EDT 2025

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

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

Back to the top