[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3750) add time series charts
Alain Raynaud (JIRA)
jira-events at lists.jboss.org
Tue Aug 18 02:29:18 EDT 2009
[ https://jira.jboss.org/jira/browse/JBSEAM-3750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12481383#action_12481383 ]
Alain Raynaud commented on JBSEAM-3750:
---------------------------------------
I looked at the example in itext, however the timeseries tag is using an empty dataset: dataset="#{chartseries.dataset}" (in chart.xhtml).
All my attempts at populating the dataset from Java have failed. I keep bumping into this error:
Caused by: java.lang.IllegalArgumentException: Cannot convert org.jfree.data.category.DefaultCategoryDataset at 28dd6067 of type class org.jfree.data.category.DefaultCategoryDataset to interface org.jfree.data.general.Dataset
I can even manage to have the two class names be exactly the same (Dataset), so the error message baffles a beginner like me.
I have tried stuff like (taken from an example):
<p:chart chart="#{myEntity.chart}">
</p:chart>
public JFreeChart getChart() {
return createChart(getDataset());
}
private JFreeChart createChart(Dataset dataset) {
JFreeChart chart = ChartFactory.createStackedBarChart(
"Public Opinion : Torture of Prisoners",
"Country", // domain axis label
"%", // range axis label
(CategoryDataset) dataset, // data
PlotOrientation.HORIZONTAL, // orientation
false, // include legend
true, // tooltips?
false // URLs?
);
return chart;
}
@BypassInterceptors
public Dataset getDataset() {
DefaultCategoryDataset dataset = new DefaultCategoryDataset();
dataset.addValue(81.0, "Against all torture", "Italy");
return dataset;
}
> add time series charts
> ----------------------
>
> Key: JBSEAM-3750
> URL: https://jira.jboss.org/jira/browse/JBSEAM-3750
> Project: Seam
> Issue Type: Feature Request
> Components: PDF
> Reporter: Yan Langlois
> Assignee: Norman Richards
> Fix For: 2.1.2.CR1
>
>
> It would be great to have the possibility to diplay only a couple of label on a chart (x-axis). for example : display months instead of days (like in this chart : http://www.jfree.org/jfreechart/images/PriceVolumeDemo1.png)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list