I'm developing a SWT application here. I started my chart based on the StackedBarChartDemo4, tweaked it a little and tried to use it on an Eclipse RCP application.
But the gradients didn't show up.
After a few hours of countless tries, I discovered it's related to jFreeChart not being able to draw gradients on SWT. I reached this conclusion when I modified the StackedBarChartDemo4 as follows:
Code: Select all
public StackedBarChartDemo4(final String title) {
super(title);
final CategoryDataset dataset = createDataset();
final JFreeChart chart = createChart(dataset);
final ChartPanel chartPanel = new ChartPanel(chart);
chartPanel.setPreferredSize(new java.awt.Dimension(590, 350));
setContentPane(chartPanel);
Shell shell = new Shell( Display.getDefault());
shell.setLayout( new FillLayout() );
shell.setSize( 590, 350 );
ChartComposite cmp = new ChartComposite( shell, SWT.None, chart );
shell.open();
}
I really don't know what I might be doing wrong here. Can anyone help me, please?