TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
-
Jonathan
- Newbie
- Posts: 60
- Joined: Tue Mar 11, 2008 12:00 am
- Location: Austin
Post
by Jonathan » Tue Jul 24, 2012 4:07 pm
Hi,
I created a simple pareto chart, and I noticed that mark label is missing when there is a single bar. Is there a fix for this?
Here is run as it is to illustrate the issue above:
Code: Select all
public static void main(String[] args) {
JFrame frame = new JFrame();
JPanel panel = new JPanel();
panel.setSize(600, 600);
TChart chart = new TChart();
panel.add(chart);
StringList labelsList;
// simple one bar
Bar blueSeries = new Bar(chart.getChart());
blueSeries.setMultiBar(MultiBars.SIDE);
blueSeries.add(0, 10, "A", Color.blue);
labelsList = new StringList(1);
labelsList.add(0, "10");
blueSeries.setLabels(labelsList);
blueSeries.getMarks().setVisible(true);
blueSeries.setTitle("blue series");
chart.getAxes().getBottom().getCustomLabels().clear();
chart.getAxes().getBottom().getCustomLabels().add(0.0, "A");
chart.getAspect().setView3D(false);
frame.add(panel);
frame.setSize(600, 600);
frame.setVisible(true);
}
-
WhebJava
- Newbie
- Posts: 10
- Joined: Mon Feb 15, 2010 12:00 am
Post
by WhebJava » Wed Jul 25, 2012 3:45 pm
I have the same problem, but I am not using MultiBars.
public NewJFrame() {
try {
initComponents();
setSize(new Dimension(500, 500));
Bar b = new Bar();
b.getMarks().setVisible(true);
t.getChart().addSeries(b);
b.add(1, 1, "a");
jPanel1.add(t,BorderLayout.CENTER);
} catch (Exception ex) {
Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex);
}
}
-
Yeray
- Site Admin
- Posts: 9617
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Fri Jul 27, 2012 8:34 am
Hi,
I'd say I'm getting the expected result here in both cases.
Jonathan's code creates a bar series, adds a point with "A" label, changes the point label to "10" and uses custom labels on the bottom axis to show an "A" on the 0 value:
- Bar2.png (24.11 KiB) Viewed 24405 times
WhebJava code creates a Bar series and adds a point with "a" label:
- Bar1.png (26.35 KiB) Viewed 24397 times
Please, explain what result would you expect.
-
Jonathan
- Newbie
- Posts: 60
- Joined: Tue Mar 11, 2008 12:00 am
- Location: Austin
Post
by Jonathan » Fri Aug 03, 2012 4:38 pm
Hi Yeray,
I don't see that expected chart in my end. I attached a chart when I ran the sample codes above. As you can see, I don't see the bar label "10".
-
Attachments
-
- Missing bar label.png (30.96 KiB) Viewed 24349 times
-
Yeray
- Site Admin
- Posts: 9617
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Mon Aug 06, 2012 11:24 am
Hi Jonathan,
Please, attach the complete application so we can import in Eclipse/NetBeans. Or please tell us step-by-step instructions on how to run it in any other environment.
Thanks in advance.
-
Jonathan
- Newbie
- Posts: 60
- Joined: Tue Mar 11, 2008 12:00 am
- Location: Austin
Post
by Jonathan » Mon Aug 06, 2012 3:07 pm
Hi Yeray,
Since the max. allowed size is 512 KB, I had to remove the lib file and I attached the exported eclipse zip file. BTW, What version of Teechart lib are you using? I am using Teechart version 2. (I also tried with TeeChartJavaSuite_2012Eval.zip)
-
Attachments
-
- TeeChart_MissingLabels_Jonathan.zip
- (3.2 KiB) Downloaded 1436 times
-
Yeray
- Site Admin
- Posts: 9617
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Wed Aug 08, 2012 12:01 pm
Hi Jonathan,
Thanks to your application I could reproduce it. It seems it only happens in the swing version.
I've added it to the defect list to be revised asap.
-
WhebJava
- Newbie
- Posts: 10
- Joined: Mon Feb 15, 2010 12:00 am
Post
by WhebJava » Wed May 29, 2013 8:59 pm
Hello,
Do you have a date to release this fix?