distorted line diamond symbol in legend

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
Jonathan
Newbie
Newbie
Posts: 60
Joined: Tue Mar 11, 2008 12:00 am
Location: Austin

distorted line diamond symbol in legend

Post by Jonathan » Wed Apr 20, 2011 8:24 pm

Hi,

I have a very simple line chart with diamond shape. I noticed that the diamond symbol shape in legend is distorted. (When I have many other shapes in the line chart, it is hard to tell whether that is diamond shape or not in the legend) Is there a way to make it more clear, sharp diamond shape in the line chart legend?

Here is a run-as example. I put line and point at the same time to illustrate my point. In this example, while the legend symbol for point is clearly diamond shape, it is hard to tell that the line symbol in the legend is a diamond shape or not.

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);
		
		Line l = new Line(chart.getChart());
		l.add(10, 10);
		l.add(20, 20);
		l.add(30, 30);
		l.getPointer().setStyle(PointerStyle.DIAMOND);
		l.getPointer().setVisible(true);
		l.setTitle("Line");
		
		CustomPoint p = new CustomPoint(chart.getChart());
		p.add(10, 10);
		p.add(20, 20);
		p.add(30, 30);
		p.getPointer().setStyle(PointerStyle.DIAMOND);
		p.setTitle("Point");
		
		chart.getLegend().getSymbol().setWidthUnits(LegendSymbolSize.PIXELS);
		
		frame.add(panel);
		frame.setSize(600, 600);
		frame.setVisible(true);
	}

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: distorted line diamond symbol in legend

Post by Yeray » Fri Apr 22, 2011 2:41 pm

Hello Jonathan,

The following code gives a clearer result for me here. Doesn't it fit your needs?

Code: Select all

        tChart1.getLegend().getSymbol().setWidthUnits(com.steema.teechart.legend.LegendSymbolSize.PIXELS);
        tChart1.getLegend().getSymbol().setWidth(20);
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Jonathan
Newbie
Newbie
Posts: 60
Joined: Tue Mar 11, 2008 12:00 am
Location: Austin

Re: distorted line diamond symbol in legend

Post by Jonathan » Fri Apr 22, 2011 3:04 pm

Hi Yeray,

Adding "tChart1.getLegend().getSymbol().setWidth(20);" gives me the same result. I attach a screenshot of the result. In the screenshot, you will see that the diamond shape in line is smaller than the one in point. I am talking this in the legend. Yes, it is clear on chart, but it is less clear in the legend for the line symbol when it is diamond shape. When I have many other shapes in the legend, it is hard to tell whether that is diamond or circle.
Attachments
distorted diamond shape in line legend.png
The diamond shape looks more distorted in my application environment
distorted diamond shape in line legend.png (10 KiB) Viewed 21889 times
smaller diamond shape for line in the legend.png
example from eclipse environment
smaller diamond shape for line in the legend.png (23.03 KiB) Viewed 21902 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: distorted line diamond symbol in legend

Post by Narcís » Tue Apr 26, 2011 11:15 am

Hi Jonathan,

In which environment do you get this? Using Netbeans with latest TeeChart for Java v2 version available I get the same you get in Eclipse. I have also added the issue (TJ71015544) to the defect list to be investigated.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Jonathan
Newbie
Newbie
Posts: 60
Joined: Tue Mar 11, 2008 12:00 am
Location: Austin

Re: distorted line diamond symbol in legend

Post by Jonathan » Tue Apr 26, 2011 2:02 pm

Hi,

I used Eclipse environment with teeChart for java version 2. BTW, How can I see any updates on 'TJ71015544' ticket?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: distorted line diamond symbol in legend

Post by Narcís » Tue Apr 26, 2011 3:07 pm

Hi Jonathan,

Thanks for your feedback. Both screen-shots were generated with Eclipse and the same TeeChart version? Probably first screen-shots seems worse to me due to symbol brush and pen colors matching.

As for updates on TJ71015544, I recommend you to be aware at this forum, our RSS news feed, twitter and facebook accounts for new release announcements and what's implemented on them.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Jonathan
Newbie
Newbie
Posts: 60
Joined: Tue Mar 11, 2008 12:00 am
Location: Austin

Re: distorted line diamond symbol in legend

Post by Jonathan » Tue Apr 26, 2011 3:17 pm

Hi Narcis,

As I added comments right below those images, Both screen-shots were generated with Eclipse and the same TeeChart version. However, the first one was generated from my own application while the second one was generated from the 'Run-As' sample code. I am not sure why the first one looks worse than the second one. When you have time, could you explain more about your guess about the symbol brush and pen colors matching?

Thanks

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: distorted line diamond symbol in legend

Post by Narcís » Wed Apr 27, 2011 7:41 am

Hi Jonathan,

Ok, thans for the info.
When you have time, could you explain more about your guess about the symbol brush and pen colors matching?
Sure. I meant that since those 2 colors where quite similar one can hardly tell the difference between pen and brush which makes the diamond symbol look less defined that the one where pen and brush colors are more contrasted.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Jonathan
Newbie
Newbie
Posts: 60
Joined: Tue Mar 11, 2008 12:00 am
Location: Austin

Re: distorted line diamond symbol in legend

Post by Jonathan » Wed Apr 27, 2011 3:22 pm

Thanks for your clarification on my question.

Jonathan
Newbie
Newbie
Posts: 60
Joined: Tue Mar 11, 2008 12:00 am
Location: Austin

Re: distorted line diamond symbol in legend

Post by Jonathan » Thu May 19, 2011 4:43 pm

Hi,

FYI - I think the distorted looks come from symbol height. If you look at the sample chart I attached previously, you would notice that the symbols in line series is smaller than those in point series. I tried other shapes like circle..etc, and I could see again that the symbols in line series are still smaller than those in point series.

my 2 cents

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: distorted line diamond symbol in legend

Post by Narcís » Fri Jun 03, 2011 9:19 am

Hi Jonathan,

Thanks for your feedback and apologies for the delayed reply.
FYI - I think the distorted looks come from symbol height. If you look at the sample chart I attached previously, you would notice that the symbols in line series is smaller than those in point series. I tried other shapes like circle..etc, and I could see again that the symbols in line series are still smaller than those in point series.
I don't think this is the case because using code snippet below, where I set same pointer size (HorizSize and VertSize) for both series I get inconsistent output:
TeeChartJavaPointers.jpeg
TeeChartJavaPointers.jpeg (16.05 KiB) Viewed 21782 times
Point series pointer is smaller in the chart than in the legend while it's the opposite for line series. I would expect all pointers to be the same size.

Code: Select all

        Line l = new Line(tChart1.getChart());
        l.add(10, 10);
        l.add(20, 20);
        l.add(30, 30);
        l.getPointer().setStyle(PointerStyle.DIAMOND);
        l.getPointer().setVisible(true);
        l.getPointer().setHorizSize(5);
        l.getPointer().setVertSize(5);
        l.setTitle("Line");

        Points p = new Points(tChart1.getChart());
        p.add(10, 10);
        p.add(20, 20);
        p.add(30, 30);
        p.getPointer().setStyle(PointerStyle.DIAMOND);
        l.getPointer().setHorizSize(5);
        l.getPointer().setVertSize(5);
        p.setTitle("Point");

        tChart1.getLegend().getSymbol().setWidthUnits(LegendSymbolSize.PIXELS);
        tChart1.getLegend().getSymbol().setWidth(20);
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply