Search found 15 matches

by lucky7456969
Tue Sep 17, 2013 1:10 pm
Forum: JFreeChart
Topic: One Legend Missing question
Replies: 1
Views: 2879

One Legend Missing question

Just wonder why there is a legend missing here http://i.imgur.com/x9AsuaR.png public abstract class GenericChart extends JDialog { public GenericChart(String str, String xaxisname, String yaxisname) { this.setPreferredSize(new Dimension(500,400)); name = str; this.xaxisname = xaxisname; this.yaxisna...
by lucky7456969
Tue Sep 10, 2013 10:42 am
Forum: JFreeChart
Topic: Why isn't there any category labels?
Replies: 3
Views: 4848

Re: Why isn't there any category labels?

Okay, everybody, I'll do that.
Thanks
by lucky7456969
Sat Sep 07, 2013 8:37 am
Forum: JFreeChart
Topic: Why isn't there any category labels?
Replies: 3
Views: 4848

Why isn't there any category labels?

http://i.imgur.com/TYoIwoL.png protected JFreeChart create2DBarChart(final CategoryDataset dataset) { JFreeChart achart = ChartFactory.createBarChart(name, xaxisname, yaxisname, dataset, PlotOrientation.VERTICAL, true, true, false); achart.getTitle().setFont(new Font("新細明體", Font.BOLD, 22)); achart...
by lucky7456969
Mon Sep 02, 2013 5:38 am
Forum: JFreeChart
Topic: I have created some simple animation, but looks real dumb
Replies: 0
Views: 3057

I have created some simple animation, but looks real dumb

public JPanel createPanel(ResultSet _rs, int type) { // add the chart to a panel... final ChartPanel chartPanel = new ChartPanel(chart); chartPanel.setPreferredSize(new java.awt.Dimension(200, 170)); if (type == 0) { CategoryDataset dataset = createBarDataset(_rs); //chart = create3DPieChart(datase...
by lucky7456969
Sun Aug 25, 2013 8:35 am
Forum: JFreeChart
Topic: Trying to modify the source code to include animation
Replies: 0
Views: 2859

Trying to modify the source code to include animation

Hello, I am wondering what an annotation is. I have downloaded the source code of JFreeChart, and found that a ChartArea can be customized Also, I've found some places where annotation can have a setX(), setY() public method, Another area to look at is the Rectangle2D part, just wondering which part...
by lucky7456969
Wed Aug 14, 2013 6:19 am
Forum: JFreeChart
Topic: I have a special request from our customer
Replies: 3
Views: 7101

Re: I have a special request from our customer

There's nothing built into JFreeChart to do any transition effects. You could investigate some of these suggestions: http://stackoverflow.com/questions/11425274/adding-animation-transitions-to-java-swing-containers Hello David, Just wondering how to get the "bar" object from the category plot. So t...
by lucky7456969
Wed Aug 14, 2013 5:22 am
Forum: JFreeChart
Topic: How to animate a chart
Replies: 5
Views: 10773

Re:

BTW, I reverted to 1.0.5 to no avail

Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: org.jfree.chart.renderer.category.BarRenderer cannot be cast to jewellery.Charting.XYDifferenceRendererFill
by lucky7456969
Wed Aug 14, 2013 12:16 am
Forum: JFreeChart
Topic: JFreeChart support for animated charts
Replies: 4
Views: 8021

Re: JFreeChart support for animated charts

I changed to chart.addProgressListener(new ChartProgressListener() { private boolean animate = true; public void chartProgress(final ChartProgressEvent event) { if (event.getType() == ChartProgressEvent.DRAWING_FINISHED ) { //System.out.println("Event working"); if ( animate ) { } } } }); Which prop...
by lucky7456969
Mon Aug 12, 2013 11:36 am
Forum: JFreeChart
Topic: JFreeChart support for animated charts
Replies: 4
Views: 8021

Re:

Yes, subject to one proviso. Every time you update a dataset belonging to a chart, it triggers a sequence of events that results in the ChartPanel being repainted. If you update the dataset frequently (5 times per second, say) the chart will appear to be "animated". The proviso is that each update ...
by lucky7456969
Mon Aug 12, 2013 11:08 am
Forum: JFreeChart
Topic: I have a special request from our customer
Replies: 3
Views: 7101

I have a special request from our customer

When the user enters the frame, displays the chart, the portions of the chart are gradually fly-in, just like powerpoint,
How do I achieve that in JFreeChart?
Thanks
Jack
by lucky7456969
Thu Feb 14, 2013 4:35 am
Forum: JFreeChart
Topic: Hello, peculiar behaviour with JTabbedPane
Replies: 2
Views: 4613

Re: Hello, peculiar behaviour with JTabbedPane

Any help would be greatly appreciated!

I found out that if I don't fireDataChanged to the dataset, the jumpy behaviour is not exhibited, but if I don't do it,
the dataset will be mixed up. The chart will contain errors consisting of data of 2 different datasets.
Thanks
Jack
by lucky7456969
Thu Feb 07, 2013 6:25 am
Forum: JFreeChart
Topic: Hello, peculiar behaviour with JTabbedPane
Replies: 2
Views: 4613

Hello, peculiar behaviour with JTabbedPane

class myFrame extends JFrame { myFrame() { chart1 = new PatientDistribution("Patient Distribution"); chart1.setDatabase(db); pane1 = chart1.createDemoPanel(); chart2 = new LivingAreaDistribution("Living Area Distribution"); chart2.setDatabase(db); pane2 = chart2.createDemoPanel(); tabbedPane.add(pa...
by lucky7456969
Sun Nov 18, 2012 11:06 am
Forum: JFreeChart
Topic: Looking for ways to update JFreePieCharts on the fly
Replies: 1
Views: 4072

Looking for ways to update JFreePieCharts on the fly

How do I update a JFreeChart live?
When a user adds data to the data model, I'd like to change the chart straight away
Do you have any listeners for this usage?
Thanks
Jack
by lucky7456969
Thu Nov 01, 2012 11:27 am
Forum: JFreeChart
Topic: How to connect a JPanel created by JFreeChart to JFrame
Replies: 3
Views: 5905

Re: How to connect a JPanel created by JFreeChart to JFrame

Thanks David, Rather than straight diving into books, I searched a few forums on this. I should have done something like this this.setContentPane(chartPanel); And the "Canvas" for the chart should derive from ApplicationFrame. I saw both of the example methods get called. But there is still nothing ...
by lucky7456969
Thu Nov 01, 2012 6:43 am
Forum: JFreeChart
Topic: How to connect a JPanel created by JFreeChart to JFrame
Replies: 3
Views: 5905

How to connect a JPanel created by JFreeChart to JFrame

Dear boss,:d: http://www.java2s.com/Code/Java/Chart/JFreeChartPieChartDemo1.htm public bokss_patient_frame() { initComponents(); this.setExtendedState(getExtendedState()|this.MAXIMIZED_BOTH); // do whatever else you want to do ... this.setVisible(true); chartCanvas = new ChartCanvas(); JPanel pan = ...