Hi guys,
In order to implement the chart macro
(
http://jira.xwiki.org/jira/browse/XWIKI-2883) , i propose the following:
- Create a new TableBlockDataSource which implements the
com.xpn.xwiki.plugin.charts.source.DataSource and which will take data
from a table contained within a Wiki2.0 document.
- Use the existing ChartPlugin for aquiring this new data source and
generate the graph.
This new datasource, in order to be compatible with the chartPlugin,
gets its parameters via a Map<String, String>. So I'm thinking of
passing the current document and the table number as strings encoded in
such a Map and then, in the datasource parsing the document and getting
its DOM tree and then extracting the data from it.
What do you think about this approach?
Tnx,
Dan