Home » Archived » BIRT » Filtering a dataset for a chart
| |
Re: Filtering a dataset for a chart [message #62712 is a reply to message #62161] |
Fri, 29 July 2005 16:08 |
Nathan McKeown Messages: 27 Registered: July 2009 |
Junior Member |
|
|
Hi David,
I have a dataset which holds the average value of a number of different
metrics. The value can vary from between very small (e.g. 0.001) and
very large (e.g. 500000) So, although I want them all on the same graph,
I would rather have them assigned to specific y-axis so that all the
values are determinable.
Here is a dummy sample to give you an idea what I mean:
Metric Name Value
---------------------------------
metric 1 1
metric 2 1
metric 3 13.809
metric 4 476.318
metric 5 0.046
metric 6 26.502
metric 7 0.328
metric 8 0
metric 9 14.636
metric 10 458.932
metric 11 0.997
metric 12 26.479
metric 13 0.328
metric 14 27.054
What I would like to do is assign metrics 1,2,5,7,8,11 and 13 to the
first y-axis, metrics 3,6,9,12,14 to the second and 4 and 10 to the
third y-axis.
Is this in any way possible or will I be required to generate separate
datasets and graphs for each y-axis?
Thanks
Nathan
David Michonneau wrote:
> Hi Nathan,
>
> Could you provide some sample data demonstrating what you are trying to
> achieve?
>
> Thanks,
>
> David
>
> "Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
> news:dbqjst$rl4$1@news.eclipse.org...
>
>>Hi,
>>
>>I am having a problem trying to filter a dataset for a chart. Ideally I
>>would like to be able to assign different rows of a result set to
>>different axis of the same chart.
>>
>>Is it possible to filter the dataset using the expression builder?
>>
>>If so could you please provide an example.
>>
>>Thanks and Regards
>>
>>Nathan
>
>
>
|
|
|
Re: Filtering a dataset for a chart [message #63279 is a reply to message #62712] |
Mon, 01 August 2005 12:28 |
David Michonneau Messages: 1145 Registered: July 2009 |
Senior Member |
|
|
Hi Nathan,
I think you should change your dataset to return the values in different
columns depending on their value range. Then you can bind each column to a
different Y axis.
Thanks,
David
"Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
news:42EA5483.4080208@scapatech.com...
> Hi David,
>
> I have a dataset which holds the average value of a number of different
> metrics. The value can vary from between very small (e.g. 0.001) and very
> large (e.g. 500000) So, although I want them all on the same graph, I
> would rather have them assigned to specific y-axis so that all the values
> are determinable.
>
> Here is a dummy sample to give you an idea what I mean:
>
> Metric Name Value
> ---------------------------------
> metric 1 1
> metric 2 1
> metric 3 13.809
> metric 4 476.318
> metric 5 0.046
> metric 6 26.502
> metric 7 0.328
> metric 8 0
> metric 9 14.636
> metric 10 458.932
> metric 11 0.997
> metric 12 26.479
> metric 13 0.328
> metric 14 27.054
>
> What I would like to do is assign metrics 1,2,5,7,8,11 and 13 to the first
> y-axis, metrics 3,6,9,12,14 to the second and 4 and 10 to the third
> y-axis.
>
> Is this in any way possible or will I be required to generate separate
> datasets and graphs for each y-axis?
>
> Thanks
>
> Nathan
>
> David Michonneau wrote:
>> Hi Nathan,
>>
>> Could you provide some sample data demonstrating what you are trying to
>> achieve?
>>
>> Thanks,
>>
>> David
>>
>> "Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
>> news:dbqjst$rl4$1@news.eclipse.org...
>>
>>>Hi,
>>>
>>>I am having a problem trying to filter a dataset for a chart. Ideally I
>>>would like to be able to assign different rows of a result set to
>>>different axis of the same chart.
>>>
>>>Is it possible to filter the dataset using the expression builder?
>>>
>>>If so could you please provide an example.
>>>
>>>Thanks and Regards
>>>
>>>Nathan
>>
>>
|
|
|
Re: Filtering a dataset for a chart [message #63304 is a reply to message #63279] |
Mon, 01 August 2005 12:49 |
Nathan McKeown Messages: 27 Registered: July 2009 |
Junior Member |
|
|
Hi David,
That is a possible solution although it would make generating the table
part of my report more complicated.
What would happen if the column lengths were different though? It would
often be the case that one y-axis column would have more values than the
others.
Cheers,
Nathan
David Michonneau wrote:
> Hi Nathan,
>
> I think you should change your dataset to return the values in different
> columns depending on their value range. Then you can bind each column to a
> different Y axis.
>
> Thanks,
>
> David
>
> "Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
> news:42EA5483.4080208@scapatech.com...
>
>>Hi David,
>>
>>I have a dataset which holds the average value of a number of different
>>metrics. The value can vary from between very small (e.g. 0.001) and very
>>large (e.g. 500000) So, although I want them all on the same graph, I
>>would rather have them assigned to specific y-axis so that all the values
>>are determinable.
>>
>>Here is a dummy sample to give you an idea what I mean:
>>
>>Metric Name Value
>>---------------------------------
>>metric 1 1
>>metric 2 1
>>metric 3 13.809
>>metric 4 476.318
>>metric 5 0.046
>>metric 6 26.502
>>metric 7 0.328
>>metric 8 0
>>metric 9 14.636
>>metric 10 458.932
>>metric 11 0.997
>>metric 12 26.479
>>metric 13 0.328
>>metric 14 27.054
>>
>>What I would like to do is assign metrics 1,2,5,7,8,11 and 13 to the first
>>y-axis, metrics 3,6,9,12,14 to the second and 4 and 10 to the third
>>y-axis.
>>
>>Is this in any way possible or will I be required to generate separate
>>datasets and graphs for each y-axis?
>>
>>Thanks
>>
>>Nathan
>>
>>David Michonneau wrote:
>>
>>>Hi Nathan,
>>>
>>>Could you provide some sample data demonstrating what you are trying to
>>>achieve?
>>>
>>>Thanks,
>>>
>>>David
>>>
>>>"Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
>>>news:dbqjst$rl4$1@news.eclipse.org...
>>>
>>>
>>>>Hi,
>>>>
>>>>I am having a problem trying to filter a dataset for a chart. Ideally I
>>>>would like to be able to assign different rows of a result set to
>>>>different axis of the same chart.
>>>>
>>>>Is it possible to filter the dataset using the expression builder?
>>>>
>>>>If so could you please provide an example.
>>>>
>>>>Thanks and Regards
>>>>
>>>>Nathan
>>>
>>>
>
|
|
|
Re: Filtering a dataset for a chart [message #63689 is a reply to message #63304] |
Tue, 02 August 2005 17:23 |
David Michonneau Messages: 1145 Registered: July 2009 |
Senior Member |
|
|
Hi Nathan,
I don't really understand how columns can have different length. They will
have null values, but the total length remains the same. The number of
non-null values will be different, but why does it matter?
You can maybe create one dataset for your table and a distinct one for your
chart to avoid changing your table.
Thanks,
David
"Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
news:dcl5ct$f3s$1@news.eclipse.org...
> Hi David,
>
> That is a possible solution although it would make generating the table
> part of my report more complicated.
>
> What would happen if the column lengths were different though? It would
> often be the case that one y-axis column would have more values than the
> others.
>
> Cheers,
>
> Nathan
>
> David Michonneau wrote:
>> Hi Nathan,
>>
>> I think you should change your dataset to return the values in different
>> columns depending on their value range. Then you can bind each column to
>> a different Y axis.
>>
>> Thanks,
>>
>> David
>>
>> "Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
>> news:42EA5483.4080208@scapatech.com...
>>
>>>Hi David,
>>>
>>>I have a dataset which holds the average value of a number of different
>>>metrics. The value can vary from between very small (e.g. 0.001) and very
>>>large (e.g. 500000) So, although I want them all on the same graph, I
>>>would rather have them assigned to specific y-axis so that all the values
>>>are determinable.
>>>
>>>Here is a dummy sample to give you an idea what I mean:
>>>
>>>Metric Name Value
>>>---------------------------------
>>>metric 1 1
>>>metric 2 1
>>>metric 3 13.809
>>>metric 4 476.318
>>>metric 5 0.046
>>>metric 6 26.502
>>>metric 7 0.328
>>>metric 8 0
>>>metric 9 14.636
>>>metric 10 458.932
>>>metric 11 0.997
>>>metric 12 26.479
>>>metric 13 0.328
>>>metric 14 27.054
>>>
>>>What I would like to do is assign metrics 1,2,5,7,8,11 and 13 to the
>>>first y-axis, metrics 3,6,9,12,14 to the second and 4 and 10 to the third
>>>y-axis.
>>>
>>>Is this in any way possible or will I be required to generate separate
>>>datasets and graphs for each y-axis?
>>>
>>>Thanks
>>>
>>>Nathan
>>>
>>>David Michonneau wrote:
>>>
>>>>Hi Nathan,
>>>>
>>>>Could you provide some sample data demonstrating what you are trying to
>>>>achieve?
>>>>
>>>>Thanks,
>>>>
>>>>David
>>>>
>>>>"Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
>>>>news:dbqjst$rl4$1@news.eclipse.org...
>>>>
>>>>
>>>>>Hi,
>>>>>
>>>>>I am having a problem trying to filter a dataset for a chart. Ideally I
>>>>>would like to be able to assign different rows of a result set to
>>>>>different axis of the same chart.
>>>>>
>>>>>Is it possible to filter the dataset using the expression builder?
>>>>>
>>>>>If so could you please provide an example.
>>>>>
>>>>>Thanks and Regards
>>>>>
>>>>>Nathan
>>>>
>>>>
>>
|
|
|
Re: Filtering a dataset for a chart [message #63990 is a reply to message #63689] |
Wed, 03 August 2005 12:44 |
George Christelis Messages: 15 Registered: July 2009 |
Junior Member |
|
|
Hi David,
I think our problem basically boils down to the following (apologies if
I get my terminology mixed up here). I am hoping that you might find the
shortcoming in our thinking. Here goes:
We wish to generate a single chart, and hence we have a single data set
due to the single dataset per chart limitation in BIRT 1.0. Our data set
is effectivly made up of a subset of data points, where each subset of
points should be grouped together (this might be that they are grouped
on the same y-axis where each subset has its own y-axis, or they might
be grouped as seperate graphs (series?) on the same y-axis).
For example, consider the following set of data points (x;y) coords:
Set 1 Set 2
------------------
(x_1;y_1) (x_2;y_3)
(x_2;y_2) (x_3;y_4)
A chart can contain only a single horizontal axis, so the x range would
have to include [x_1, x_2, x_3] to represent all four data points. I
guess this would have to be in a single column in our data set.
Therefore, the data set would look something like
X_COL Set 1 Set 2
x_1 y_1 (null)
x_2 y_2 (null)
x_2 (null) y_3
x_3 (null) y_4
Plotting (null) values at the bottom of the chart is not an acceptable
solution to this problem for us. So, is it possible to plot these on a
single chart? We might like to have Set1 on a single y axis, and set 2
on another? Or not?
Now, if there was a way to not plot (null) values then we would be okay.
I guess this would have to be a chart setting, as it seems chart
specific data set filtering doesn't exist yet...
If this is not possible we will have to generate multiple graphs and
data sets.
Thanks!
George
David Michonneau wrote:
> Hi Nathan,
>
> I don't really understand how columns can have different length. They will
> have null values, but the total length remains the same. The number of
> non-null values will be different, but why does it matter?
>
> You can maybe create one dataset for your table and a distinct one for your
> chart to avoid changing your table.
>
> Thanks,
>
> David
>
>
> "Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
> news:dcl5ct$f3s$1@news.eclipse.org...
>
>>Hi David,
>>
>>That is a possible solution although it would make generating the table
>>part of my report more complicated.
>>
>>What would happen if the column lengths were different though? It would
>>often be the case that one y-axis column would have more values than the
>>others.
>>
>>Cheers,
>>
>>Nathan
>>
>>David Michonneau wrote:
>>
>>>Hi Nathan,
>>>
>>>I think you should change your dataset to return the values in different
>>>columns depending on their value range. Then you can bind each column to
>>>a different Y axis.
>>>
>>>Thanks,
>>>
>>>David
>>>
>>>"Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
>>>news:42EA5483.4080208@scapatech.com...
>>>
>>>
>>>>Hi David,
>>>>
>>>>I have a dataset which holds the average value of a number of different
>>>>metrics. The value can vary from between very small (e.g. 0.001) and very
>>>>large (e.g. 500000) So, although I want them all on the same graph, I
>>>>would rather have them assigned to specific y-axis so that all the values
>>>>are determinable.
>>>>
>>>>Here is a dummy sample to give you an idea what I mean:
>>>>
>>>>Metric Name Value
>>>>---------------------------------
>>>>metric 1 1
>>>>metric 2 1
>>>>metric 3 13.809
>>>>metric 4 476.318
>>>>metric 5 0.046
>>>>metric 6 26.502
>>>>metric 7 0.328
>>>>metric 8 0
>>>>metric 9 14.636
>>>>metric 10 458.932
>>>>metric 11 0.997
>>>>metric 12 26.479
>>>>metric 13 0.328
>>>>metric 14 27.054
>>>>
>>>>What I would like to do is assign metrics 1,2,5,7,8,11 and 13 to the
>>>>first y-axis, metrics 3,6,9,12,14 to the second and 4 and 10 to the third
>>>>y-axis.
>>>>
>>>>Is this in any way possible or will I be required to generate separate
>>>>datasets and graphs for each y-axis?
>>>>
>>>>Thanks
>>>>
>>>>Nathan
>>>>
>>>>David Michonneau wrote:
>>>>
>>>>
>>>>>Hi Nathan,
>>>>>
>>>>>Could you provide some sample data demonstrating what you are trying to
>>>>>achieve?
>>>>>
>>>>>Thanks,
>>>>>
>>>>>David
>>>>>
>>>>>"Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
>>>>>news:dbqjst$rl4$1@news.eclipse.org...
>>>>>
>>>>>
>>>>>
>>>>>>Hi,
>>>>>>
>>>>>>I am having a problem trying to filter a dataset for a chart. Ideally I
>>>>>>would like to be able to assign different rows of a result set to
>>>>>>different axis of the same chart.
>>>>>>
>>>>>>Is it possible to filter the dataset using the expression builder?
>>>>>>
>>>>>>If so could you please provide an example.
>>>>>>
>>>>>>Thanks and Regards
>>>>>>
>>>>>>Nathan
>>>>>
>>>>>
>
>
|
|
|
Re: Filtering a dataset for a chart [message #64104 is a reply to message #63990] |
Wed, 03 August 2005 17:52 |
David Michonneau Messages: 1145 Registered: July 2009 |
Senior Member |
|
|
Hi George,
The best I could come up with, is a script to hide null datapoints by
painting them in white, and setting their label to an empty string. However
that has some limitations depending on the type of chart you are using, it
seems to work fine with bar and scatter charts, but won't work with line
charts, as a line is drawn to the null point. In any case please file a
bugzilla enhancement so that we can implement a proper solution for the next
version.
So here is the script (to paste in the script textbox of the chart builder,
I assume you are using the chart builder and not the api?):
previousFill = new Object();// used for restoring the fill for the next
element
function beforeDrawElement(dataPointHints, fill)
{
previousFill.r = fill.getRed();
previousFill.g = fill.getGreen();
previousFill.b = fill.getBlue();
if ( dataPointHints.getOrthogonalValue() == null )
fill.set(255, 255, 255);
}
function afterDrawElement(dataPointHints, fill)
{
if ( dataPointHints.getOrthogonalValue() == null )
fill.set(previousFill.r, previousFill.g, previousFill.b);
}
function beforeDrawDataPoint(dataPointHints, label)
{
if ( dataPointHints.getOrthogonalValue() == null )
label.getCaption().setValue('');
}
Let me know if that helps,
Thanks,
David
"George Christelis" <george.christelis@scapatech.com> wrote in message
news:dcqe6n$f00$1@news.eclipse.org...
> Hi David,
>
> I think our problem basically boils down to the following (apologies if I
> get my terminology mixed up here). I am hoping that you might find the
> shortcoming in our thinking. Here goes:
>
> We wish to generate a single chart, and hence we have a single data set
> due to the single dataset per chart limitation in BIRT 1.0. Our data set
> is effectivly made up of a subset of data points, where each subset of
> points should be grouped together (this might be that they are grouped on
> the same y-axis where each subset has its own y-axis, or they might be
> grouped as seperate graphs (series?) on the same y-axis).
>
> For example, consider the following set of data points (x;y) coords:
>
> Set 1 Set 2
> ------------------
> (x_1;y_1) (x_2;y_3)
> (x_2;y_2) (x_3;y_4)
>
> A chart can contain only a single horizontal axis, so the x range would
> have to include [x_1, x_2, x_3] to represent all four data points. I guess
> this would have to be in a single column in our data set. Therefore, the
> data set would look something like
>
> X_COL Set 1 Set 2
> x_1 y_1 (null)
> x_2 y_2 (null)
> x_2 (null) y_3
> x_3 (null) y_4
>
> Plotting (null) values at the bottom of the chart is not an acceptable
> solution to this problem for us. So, is it possible to plot these on a
> single chart? We might like to have Set1 on a single y axis, and set 2 on
> another? Or not?
>
> Now, if there was a way to not plot (null) values then we would be okay. I
> guess this would have to be a chart setting, as it seems chart specific
> data set filtering doesn't exist yet...
>
> If this is not possible we will have to generate multiple graphs and data
> sets.
>
> Thanks!
> George
>
>
> David Michonneau wrote:
>> Hi Nathan,
>>
>> I don't really understand how columns can have different length. They
>> will have null values, but the total length remains the same. The number
>> of non-null values will be different, but why does it matter?
>>
>> You can maybe create one dataset for your table and a distinct one for
>> your chart to avoid changing your table.
>>
>> Thanks,
>>
>> David
>>
>>
>> "Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
>> news:dcl5ct$f3s$1@news.eclipse.org...
>>
>>>Hi David,
>>>
>>>That is a possible solution although it would make generating the table
>>>part of my report more complicated.
>>>
>>>What would happen if the column lengths were different though? It would
>>>often be the case that one y-axis column would have more values than the
>>>others.
>>>
>>>Cheers,
>>>
>>>Nathan
>>>
>>>David Michonneau wrote:
>>>
>>>>Hi Nathan,
>>>>
>>>>I think you should change your dataset to return the values in different
>>>>columns depending on their value range. Then you can bind each column to
>>>>a different Y axis.
>>>>
>>>>Thanks,
>>>>
>>>>David
>>>>
>>>>"Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
>>>>news:42EA5483.4080208@scapatech.com...
>>>>
>>>>
>>>>>Hi David,
>>>>>
>>>>>I have a dataset which holds the average value of a number of different
>>>>>metrics. The value can vary from between very small (e.g. 0.001) and
>>>>>very large (e.g. 500000) So, although I want them all on the same
>>>>>graph, I would rather have them assigned to specific y-axis so that all
>>>>>the values are determinable.
>>>>>
>>>>>Here is a dummy sample to give you an idea what I mean:
>>>>>
>>>>>Metric Name Value
>>>>>---------------------------------
>>>>>metric 1 1
>>>>>metric 2 1
>>>>>metric 3 13.809
>>>>>metric 4 476.318
>>>>>metric 5 0.046
>>>>>metric 6 26.502
>>>>>metric 7 0.328
>>>>>metric 8 0
>>>>>metric 9 14.636
>>>>>metric 10 458.932
>>>>>metric 11 0.997
>>>>>metric 12 26.479
>>>>>metric 13 0.328
>>>>>metric 14 27.054
>>>>>
>>>>>What I would like to do is assign metrics 1,2,5,7,8,11 and 13 to the
>>>>>first y-axis, metrics 3,6,9,12,14 to the second and 4 and 10 to the
>>>>>third y-axis.
>>>>>
>>>>>Is this in any way possible or will I be required to generate separate
>>>>>datasets and graphs for each y-axis?
>>>>>
>>>>>Thanks
>>>>>
>>>>>Nathan
>>>>>
>>>>>David Michonneau wrote:
>>>>>
>>>>>
>>>>>>Hi Nathan,
>>>>>>
>>>>>>Could you provide some sample data demonstrating what you are trying
>>>>>>to achieve?
>>>>>>
>>>>>>Thanks,
>>>>>>
>>>>>>David
>>>>>>
>>>>>>"Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
>>>>>>news:dbqjst$rl4$1@news.eclipse.org...
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Hi,
>>>>>>>
>>>>>>>I am having a problem trying to filter a dataset for a chart. Ideally
>>>>>>>I would like to be able to assign different rows of a result set to
>>>>>>>different axis of the same chart.
>>>>>>>
>>>>>>>Is it possible to filter the dataset using the expression builder?
>>>>>>>
>>>>>>>If so could you please provide an example.
>>>>>>>
>>>>>>>Thanks and Regards
>>>>>>>
>>>>>>>Nathan
>>>>>>
>>>>>>
>>
|
|
|
Re: Filtering a dataset for a chart [message #64737 is a reply to message #64104] |
Thu, 04 August 2005 10:45 |
George Christelis Messages: 15 Registered: July 2009 |
Junior Member |
|
|
Hi David,
We've logged a bug # 106025, and cc'ed you on it.
Thanks for your help with the scripting solution. Unfortunately we are
looking at using line graphs but we appreciate the help!
Just as a matter on intered - we are looking at using the API to
generate these charts.
Thanks again,
George
David Michonneau wrote:
> Hi George,
>
> The best I could come up with, is a script to hide null datapoints by
> painting them in white, and setting their label to an empty string. However
> that has some limitations depending on the type of chart you are using, it
> seems to work fine with bar and scatter charts, but won't work with line
> charts, as a line is drawn to the null point. In any case please file a
> bugzilla enhancement so that we can implement a proper solution for the next
> version.
>
> So here is the script (to paste in the script textbox of the chart builder,
> I assume you are using the chart builder and not the api?):
>
> previousFill = new Object();// used for restoring the fill for the next
> element
>
> function beforeDrawElement(dataPointHints, fill)
> {
> previousFill.r = fill.getRed();
> previousFill.g = fill.getGreen();
> previousFill.b = fill.getBlue();
>
> if ( dataPointHints.getOrthogonalValue() == null )
> fill.set(255, 255, 255);
> }
> function afterDrawElement(dataPointHints, fill)
> {
> if ( dataPointHints.getOrthogonalValue() == null )
> fill.set(previousFill.r, previousFill.g, previousFill.b);
> }
> function beforeDrawDataPoint(dataPointHints, label)
> {
> if ( dataPointHints.getOrthogonalValue() == null )
> label.getCaption().setValue('');
> }
>
> Let me know if that helps,
>
> Thanks,
>
> David
>
> "George Christelis" <george.christelis@scapatech.com> wrote in message
> news:dcqe6n$f00$1@news.eclipse.org...
>
>>Hi David,
>>
>>I think our problem basically boils down to the following (apologies if I
>>get my terminology mixed up here). I am hoping that you might find the
>>shortcoming in our thinking. Here goes:
>>
>>We wish to generate a single chart, and hence we have a single data set
>>due to the single dataset per chart limitation in BIRT 1.0. Our data set
>>is effectivly made up of a subset of data points, where each subset of
>>points should be grouped together (this might be that they are grouped on
>>the same y-axis where each subset has its own y-axis, or they might be
>>grouped as seperate graphs (series?) on the same y-axis).
>>
>>For example, consider the following set of data points (x;y) coords:
>>
>> Set 1 Set 2
>>------------------
>>(x_1;y_1) (x_2;y_3)
>>(x_2;y_2) (x_3;y_4)
>>
>>A chart can contain only a single horizontal axis, so the x range would
>>have to include [x_1, x_2, x_3] to represent all four data points. I guess
>>this would have to be in a single column in our data set. Therefore, the
>>data set would look something like
>>
>>X_COL Set 1 Set 2
>>x_1 y_1 (null)
>>x_2 y_2 (null)
>>x_2 (null) y_3
>>x_3 (null) y_4
>>
>>Plotting (null) values at the bottom of the chart is not an acceptable
>>solution to this problem for us. So, is it possible to plot these on a
>>single chart? We might like to have Set1 on a single y axis, and set 2 on
>>another? Or not?
>>
>>Now, if there was a way to not plot (null) values then we would be okay. I
>>guess this would have to be a chart setting, as it seems chart specific
>>data set filtering doesn't exist yet...
>>
>>If this is not possible we will have to generate multiple graphs and data
>>sets.
>>
>>Thanks!
>> George
>>
>>
>>David Michonneau wrote:
>>
>>>Hi Nathan,
>>>
>>>I don't really understand how columns can have different length. They
>>>will have null values, but the total length remains the same. The number
>>>of non-null values will be different, but why does it matter?
>>>
>>>You can maybe create one dataset for your table and a distinct one for
>>>your chart to avoid changing your table.
>>>
>>>Thanks,
>>>
>>>David
>>>
>>>
>>>"Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
>>>news:dcl5ct$f3s$1@news.eclipse.org...
>>>
>>>
>>>>Hi David,
>>>>
>>>>That is a possible solution although it would make generating the table
>>>>part of my report more complicated.
>>>>
>>>>What would happen if the column lengths were different though? It would
>>>>often be the case that one y-axis column would have more values than the
>>>>others.
>>>>
>>>>Cheers,
>>>>
>>>>Nathan
>>>>
>>>>David Michonneau wrote:
>>>>
>>>>
>>>>>Hi Nathan,
>>>>>
>>>>>I think you should change your dataset to return the values in different
>>>>>columns depending on their value range. Then you can bind each column to
>>>>>a different Y axis.
>>>>>
>>>>>Thanks,
>>>>>
>>>>>David
>>>>>
>>>>>"Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
>>>>>news:42EA5483.4080208@scapatech.com...
>>>>>
>>>>>
>>>>>
>>>>>>Hi David,
>>>>>>
>>>>>>I have a dataset which holds the average value of a number of different
>>>>>>metrics. The value can vary from between very small (e.g. 0.001) and
>>>>>>very large (e.g. 500000) So, although I want them all on the same
>>>>>>graph, I would rather have them assigned to specific y-axis so that all
>>>>>>the values are determinable.
>>>>>>
>>>>>>Here is a dummy sample to give you an idea what I mean:
>>>>>>
>>>>>>Metric Name Value
>>>>>>---------------------------------
>>>>>>metric 1 1
>>>>>>metric 2 1
>>>>>>metric 3 13.809
>>>>>>metric 4 476.318
>>>>>>metric 5 0.046
>>>>>>metric 6 26.502
>>>>>>metric 7 0.328
>>>>>>metric 8 0
>>>>>>metric 9 14.636
>>>>>>metric 10 458.932
>>>>>>metric 11 0.997
>>>>>>metric 12 26.479
>>>>>>metric 13 0.328
>>>>>>metric 14 27.054
>>>>>>
>>>>>>What I would like to do is assign metrics 1,2,5,7,8,11 and 13 to the
>>>>>>first y-axis, metrics 3,6,9,12,14 to the second and 4 and 10 to the
>>>>>>third y-axis.
>>>>>>
>>>>>>Is this in any way possible or will I be required to generate separate
>>>>>>datasets and graphs for each y-axis?
>>>>>>
>>>>>>Thanks
>>>>>>
>>>>>>Nathan
>>>>>>
>>>>>>David Michonneau wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Hi Nathan,
>>>>>>>
>>>>>>>Could you provide some sample data demonstrating what you are trying
>>>>>>>to achieve?
>>>>>>>
>>>>>>>Thanks,
>>>>>>>
>>>>>>>David
>>>>>>>
>>>>>>>"Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
>>>>>>>news:dbqjst$rl4$1@news.eclipse.org...
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>Hi,
>>>>>>>>
>>>>>>>>I am having a problem trying to filter a dataset for a chart. Ideally
>>>>>>>>I would like to be able to assign different rows of a result set to
>>>>>>>>different axis of the same chart.
>>>>>>>>
>>>>>>>>Is it possible to filter the dataset using the expression builder?
>>>>>>>>
>>>>>>>>If so could you please provide an example.
>>>>>>>>
>>>>>>>>Thanks and Regards
>>>>>>>>
>>>>>>>>Nathan
>>>>>>>
>>>>>>>
>
|
|
|
Re: Filtering a dataset for a chart [message #64935 is a reply to message #64737] |
Thu, 04 August 2005 17:56 |
David Michonneau Messages: 1145 Registered: July 2009 |
Senior Member |
|
|
Hi George,
Thank you for submitting the bugzilla entry. In the meantime, you can always
write your own Line renderer, so that it does not show null values.
Thanks,
David
"George Christelis" <george.christelis@scapatech.com> wrote in message
news:dcsrl8$vck$1@news.eclipse.org...
> Hi David,
>
> We've logged a bug # 106025, and cc'ed you on it.
>
> Thanks for your help with the scripting solution. Unfortunately we are
> looking at using line graphs but we appreciate the help!
>
> Just as a matter on intered - we are looking at using the API to generate
> these charts.
>
> Thanks again,
> George
>
> David Michonneau wrote:
>> Hi George,
>>
>> The best I could come up with, is a script to hide null datapoints by
>> painting them in white, and setting their label to an empty string.
>> However that has some limitations depending on the type of chart you are
>> using, it seems to work fine with bar and scatter charts, but won't work
>> with line charts, as a line is drawn to the null point. In any case
>> please file a bugzilla enhancement so that we can implement a proper
>> solution for the next version.
>>
>> So here is the script (to paste in the script textbox of the chart
>> builder, I assume you are using the chart builder and not the api?):
>>
>> previousFill = new Object();// used for restoring the fill for the next
>> element
>>
>> function beforeDrawElement(dataPointHints, fill)
>> {
>> previousFill.r = fill.getRed();
>> previousFill.g = fill.getGreen();
>> previousFill.b = fill.getBlue();
>>
>> if ( dataPointHints.getOrthogonalValue() == null )
>> fill.set(255, 255, 255);
>> }
>> function afterDrawElement(dataPointHints, fill)
>> {
>> if ( dataPointHints.getOrthogonalValue() == null )
>> fill.set(previousFill.r, previousFill.g, previousFill.b);
>> }
>> function beforeDrawDataPoint(dataPointHints, label)
>> {
>> if ( dataPointHints.getOrthogonalValue() == null )
>> label.getCaption().setValue('');
>> }
>>
>> Let me know if that helps,
>>
>> Thanks,
>>
>> David
>>
>> "George Christelis" <george.christelis@scapatech.com> wrote in message
>> news:dcqe6n$f00$1@news.eclipse.org...
>>
>>>Hi David,
>>>
>>>I think our problem basically boils down to the following (apologies if I
>>>get my terminology mixed up here). I am hoping that you might find the
>>>shortcoming in our thinking. Here goes:
>>>
>>>We wish to generate a single chart, and hence we have a single data set
>>>due to the single dataset per chart limitation in BIRT 1.0. Our data set
>>>is effectivly made up of a subset of data points, where each subset of
>>>points should be grouped together (this might be that they are grouped on
>>>the same y-axis where each subset has its own y-axis, or they might be
>>>grouped as seperate graphs (series?) on the same y-axis).
>>>
>>>For example, consider the following set of data points (x;y) coords:
>>>
>>> Set 1 Set 2
>>>------------------
>>>(x_1;y_1) (x_2;y_3)
>>>(x_2;y_2) (x_3;y_4)
>>>
>>>A chart can contain only a single horizontal axis, so the x range would
>>>have to include [x_1, x_2, x_3] to represent all four data points. I
>>>guess this would have to be in a single column in our data set.
>>>Therefore, the data set would look something like
>>>
>>>X_COL Set 1 Set 2
>>>x_1 y_1 (null)
>>>x_2 y_2 (null)
>>>x_2 (null) y_3
>>>x_3 (null) y_4
>>>
>>>Plotting (null) values at the bottom of the chart is not an acceptable
>>>solution to this problem for us. So, is it possible to plot these on a
>>>single chart? We might like to have Set1 on a single y axis, and set 2 on
>>>another? Or not?
>>>
>>>Now, if there was a way to not plot (null) values then we would be okay.
>>>I guess this would have to be a chart setting, as it seems chart specific
>>>data set filtering doesn't exist yet...
>>>
>>>If this is not possible we will have to generate multiple graphs and data
>>>sets.
>>>
>>>Thanks!
>>> George
>>>
>>>
>>>David Michonneau wrote:
>>>
>>>>Hi Nathan,
>>>>
>>>>I don't really understand how columns can have different length. They
>>>>will have null values, but the total length remains the same. The number
>>>>of non-null values will be different, but why does it matter?
>>>>
>>>>You can maybe create one dataset for your table and a distinct one for
>>>>your chart to avoid changing your table.
>>>>
>>>>Thanks,
>>>>
>>>>David
>>>>
>>>>
>>>>"Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
>>>>news:dcl5ct$f3s$1@news.eclipse.org...
>>>>
>>>>
>>>>>Hi David,
>>>>>
>>>>>That is a possible solution although it would make generating the table
>>>>>part of my report more complicated.
>>>>>
>>>>>What would happen if the column lengths were different though? It would
>>>>>often be the case that one y-axis column would have more values than
>>>>>the others.
>>>>>
>>>>>Cheers,
>>>>>
>>>>>Nathan
>>>>>
>>>>>David Michonneau wrote:
>>>>>
>>>>>
>>>>>>Hi Nathan,
>>>>>>
>>>>>>I think you should change your dataset to return the values in
>>>>>>different columns depending on their value range. Then you can bind
>>>>>>each column to a different Y axis.
>>>>>>
>>>>>>Thanks,
>>>>>>
>>>>>>David
>>>>>>
>>>>>>"Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
>>>>>>news:42EA5483.4080208@scapatech.com...
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Hi David,
>>>>>>>
>>>>>>>I have a dataset which holds the average value of a number of
>>>>>>>different metrics. The value can vary from between very small (e.g.
>>>>>>>0.001) and very large (e.g. 500000) So, although I want them all on
>>>>>>>the same graph, I would rather have them assigned to specific y-axis
>>>>>>>so that all the values are determinable.
>>>>>>>
>>>>>>>Here is a dummy sample to give you an idea what I mean:
>>>>>>>
>>>>>>>Metric Name Value
>>>>>>>---------------------------------
>>>>>>>metric 1 1
>>>>>>>metric 2 1
>>>>>>>metric 3 13.809
>>>>>>>metric 4 476.318
>>>>>>>metric 5 0.046
>>>>>>>metric 6 26.502
>>>>>>>metric 7 0.328
>>>>>>>metric 8 0
>>>>>>>metric 9 14.636
>>>>>>>metric 10 458.932
>>>>>>>metric 11 0.997
>>>>>>>metric 12 26.479
>>>>>>>metric 13 0.328
>>>>>>>metric 14 27.054
>>>>>>>
>>>>>>>What I would like to do is assign metrics 1,2,5,7,8,11 and 13 to the
>>>>>>>first y-axis, metrics 3,6,9,12,14 to the second and 4 and 10 to the
>>>>>>>third y-axis.
>>>>>>>
>>>>>>>Is this in any way possible or will I be required to generate
>>>>>>>separate datasets and graphs for each y-axis?
>>>>>>>
>>>>>>>Thanks
>>>>>>>
>>>>>>>Nathan
>>>>>>>
>>>>>>>David Michonneau wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>Hi Nathan,
>>>>>>>>
>>>>>>>>Could you provide some sample data demonstrating what you are trying
>>>>>>>>to achieve?
>>>>>>>>
>>>>>>>>Thanks,
>>>>>>>>
>>>>>>>>David
>>>>>>>>
>>>>>>>>"Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
>>>>>>>>news:dbqjst$rl4$1@news.eclipse.org...
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>Hi,
>>>>>>>>>
>>>>>>>>>I am having a problem trying to filter a dataset for a chart.
>>>>>>>>>Ideally I would like to be able to assign different rows of a
>>>>>>>>>result set to different axis of the same chart.
>>>>>>>>>
>>>>>>>>>Is it possible to filter the dataset using the expression builder?
>>>>>>>>>
>>>>>>>>>If so could you please provide an example.
>>>>>>>>>
>>>>>>>>>Thanks and Regards
>>>>>>>>>
>>>>>>>>>Nathan
>>>>>>>>
>>>>>>>>
>>
|
|
|
Re: Filtering a dataset for a chart [message #66376 is a reply to message #64935] |
Wed, 10 August 2005 09:57 |
George Christelis Messages: 15 Registered: July 2009 |
Junior Member |
|
|
Thanks David - but one more question!
I've written my own Line renderer that filters our data points based on
their null values. It's working a treat.
Is there a seamless way that I can hook my new renderer into the
charting engine, or do I need to rebuild and distribute the affected
birt plugin?
Thanks,
George
David Michonneau wrote:
> Hi George,
>
> Thank you for submitting the bugzilla entry. In the meantime, you can always
> write your own Line renderer, so that it does not show null values.
>
> Thanks,
>
> David
>
> "George Christelis" <george.christelis@scapatech.com> wrote in message
> news:dcsrl8$vck$1@news.eclipse.org...
>
>>Hi David,
>>
>>We've logged a bug # 106025, and cc'ed you on it.
>>
>>Thanks for your help with the scripting solution. Unfortunately we are
>>looking at using line graphs but we appreciate the help!
>>
>>Just as a matter on intered - we are looking at using the API to generate
>>these charts.
>>
>>Thanks again,
>> George
>>
>>David Michonneau wrote:
>>
>>>Hi George,
>>>
>>>The best I could come up with, is a script to hide null datapoints by
>>>painting them in white, and setting their label to an empty string.
>>>However that has some limitations depending on the type of chart you are
>>>using, it seems to work fine with bar and scatter charts, but won't work
>>>with line charts, as a line is drawn to the null point. In any case
>>>please file a bugzilla enhancement so that we can implement a proper
>>>solution for the next version.
>>>
>>>So here is the script (to paste in the script textbox of the chart
>>>builder, I assume you are using the chart builder and not the api?):
>>>
>>>previousFill = new Object();// used for restoring the fill for the next
>>>element
>>>
>>>function beforeDrawElement(dataPointHints, fill)
>>>{
>>> previousFill.r = fill.getRed();
>>> previousFill.g = fill.getGreen();
>>> previousFill.b = fill.getBlue();
>>>
>>> if ( dataPointHints.getOrthogonalValue() == null )
>>> fill.set(255, 255, 255);
>>>}
>>>function afterDrawElement(dataPointHints, fill)
>>>{
>>> if ( dataPointHints.getOrthogonalValue() == null )
>>> fill.set(previousFill.r, previousFill.g, previousFill.b);
>>>}
>>>function beforeDrawDataPoint(dataPointHints, label)
>>>{
>>> if ( dataPointHints.getOrthogonalValue() == null )
>>> label.getCaption().setValue('');
>>>}
>>>
>>>Let me know if that helps,
>>>
>>>Thanks,
>>>
>>>David
>>>
>>>"George Christelis" <george.christelis@scapatech.com> wrote in message
>>>news:dcqe6n$f00$1@news.eclipse.org...
>>>
>>>
>>>>Hi David,
>>>>
>>>>I think our problem basically boils down to the following (apologies if I
>>>>get my terminology mixed up here). I am hoping that you might find the
>>>>shortcoming in our thinking. Here goes:
>>>>
>>>>We wish to generate a single chart, and hence we have a single data set
>>>>due to the single dataset per chart limitation in BIRT 1.0. Our data set
>>>>is effectivly made up of a subset of data points, where each subset of
>>>>points should be grouped together (this might be that they are grouped on
>>>>the same y-axis where each subset has its own y-axis, or they might be
>>>>grouped as seperate graphs (series?) on the same y-axis).
>>>>
>>>>For example, consider the following set of data points (x;y) coords:
>>>>
>>>>Set 1 Set 2
>>>>------------------
>>>>(x_1;y_1) (x_2;y_3)
>>>>(x_2;y_2) (x_3;y_4)
>>>>
>>>>A chart can contain only a single horizontal axis, so the x range would
>>>>have to include [x_1, x_2, x_3] to represent all four data points. I
>>>>guess this would have to be in a single column in our data set.
>>>>Therefore, the data set would look something like
>>>>
>>>>X_COL Set 1 Set 2
>>>>x_1 y_1 (null)
>>>>x_2 y_2 (null)
>>>>x_2 (null) y_3
>>>>x_3 (null) y_4
>>>>
>>>>Plotting (null) values at the bottom of the chart is not an acceptable
>>>>solution to this problem for us. So, is it possible to plot these on a
>>>>single chart? We might like to have Set1 on a single y axis, and set 2 on
>>>>another? Or not?
>>>>
>>>>Now, if there was a way to not plot (null) values then we would be okay.
>>>>I guess this would have to be a chart setting, as it seems chart specific
>>>>data set filtering doesn't exist yet...
>>>>
>>>>If this is not possible we will have to generate multiple graphs and data
>>>>sets.
>>>>
>>>>Thanks!
>>>> George
>>>>
>>>>
>>>>David Michonneau wrote:
>>>>
>>>>
>>>>>Hi Nathan,
>>>>>
>>>>>I don't really understand how columns can have different length. They
>>>>>will have null values, but the total length remains the same. The number
>>>>>of non-null values will be different, but why does it matter?
>>>>>
>>>>>You can maybe create one dataset for your table and a distinct one for
>>>>>your chart to avoid changing your table.
>>>>>
>>>>>Thanks,
>>>>>
>>>>>David
>>>>>
>>>>>
>>>>>"Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
>>>>>news:dcl5ct$f3s$1@news.eclipse.org...
>>>>>
>>>>>
>>>>>
>>>>>>Hi David,
>>>>>>
>>>>>>That is a possible solution although it would make generating the table
>>>>>>part of my report more complicated.
>>>>>>
>>>>>>What would happen if the column lengths were different though? It would
>>>>>>often be the case that one y-axis column would have more values than
>>>>>>the others.
>>>>>>
>>>>>>Cheers,
>>>>>>
>>>>>>Nathan
>>>>>>
>>>>>>David Michonneau wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Hi Nathan,
>>>>>>>
>>>>>>>I think you should change your dataset to return the values in
>>>>>>>different columns depending on their value range. Then you can bind
>>>>>>>each column to a different Y axis.
>>>>>>>
>>>>>>>Thanks,
>>>>>>>
>>>>>>>David
>>>>>>>
>>>>>>>"Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
>>>>>>>news:42EA5483.4080208@scapatech.com...
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>Hi David,
>>>>>>>>
>>>>>>>>I have a dataset which holds the average value of a number of
>>>>>>>>different metrics. The value can vary from between very small (e.g.
>>>>>>>>0.001) and very large (e.g. 500000) So, although I want them all on
>>>>>>>>the same graph, I would rather have them assigned to specific y-axis
>>>>>>>>so that all the values are determinable.
>>>>>>>>
>>>>>>>>Here is a dummy sample to give you an idea what I mean:
>>>>>>>>
>>>>>>>>Metric Name Value
>>>>>>>>---------------------------------
>>>>>>>>metric 1 1
>>>>>>>>metric 2 1
>>>>>>>>metric 3 13.809
>>>>>>>>metric 4 476.318
>>>>>>>>metric 5 0.046
>>>>>>>>metric 6 26.502
>>>>>>>>metric 7 0.328
>>>>>>>>metric 8 0
>>>>>>>>metric 9 14.636
>>>>>>>>metric 10 458.932
>>>>>>>>metric 11 0.997
>>>>>>>>metric 12 26.479
>>>>>>>>metric 13 0.328
>>>>>>>>metric 14 27.054
>>>>>>>>
>>>>>>>>What I would like to do is assign metrics 1,2,5,7,8,11 and 13 to the
>>>>>>>>first y-axis, metrics 3,6,9,12,14 to the second and 4 and 10 to the
>>>>>>>>third y-axis.
>>>>>>>>
>>>>>>>>Is this in any way possible or will I be required to generate
>>>>>>>>separate datasets and graphs for each y-axis?
>>>>>>>>
>>>>>>>>Thanks
>>>>>>>>
>>>>>>>>Nathan
>>>>>>>>
>>>>>>>>David Michonneau wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>Hi Nathan,
>>>>>>>>>
>>>>>>>>>Could you provide some sample data demonstrating what you are trying
>>>>>>>>>to achieve?
>>>>>>>>>
>>>>>>>>>Thanks,
>>>>>>>>>
>>>>>>>>>David
>>>>>>>>>
>>>>>>>>>"Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
>>>>>>>>>news:dbqjst$rl4$1@news.eclipse.org...
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>Hi,
>>>>>>>>>>
>>>>>>>>>>I am having a problem trying to filter a dataset for a chart.
>>>>>>>>>>Ideally I would like to be able to assign different rows of a
>>>>>>>>>>result set to different axis of the same chart.
>>>>>>>>>>
>>>>>>>>>>Is it possible to filter the dataset using the expression builder?
>>>>>>>>>>
>>>>>>>>>>If so could you please provide an example.
>>>>>>>>>>
>>>>>>>>>>Thanks and Regards
>>>>>>>>>>
>>>>>>>>>>Nathan
>>>>>>>>>
>>>>>>>>>
>
>
|
|
|
Re: Filtering a dataset for a chart [message #66418 is a reply to message #66376] |
Wed, 10 August 2005 11:26 |
David Michonneau Messages: 1145 Registered: July 2009 |
Senior Member |
|
|
Hi George,
There is an extension mechanism to register the model renderers. Look at
plugin.xml in org.eclipse.birt.chart.engine.extension, under Extensions
there are several registerd modelrenderers, one is for the Line renderer.
I would suggest you only modify this plugin.xml to remove the line renderer
mapping. Then you can write your own plugin, register the modelrenderer
extension there (mapping to your line class), and add your Line class in
this new plugin. This way the only needed change in the BIRT plugin is the
plugin.xml change, which does not require a rebuild.
Could you please contribute your Line Renderer implementation, by attaching
the code to the bugzilla entry? That would give us a good starting point to
implement this feature.
Thanks,
David
"George Christelis" <george.christelis@scapatech.com> wrote in message
news:ddcj20$57c$1@news.eclipse.org...
> Thanks David - but one more question!
>
> I've written my own Line renderer that filters our data points based on
> their null values. It's working a treat.
>
> Is there a seamless way that I can hook my new renderer into the charting
> engine, or do I need to rebuild and distribute the affected birt plugin?
>
> Thanks,
> George
>
> David Michonneau wrote:
>> Hi George,
>>
>> Thank you for submitting the bugzilla entry. In the meantime, you can
>> always write your own Line renderer, so that it does not show null
>> values.
>>
>> Thanks,
>>
>> David
>>
>> "George Christelis" <george.christelis@scapatech.com> wrote in message
>> news:dcsrl8$vck$1@news.eclipse.org...
>>
>>>Hi David,
>>>
>>>We've logged a bug # 106025, and cc'ed you on it.
>>>
>>>Thanks for your help with the scripting solution. Unfortunately we are
>>>looking at using line graphs but we appreciate the help!
>>>
>>>Just as a matter on intered - we are looking at using the API to generate
>>>these charts.
>>>
>>>Thanks again,
>>> George
>>>
>>>David Michonneau wrote:
>>>
>>>>Hi George,
>>>>
>>>>The best I could come up with, is a script to hide null datapoints by
>>>>painting them in white, and setting their label to an empty string.
>>>>However that has some limitations depending on the type of chart you are
>>>>using, it seems to work fine with bar and scatter charts, but won't work
>>>>with line charts, as a line is drawn to the null point. In any case
>>>>please file a bugzilla enhancement so that we can implement a proper
>>>>solution for the next version.
>>>>
>>>>So here is the script (to paste in the script textbox of the chart
>>>>builder, I assume you are using the chart builder and not the api?):
>>>>
>>>>previousFill = new Object();// used for restoring the fill for the next
>>>>element
>>>>
>>>>function beforeDrawElement(dataPointHints, fill)
>>>>{
>>>> previousFill.r = fill.getRed();
>>>> previousFill.g = fill.getGreen();
>>>> previousFill.b = fill.getBlue();
>>>>
>>>> if ( dataPointHints.getOrthogonalValue() == null )
>>>> fill.set(255, 255, 255);
>>>>}
>>>>function afterDrawElement(dataPointHints, fill)
>>>>{
>>>> if ( dataPointHints.getOrthogonalValue() == null )
>>>> fill.set(previousFill.r, previousFill.g, previousFill.b);
>>>>}
>>>>function beforeDrawDataPoint(dataPointHints, label)
>>>>{
>>>> if ( dataPointHints.getOrthogonalValue() == null )
>>>> label.getCaption().setValue('');
>>>>}
>>>>
>>>>Let me know if that helps,
>>>>
>>>>Thanks,
>>>>
>>>>David
>>>>
>>>>"George Christelis" <george.christelis@scapatech.com> wrote in message
>>>>news:dcqe6n$f00$1@news.eclipse.org...
>>>>
>>>>
>>>>>Hi David,
>>>>>
>>>>>I think our problem basically boils down to the following (apologies if
>>>>>I get my terminology mixed up here). I am hoping that you might find
>>>>>the shortcoming in our thinking. Here goes:
>>>>>
>>>>>We wish to generate a single chart, and hence we have a single data set
>>>>>due to the single dataset per chart limitation in BIRT 1.0. Our data
>>>>>set is effectivly made up of a subset of data points, where each subset
>>>>>of points should be grouped together (this might be that they are
>>>>>grouped on the same y-axis where each subset has its own y-axis, or
>>>>>they might be grouped as seperate graphs (series?) on the same y-axis).
>>>>>
>>>>>For example, consider the following set of data points (x;y) coords:
>>>>>
>>>>>Set 1 Set 2
>>>>>------------------
>>>>>(x_1;y_1) (x_2;y_3)
>>>>>(x_2;y_2) (x_3;y_4)
>>>>>
>>>>>A chart can contain only a single horizontal axis, so the x range would
>>>>>have to include [x_1, x_2, x_3] to represent all four data points. I
>>>>>guess this would have to be in a single column in our data set.
>>>>>Therefore, the data set would look something like
>>>>>
>>>>>X_COL Set 1 Set 2
>>>>>x_1 y_1 (null)
>>>>>x_2 y_2 (null)
>>>>>x_2 (null) y_3
>>>>>x_3 (null) y_4
>>>>>
>>>>>Plotting (null) values at the bottom of the chart is not an acceptable
>>>>>solution to this problem for us. So, is it possible to plot these on a
>>>>>single chart? We might like to have Set1 on a single y axis, and set 2
>>>>>on another? Or not?
>>>>>
>>>>>Now, if there was a way to not plot (null) values then we would be
>>>>>okay. I guess this would have to be a chart setting, as it seems chart
>>>>>specific data set filtering doesn't exist yet...
>>>>>
>>>>>If this is not possible we will have to generate multiple graphs and
>>>>>data sets.
>>>>>
>>>>>Thanks!
>>>>> George
>>>>>
>>>>>
>>>>>David Michonneau wrote:
>>>>>
>>>>>
>>>>>>Hi Nathan,
>>>>>>
>>>>>>I don't really understand how columns can have different length. They
>>>>>>will have null values, but the total length remains the same. The
>>>>>>number of non-null values will be different, but why does it matter?
>>>>>>
>>>>>>You can maybe create one dataset for your table and a distinct one for
>>>>>>your chart to avoid changing your table.
>>>>>>
>>>>>>Thanks,
>>>>>>
>>>>>>David
>>>>>>
>>>>>>
>>>>>>"Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
>>>>>>news:dcl5ct$f3s$1@news.eclipse.org...
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Hi David,
>>>>>>>
>>>>>>>That is a possible solution although it would make generating the
>>>>>>>table part of my report more complicated.
>>>>>>>
>>>>>>>What would happen if the column lengths were different though? It
>>>>>>>would often be the case that one y-axis column would have more values
>>>>>>>than the others.
>>>>>>>
>>>>>>>Cheers,
>>>>>>>
>>>>>>>Nathan
>>>>>>>
>>>>>>>David Michonneau wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>Hi Nathan,
>>>>>>>>
>>>>>>>>I think you should change your dataset to return the values in
>>>>>>>>different columns depending on their value range. Then you can bind
>>>>>>>>each column to a different Y axis.
>>>>>>>>
>>>>>>>>Thanks,
>>>>>>>>
>>>>>>>>David
>>>>>>>>
>>>>>>>>"Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
>>>>>>>>news:42EA5483.4080208@scapatech.com...
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>Hi David,
>>>>>>>>>
>>>>>>>>>I have a dataset which holds the average value of a number of
>>>>>>>>>different metrics. The value can vary from between very small (e.g.
>>>>>>>>>0.001) and very large (e.g. 500000) So, although I want them all on
>>>>>>>>>the same graph, I would rather have them assigned to specific
>>>>>>>>>y-axis so that all the values are determinable.
>>>>>>>>>
>>>>>>>>>Here is a dummy sample to give you an idea what I mean:
>>>>>>>>>
>>>>>>>>>Metric Name Value
>>>>>>>>>---------------------------------
>>>>>>>>>metric 1 1
>>>>>>>>>metric 2 1
>>>>>>>>>metric 3 13.809
>>>>>>>>>metric 4 476.318
>>>>>>>>>metric 5 0.046
>>>>>>>>>metric 6 26.502
>>>>>>>>>metric 7 0.328
>>>>>>>>>metric 8 0
>>>>>>>>>metric 9 14.636
>>>>>>>>>metric 10 458.932
>>>>>>>>>metric 11 0.997
>>>>>>>>>metric 12 26.479
>>>>>>>>>metric 13 0.328
>>>>>>>>>metric 14 27.054
>>>>>>>>>
>>>>>>>>>What I would like to do is assign metrics 1,2,5,7,8,11 and 13 to
>>>>>>>>>the first y-axis, metrics 3,6,9,12,14 to the second and 4 and 10 to
>>>>>>>>>the third y-axis.
>>>>>>>>>
>>>>>>>>>Is this in any way possible or will I be required to generate
>>>>>>>>>separate datasets and graphs for each y-axis?
>>>>>>>>>
>>>>>>>>>Thanks
>>>>>>>>>
>>>>>>>>>Nathan
>>>>>>>>>
>>>>>>>>>David Michonneau wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>Hi Nathan,
>>>>>>>>>>
>>>>>>>>>>Could you provide some sample data demonstrating what you are
>>>>>>>>>>trying to achieve?
>>>>>>>>>>
>>>>>>>>>>Thanks,
>>>>>>>>>>
>>>>>>>>>>David
>>>>>>>>>>
>>>>>>>>>>"Nathan McKeown" <nathan.mckeown@scapatech.com> wrote in message
>>>>>>>>>>news:dbqjst$rl4$1@news.eclipse.org...
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>Hi,
>>>>>>>>>>>
>>>>>>>>>>>I am having a problem trying to filter a dataset for a chart.
>>>>>>>>>>>Ideally I would like to be able to assign different rows of a
>>>>>>>>>>>result set to different axis of the same chart.
>>>>>>>>>>>
>>>>>>>>>>>Is it possible to filter the dataset using the expression
>>>>>>>>>>>builder?
>>>>>>>>>>>
>>>>>>>>>>>If so could you please provide an example.
>>>>>>>>>>>
>>>>>>>>>>>Thanks and Regards
>>>>>>>>>>>
>>>>>>>>>>>Nathan
>>>>>>>>>>
>>>>>>>>>>
>>
|
|
|
Goto Forum:
Current Time: Mon Nov 04 19:19:39 GMT 2024
Powered by FUDForum. Page generated in 0.04031 seconds
|