Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Two series with different corresponding axis values on the same chart?
Two series with different corresponding axis values on the same chart? [message #482670] Thu, 27 August 2009 09:52 Go to next message
Olivier Cailloux is currently offline Olivier Cailloux
Messages: 6
Registered: July 2009
Junior Member
Dear group,

I would like to programatically display a chart (using Chart engine)
with two series of events. On the horizontal axis, I set the elapsed
time (e.g., from 0 to 10 minutes). The vertical axis display the event
value. There is a data point per event, and two event types. An event
has a time, i.e., when it happens (related to the horizontal axis), and
a value (related to the vertical axis).

However, the sampling rate is not identical for the different event
types, hence I don't have two data points for each time value. E.g., I
can have the following data points after 60 seconds (type, time, value):
(1, 30 seconds, 3)
(1, 45 seconds, 2)
(1, 60 seconds, 4)
(2, 12 seconds, 5)
(2, 24 seconds, 6)
(2, 36 seconds, 1)
(2, 48 seconds, 3)
(2, 60 seconds, 2)

Thus I'd like to display, on the same chart, two series, one with three
data points, one with five. But as far as I can tell from my different
tries, the Chart engine requires
1°) that there is a data point in each vertical axis series for each
point in the horizontal axis series (thus, in my example, it asks for a
data point of type 1 and a data point of type 2 at times 12, 24, 30, 36,
45, 48, 60 seconds) ;
2°) that there is the same number of data points in each series (this
is, if I understand correctly, a consequence of the first point).

Have I correctly understood that limitation? Is there a way to overcome
it? I have thought of interpolating the data, but it is an ugly
solution, and only works if I remove the markers and with line series
(so that the user does not see where are the real data points and which
are interpolated).

