Page 1 of 1

distorted line diamond symbol in legend

Posted: Wed Apr 20, 2011 8:24 pm
by 7667590
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);
	}

Re: distorted line diamond symbol in legend

Posted: Fri Apr 22, 2011 2:41 pm
by yeray
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);

Re: distorted line diamond symbol in legend

Posted: Fri Apr 22, 2011 3:04 pm
by 7667590
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.

Re: distorted line diamond symbol in legend

Posted: Tue Apr 26, 2011 11:15 am
by narcis
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.

Re: distorted line diamond symbol in legend

Posted: Tue Apr 26, 2011 2:02 pm
by 7667590
Hi,

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

Re: distorted line diamond symbol in legend

Posted: Tue Apr 26, 2011 3:07 pm
by narcis
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.

Re: distorted line diamond symbol in legend

Posted: Tue Apr 26, 2011 3:17 pm
by 7667590
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

Re: distorted line diamond symbol in legend

Posted: Wed Apr 27, 2011 7:41 am
by narcis
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.

Re: distorted line diamond symbol in legend

Posted: Wed Apr 27, 2011 3:22 pm
by 7667590
Thanks for your clarification on my question.

Re: distorted line diamond symbol in legend

Posted: Thu May 19, 2011 4:43 pm
by 7667590
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

Re: distorted line diamond symbol in legend

Posted: Fri Jun 03, 2011 9:19 am
by narcis
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 19381 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);