Skip to main content



      Home
Home » Archived » BIRT » creating custom components
creating custom components [message #72712] Thu, 08 September 2005 11:45 Go to next message
Eclipse UserFriend
Hi,

I would like to use geographical information inside a report and eg
display a map of users (SVG) selected by a dataset. In Birt-speak, i
would say we need to extend the chart type and have a new report item
*or* create a special type chart ie the "geochart".

Can anyone comment on the feasibility of this ? If possible, are the
extension points well documented and usable or am I looking against a
huge learning curve of Birt-internals ?


Regards
Jorg Heymans
Re: creating custom components [message #73114 is a reply to message #72712] Fri, 09 September 2005 16:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mpadhye.actuate.com

Hi Jorg,

Let me start off with the easy part. Embedding SVG output is not
supported in BIRT 1.0.1. (It may be in v 2.0).

Now for the harder (or at least longer) part. The Chart library is
built with this kind of usage in mind. To this end, creating a full new
chart type is completely supported. However, for a chart type like a
geographical chart, implementing it is a fairly straight-forward but
non-trivial task.

The minimum steps you would need to take are as follows:

a. Update the chart model to include your new chart type structure.
Since the chart model is built using EMF (http://www.eclipse.org/emf)
from XSDs, you should be able to find enough information as to how to do
this. (The xsd files for the model are present in the
org.eclipse.birt.chart.engine plug-in's xsd folder). In your specific
case, you should look at creating a new Series type (look at the
PieSeries structure in type.xsd). You can then plug this series into a
ChartWithoutAxes structure to get a 'Geographical Chart'...or you can
create an explicit new chart type that extends the ChartWithoutAxes.
(The former method is the suggested way to go).

b. Create a model renderer for your new series. This too can be
referenced from the way the PieSeries is rendered. (E.g.
org.eclipse.birt.chart.render.Pie in the
org.eclipse.birt.chart.engine.extension plug-in). Once you do this, you
should be able to create Geographical charts using API, insert them into
the report design and have them embedded in the report output as static
images. (You do not need to create a separate renderer for different
output types...since the chart library separates the output-type
specific calls into the device renderer layer). This means that if and
when SVG output is supported in the report, your chart *should* work
without any additional work on your part.

c. (Optional). The Chart Builder UI too provides extension points that
you can use to plug-in your own 'Chart Type' and series. You can study
the org.eclipse.birt.chart.ui.extension plug-in to see how the rest of
the builder's components are built.

NOTE: In general, since the Chart library's components are added as
extensions themselves, they are the best reference to see how you can
add your own functionality to the library.

In addition to all this, you should be able to find a wealth of
information in the BIRT help plug-in (org.eclipse.birt.doc).

Hope this helps.

Thanks,
Milind


Jorg Heymans wrote:
> Hi,
>
> I would like to use geographical information inside a report and eg
> display a map of users (SVG) selected by a dataset. In Birt-speak, i
> would say we need to extend the chart type and have a new report item
> *or* create a special type chart ie the "geochart".
>
> Can anyone comment on the feasibility of this ? If possible, are the
> extension points well documented and usable or am I looking against a
> huge learning curve of Birt-internals ?
>
>
> Regards
> Jorg Heymans
Re: creating custom components [message #73132 is a reply to message #73114] Fri, 09 September 2005 22:00 Go to previous messageGo to next message
Eclipse UserFriend
Jorg,

If you are serious about trying to extend the Chart, then you may want
to look at this doc:

http://eclipse.org/birt/faq/Charts_FAQ.doc

It is pretty dense, but has a lot great info about charting.

Scott Rosenbaum
BIRT PMC

Milind Padhye wrote:

> Hi Jorg,
>
> Let me start off with the easy part. Embedding SVG output is not
> supported in BIRT 1.0.1. (It may be in v 2.0).
>
> Now for the harder (or at least longer) part. The Chart library is
> built with this kind of usage in mind. To this end, creating a full
> new chart type is completely supported. However, for a chart type like
> a geographical chart, implementing it is a fairly straight-forward but
> non-trivial task.
>
> The minimum steps you would need to take are as follows:
>
> a. Update the chart model to include your new chart type
> structure. Since the chart model is built using EMF
> (http://www.eclipse.org/emf) from XSDs, you should be able to find
> enough information as to how to do this. (The xsd files for the model
> are present in the org.eclipse.birt.chart.engine plug-in's xsd
> folder). In your specific case, you should look at creating a new
> Series type (look at the PieSeries structure in type.xsd). You can
> then plug this series into a ChartWithoutAxes structure to get a
> 'Geographical Chart'...or you can create an explicit new chart type
> that extends the ChartWithoutAxes. (The former method is the suggested
> way to go).
>
> b. Create a model renderer for your new series. This too can be
> referenced from the way the PieSeries is rendered. (E.g.
> org.eclipse.birt.chart.render.Pie in the
> org.eclipse.birt.chart.engine.extension plug-in). Once you do this,
> you should be able to create Geographical charts using API, insert
> them into the report design and have them embedded in the report
> output as static images. (You do not need to create a separate
> renderer for different output types...since the chart library
> separates the output-type specific calls into the device renderer
> layer). This means that if and when SVG output is supported in the
> report, your chart *should* work without any additional work on your
> part.
>
> c. (Optional). The Chart Builder UI too provides extension points
> that you can use to plug-in your own 'Chart Type' and series. You can
> study the org.eclipse.birt.chart.ui.extension plug-in to see how the
> rest of the builder's components are built.
>
> NOTE: In general, since the Chart library's components are added as
> extensions themselves, they are the best reference to see how you can
> add your own functionality to the library.
>
> In addition to all this, you should be able to find a wealth of
> information in the BIRT help plug-in (org.eclipse.birt.doc).
>
> Hope this helps.
>
> Thanks,
> Milind
>
>
> Jorg Heymans wrote:
>
>> Hi,
>>
>> I would like to use geographical information inside a report and eg
>> display a map of users (SVG) selected by a dataset. In Birt-speak, i
>> would say we need to extend the chart type and have a new report item
>> *or* create a special type chart ie the "geochart".
>>
>> Can anyone comment on the feasibility of this ? If possible, are the
>> extension points well documented and usable or am I looking against a
>> huge learning curve of Birt-internals ?
>>
>>
>> Regards
>> Jorg Heymans
>
Re: creating custom components [message #73150 is a reply to message #73132] Sat, 10 September 2005 11:51 Go to previous message
Eclipse UserFriend
Scott Rosenbaum wrote:
>
> If you are serious about trying to extend the Chart, then you may want
> to look at this doc:
>
> http://eclipse.org/birt/faq/Charts_FAQ.doc
>
>
> Milind Padhye wrote:
>
>>
>> NOTE: In general, since the Chart library's components are added as
>> extensions themselves, they are the best reference to see how you can
>> add your own functionality to the library.
>>
>> In addition to all this, you should be able to find a wealth of
>> information in the BIRT help plug-in (org.eclipse.birt.doc).
>>

Milind, Scott,

Thanks for this great info, i'll go and sit in the reading corner now
for a few days !

Kind Regards,
Jorg Heymans
Previous Topic:RunReport.java Error
Next Topic:Chart with default values
Goto Forum:
  


Current Time: Fri Jun 20 21:10:35 EDT 2025

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

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

Back to the top