More generally speaking, is there some good source of documentation
about the charting engine? I have read the faq
[http://wiki.eclipse.org/BIRT/FAQ/Charts2.2], found the examples in the
eclipse report examples view, and used the Chart Engine API
specification
[ http://www.birt-exchange.org/documentation/BIRT_231/ChartJav adoc/chart/api/index.html]
but the doc seems a bit outdated (I downloaded birt 2.5) and it is not
easy to find answers to general questions like the one I ask here, or
when to use multiple SeriesDefinition viz. multiples Series, or when it
is allowed to associate multiple Series to a given axis, by reading the
javadoc or some examples...

I would like simply to use the charting engine in a standalone, non-RCP,
non-eclipse-plugin application. If anyone could recommend me a good book
that would help in my context, that would also be much appreciated!

Olivier
Re: Two series with different corresponding axis values on the same chart? [message #482724 is a reply to message #482670] Thu, 27 August 2009 13:00 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Olivier,

Your understanding is correct, but you should be able to put null values
in for the data points that do not exist. A lot of examples exist on
Birt-Exchange.org (search dev share). There is also a chart examples
view in the report design perspective, that has Java code for most of
the chart types. You may also want to take a look at this:
http://www.birt-exchange.org/devshare/designing-birt-reports /982-webinar-archive-using-the-birt-charting-apis/#descripti on
Some of the archived webinars are located here:
http://www.birt-exchange.com/be/news-events/webinars/archive d-webinars/

Keep in mind that when developing a chart app using just the chart
engine you can run the engine with or without OSGi.

Jason

Olivier Cailloux wrote:
> Dear group,
>
> I would like to programatically display a chart (using Chart engine)
> with two series of events. On the horizontal axis, I set the elapsed
> time (e.g., from 0 to 10 minutes). The vertical axis display the event
> value. There is a data point per event, and two event types. An event
> has a time, i.e., when it happens (related to the horizontal axis), and
> a value (related to the vertical axis).
>
> However, the sampling rate is not identical for the different event
> types, hence I don't have two data points for each time value. E.g., I
> can have the following data points after 60 seconds (type, time, value):
> (1, 30 seconds, 3)
> (1, 45 seconds, 2)
> (1, 60 seconds, 4)
> (2, 12 seconds, 5)
> (2, 24 seconds, 6)
> (2, 36 seconds, 1)
> (2, 48 seconds, 3)
> (2, 60 seconds, 2)
>
> Thus I'd like to display, on the same chart, two series, one with three
> data points, one with five. But as far as I can tell from my different
> tries, the Chart engine requires
> 1°) that there is a data point in each vertical axis series for each
> point in the horizontal axis series (thus, in my example, it asks for a
> data point of type 1 and a data point of type 2 at times 12, 24, 30, 36,
> 45, 48, 60 seconds) ;
> 2°) that there is the same number of data points in each series (this
> is, if I understand correctly, a consequence of the first point).
>
> Have I correctly understood that limitation? Is there a way to overcome
> it? I have thought of interpolating the data, but it is an ugly
> solution, and only works if I remove the markers and with line series
> (so that the user does not see where are the real data points and which
> are interpolated).
>
> More generally speaking, is there some good source of documentation
> about the charting engine? I have read the faq
> [http://wiki.eclipse.org/BIRT/FAQ/Charts2.2], found the examples in the
> eclipse report examples view, and used the Chart Engine API
> specification
> [ http://www.birt-exchange.org/documentation/BIRT_231/ChartJav adoc/chart/api/index.html]
> but the doc seems a bit outdated (I downloaded birt 2.5) and it is not
> easy to find answers to general questions like the one I ask here, or
> when to use multiple SeriesDefinition viz. multiples Series, or when it
> is allowed to associate multiple Series to a given axis, by reading the
> javadoc or some examples...
>
> I would like simply to use the charting engine in a standalone, non-RCP,
> non-eclipse-plugin application. If anyone could recommend me a good book
> that would help in my context, that would also be much appreciated!
>
> Olivier
Re: Two series with different corresponding axis values on the same chart? [message #482948 is a reply to message #482724] Fri, 28 August 2009 12:07 Go to previous messageGo to next message
Olivier Cailloux is currently offline Olivier Cailloux
Messages: 6
Registered: July 2009
Junior Member
Thanks for your answer. Using null values indeed work well, I simply did
not thought about it. And I did not find examples in the report design
examples view where null values was used, although I admit I did not
read all the code, but only looking at the sample images there was no
apparent chart example where my problem was addressed.

The webinars look informative indeed, but:
- I do not have the proper decoder (why use wmv format / asf codec where
free and good codecs and standard video container formats exist?)
- I prefer reading, I think it is much more efficient (you can skip the
parts you know, copy relevant details on your own notes, print and read
during travel, etc.)...

On a positive note, I must say that having used only a bit BIRT up to
here I am already very pleased by its capabilities. I hope that the
documentation will improve in the future as it is the only point which
is less satisfactory for the moment, IMHO. (But I guess it is only a
matter of finding the right website or book for me, and also this forum
archives already helped me a lot.)

Thanks again for this useful answer.

NB: I this it would be useful that this information about null values be
added to the Charts FAQ [http://wiki.eclipse.org/BIRT/FAQ/Charts2.2].
Can I simply add it there, or is there a more appropriate place to use?
(And what about the fact that it relates to Charts 2.5 rather than 2.2?)
Olivier


Jason Weathersby a écrit :
> Olivier,
>
> Your understanding is correct, but you should be able to put null values
> in for the data points that do not exist. A lot of examples exist on
> Birt-Exchange.org (search dev share). There is also a chart examples
> view in the report design perspective, that has Java code for most of
> the chart types. You may also want to take a look at this:
> http://www.birt-exchange.org/devshare/designing-birt-reports /982-webinar-archive-using-the-birt-charting-apis/#descripti on
>
> Some of the archived webinars are located here:
> http://www.birt-exchange.com/be/news-events/webinars/archive d-webinars/
>
> Keep in mind that when developing a chart app using just the chart
> engine you can run the engine with or without OSGi.
>
> Jason
>
> Olivier Cailloux wrote:
>> Dear group,
>>
>> I would like to programatically display a chart (using Chart engine)
>> with two series of events. On the horizontal axis, I set the elapsed
>> time (e.g., from 0 to 10 minutes). The vertical axis display the event
>> value. There is a data point per event, and two event types. An event
>> has a time, i.e., when it happens (related to the horizontal axis),
>> and a value (related to the vertical axis).
>>
>> However, the sampling rate is not identical for the different event
>> types, hence I don't have two data points for each time value. E.g., I
>> can have the following data points after 60 seconds (type, time, value):
>> (1, 30 seconds, 3)
>> (1, 45 seconds, 2)
>> (1, 60 seconds, 4)
>> (2, 12 seconds, 5)
>> (2, 24 seconds, 6)
>> (2, 36 seconds, 1)
>> (2, 48 seconds, 3)
>> (2, 60 seconds, 2)
>>
>> Thus I'd like to display, on the same chart, two series, one with
>> three data points, one with five. But as far as I can tell from my
>> different tries, the Chart engine requires
>> 1°) that there is a data point in each vertical axis series for each
>> point in the horizontal axis series (thus, in my example, it asks for
>> a data point of type 1 and a data point of type 2 at times 12, 24, 30,
>> 36, 45, 48, 60 seconds) ;
>> 2°) that there is the same number of data points in each series (this
>> is, if I understand correctly, a consequence of the first point).
>>
>> Have I correctly understood that limitation? Is there a way to
>> overcome it? I have thought of interpolating the data, but it is an
>> ugly solution, and only works if I remove the markers and with line
>> series (so that the user does not see where are the real data points
>> and which are interpolated).
>>
>> More generally speaking, is there some good source of documentation
>> about the charting engine? I have read the faq
>> [http://wiki.eclipse.org/BIRT/FAQ/Charts2.2], found the examples in
>> the eclipse report examples view, and used the Chart Engine API
>> specification
>> [ http://www.birt-exchange.org/documentation/BIRT_231/ChartJav adoc/chart/api/index.html]
>> but the doc seems a bit outdated (I downloaded birt 2.5) and it is not
>> easy to find answers to general questions like the one I ask here, or
>> when to use multiple SeriesDefinition viz. multiples Series, or when
>> it is allowed to associate multiple Series to a given axis, by reading
>> the javadoc or some examples...
>>
>> I would like simply to use the charting engine in a standalone,
>> non-RCP, non-eclipse-plugin application. If anyone could recommend me
>> a good book that would help in my context, that would also be much
>> appreciated!
>>
>> Olivier
Re: Two series with different corresponding axis values on the same chart? [message #483196 is a reply to message #482948] Mon, 31 August 2009 10:30 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Olievier,

You can make the change to the FAQ if you would like. We should be
getting an update from the charting team soon.

Thanks for your comments.

Jason

Olivier Cailloux wrote:
> Thanks for your answer. Using null values indeed work well, I simply did
> not thought about it. And I did not find examples in the report design
> examples view where null values was used, although I admit I did not
> read all the code, but only looking at the sample images there was no
> apparent chart example where my problem was addressed.
>
> The webinars look informative indeed, but:
> - I do not have the proper decoder (why use wmv format / asf codec where
> free and good codecs and standard video container formats exist?)
> - I prefer reading, I think it is much more efficient (you can skip the
> parts you know, copy relevant details on your own notes, print and read
> during travel, etc.)...
>
> On a positive note, I must say that having used only a bit BIRT up to
> here I am already very pleased by its capabilities. I hope that the
> documentation will improve in the future as it is the only point which
> is less satisfactory for the moment, IMHO. (But I guess it is only a
> matter of finding the right website or book for me, and also this forum
> archives already helped me a lot.)
>
> Thanks again for this useful answer.
>
> NB: I this it would be useful that this information about null values be
> added to the Charts FAQ [http://wiki.eclipse.org/BIRT/FAQ/Charts2.2].
> Can I simply add it there, or is there a more appropriate place to use?
> (And what about the fact that it relates to Charts 2.5 rather than 2.2?)
> Olivier
>
>
> Jason Weathersby a écrit :
>> Olivier,
>>
>> Your understanding is correct, but you should be able to put null
>> values in for the data points that do not exist. A lot of examples
>> exist on Birt-Exchange.org (search dev share). There is also a chart
>> examples view in the report design perspective, that has Java code for
>> most of the chart types. You may also want to take a look at this:
>> http://www.birt-exchange.org/devshare/designing-birt-reports /982-webinar-archive-using-the-birt-charting-apis/#descripti on
>>
>> Some of the archived webinars are located here:
>> http://www.birt-exchange.com/be/news-events/webinars/archive d-webinars/
>>
>> Keep in mind that when developing a chart app using just the chart
>> engine you can run the engine with or without OSGi.
>>
>> Jason
>>
>> Olivier Cailloux wrote:
>>> Dear group,
>>>
>>> I would like to programatically display a chart (using Chart engine)
>>> with two series of events. On the horizontal axis, I set the elapsed
>>> time (e.g., from 0 to 10 minutes). The vertical axis display the
>>> event value. There is a data point per event, and two event types. An
>>> event has a time, i.e., when it happens (related to the horizontal
>>> axis), and a value (related to the vertical axis).
>>>
>>> However, the sampling rate is not identical for the different event
>>> types, hence I don't have two data points for each time value. E.g.,
>>> I can have the following data points after 60 seconds (type, time,
>>> value):
>>> (1, 30 seconds, 3)
>>> (1, 45 seconds, 2)
>>> (1, 60 seconds, 4)
>>> (2, 12 seconds, 5)
>>> (2, 24 seconds, 6)
>>> (2, 36 seconds, 1)
>>> (2, 48 seconds, 3)
>>> (2, 60 seconds, 2)
>>>
>>> Thus I'd like to display, on the same chart, two series, one with
>>> three data points, one with five. But as far as I can tell from my
>>> different tries, the Chart engine requires
>>> 1°) that there is a data point in each vertical axis series for each
>>> point in the horizontal axis series (thus, in my example, it asks for
>>> a data point of type 1 and a data point of type 2 at times 12, 24,
>>> 30, 36, 45, 48, 60 seconds) ;
>>> 2°) that there is the same number of data points in each series (this
>>> is, if I understand correctly, a consequence of the first point).
>>>
>>> Have I correctly understood that limitation? Is there a way to
>>> overcome it? I have thought of interpolating the data, but it is an
>>> ugly solution, and only works if I remove the markers and with line
>>> series (so that the user does not see where are the real data points
>>> and which are interpolated).
>>>
>>> More generally speaking, is there some good source of documentation
>>> about the charting engine? I have read the faq
>>> [http://wiki.eclipse.org/BIRT/FAQ/Charts2.2], found the examples in
>>> the eclipse report examples view, and used the Chart Engine API
>>> specification
>>> [ http://www.birt-exchange.org/documentation/BIRT_231/ChartJav adoc/chart/api/index.html]
>>> but the doc seems a bit outdated (I downloaded birt 2.5) and it is
>>> not easy to find answers to general questions like the one I ask
>>> here, or when to use multiple SeriesDefinition viz. multiples Series,
>>> or when it is allowed to associate multiple Series to a given axis,
>>> by reading the javadoc or some examples...
>>>
>>> I would like simply to use the charting engine in a standalone,
>>> non-RCP, non-eclipse-plugin application. If anyone could recommend me
>>> a good book that would help in my context, that would also be much
>>> appreciated!
>>>
>>> Olivier
>
Re: Two series with different corresponding axis values on the same chart? [message #483366 is a reply to message #483196] Tue, 01 September 2009 07:27 Go to previous message
Olivier Cailloux is currently offline Olivier Cailloux
Messages: 6
Registered: July 2009
Junior Member
Jason Weathersby a écrit :
> Olievier,
>
> You can make the change to the FAQ if you would like. We should be
> getting an update from the charting team soon.
Added the point
[ http://wiki.eclipse.org/BIRT/FAQ/Charts2.2#How_do_I_display_ series_with_different_number_of_samples_on_the_same_chart.3F].

I hope someone will correct my English and check the correctness...

Thanks again for the help.
Olivier

>
> Thanks for your comments.
>
> Jason
>
> Olivier Cailloux wrote:
>> Thanks for your answer. Using null values indeed work well, I simply
>> did not thought about it. And I did not find examples in the report
>> design examples view where null values was used, although I admit I
>> did not read all the code, but only looking at the sample images there
>> was no apparent chart example where my problem was addressed.
>>
>> The webinars look informative indeed, but:
>> - I do not have the proper decoder (why use wmv format / asf codec
>> where free and good codecs and standard video container formats exist?)
>> - I prefer reading, I think it is much more efficient (you can skip
>> the parts you know, copy relevant details on your own notes, print and
>> read during travel, etc.)...
>>
>> On a positive note, I must say that having used only a bit BIRT up to
>> here I am already very pleased by its capabilities. I hope that the
>> documentation will improve in the future as it is the only point which
>> is less satisfactory for the moment, IMHO. (But I guess it is only a
>> matter of finding the right website or book for me, and also this
>> forum archives already helped me a lot.)
>>
>> Thanks again for this useful answer.
>>
>> NB: I this it would be useful that this information about null values
>> be added to the Charts FAQ
>> [http://wiki.eclipse.org/BIRT/FAQ/Charts2.2]. Can I simply add it
>> there, or is there a more appropriate place to use? (And what about
>> the fact that it relates to Charts 2.5 rather than 2.2?)
>> Olivier
>>
>>
>> Jason Weathersby a écrit :
>>> Olivier,
>>>
>>> Your understanding is correct, but you should be able to put null
>>> values in for the data points that do not exist. A lot of examples
>>> exist on Birt-Exchange.org (search dev share). There is also a chart
>>> examples view in the report design perspective, that has Java code
>>> for most of the chart types. You may also want to take a look at this:
>>> http://www.birt-exchange.org/devshare/designing-birt-reports /982-webinar-archive-using-the-birt-charting-apis/#descripti on
>>>
>>> Some of the archived webinars are located here:
>>> http://www.birt-exchange.com/be/news-events/webinars/archive d-webinars/
>>>
>>> Keep in mind that when developing a chart app using just the chart
>>> engine you can run the engine with or without OSGi.
>>>
>>> Jason
>>>
>>> Olivier Cailloux wrote:
>>>> Dear group,
>>>>
>>>> I would like to programatically display a chart (using Chart engine)
>>>> with two series of events. On the horizontal axis, I set the elapsed
>>>> time (e.g., from 0 to 10 minutes). The vertical axis display the
>>>> event value. There is a data point per event, and two event types.
>>>> An event has a time, i.e., when it happens (related to the
>>>> horizontal axis), and a value (related to the vertical axis).
>>>>
>>>> However, the sampling rate is not identical for the different event
>>>> types, hence I don't have two data points for each time value. E.g.,
>>>> I can have the following data points after 60 seconds (type, time,
>>>> value):
>>>> (1, 30 seconds, 3)
>>>> (1, 45 seconds, 2)
>>>> (1, 60 seconds, 4)
>>>> (2, 12 seconds, 5)
>>>> (2, 24 seconds, 6)
>>>> (2, 36 seconds, 1)
>>>> (2, 48 seconds, 3)
>>>> (2, 60 seconds, 2)
>>>>
>>>> Thus I'd like to display, on the same chart, two series, one with
>>>> three data points, one with five. But as far as I can tell from my
>>>> different tries, the Chart engine requires
>>>> 1°) that there is a data point in each vertical axis series for each
>>>> point in the horizontal axis series (thus, in my example, it asks
>>>> for a data point of type 1 and a data point of type 2 at times 12,
>>>> 24, 30, 36, 45, 48, 60 seconds) ;
>>>> 2°) that there is the same number of data points in each series
>>>> (this is, if I understand correctly, a consequence of the first point).
>>>>
>>>> Have I correctly understood that limitation? Is there a way to
>>>> overcome it? I have thought of interpolating the data, but it is an
>>>> ugly solution, and only works if I remove the markers and with line
>>>> series (so that the user does not see where are the real data points
>>>> and which are interpolated).
>>>>
>>>> More generally speaking, is there some good source of documentation
>>>> about the charting engine? I have read the faq
>>>> [http://wiki.eclipse.org/BIRT/FAQ/Charts2.2], found the examples in
>>>> the eclipse report examples view, and used the Chart Engine API
>>>> specification
>>>> [ http://www.birt-exchange.org/documentation/BIRT_231/ChartJav adoc/chart/api/index.html]
>>>> but the doc seems a bit outdated (I downloaded birt 2.5) and it is
>>>> not easy to find answers to general questions like the one I ask
>>>> here, or when to use multiple SeriesDefinition viz. multiples
>>>> Series, or when it is allowed to associate multiple Series to a
>>>> given axis, by reading the javadoc or some examples...
>>>>
>>>> I would like simply to use the charting engine in a standalone,
>>>> non-RCP, non-eclipse-plugin application. If anyone could recommend
>>>> me a good book that would help in my context, that would also be
>>>> much appreciated!
>>>>
>>>> Olivier
>>
Previous Topic:Catching (and explaining to end user) BIRT exceptions
Next Topic:Chart and Table aligned
Goto Forum:
  


Current Time: Fri Aug 01 18:35:52 EDT 2014

Powered by FUDForum. Page generated in 0.01988 seconds