Line Series in TeeChart v2

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

Line Series in TeeChart v2

Post by Jesse » Fri Mar 20, 2009 5:11 pm

After upgrading, I discovered different behavior. It is easy to accomodate, so I am not requesting any action. Anyway, FYI in case it wasn't expected.

When you set the color of a line series with point markers, subsequent changes to the color only affect the line and not the pointer.

Code: Select all

import javax.swing.JFrame;
import javax.swing.JPanel;

import com.steema.teechart.TChart;
import com.steema.teechart.drawing.Color;
import com.steema.teechart.styles.Histogram;
import com.steema.teechart.styles.Line;
import com.steema.teechart.styles.PointerStyle;

public class ChartTest {

	public static void main(String[] args) throws InterruptedException {
		line();
	}
	
	private static void line() throws InterruptedException{
		JFrame frame = new JFrame();
		ChartTest c = new ChartTest();
		JPanel panel = new JPanel();
		TChart chart = new TChart();
		panel.add(chart);
		frame.add(panel);
		final Line l = new Line();
		l.add(1,10);
		l.add(2,20);
		l.add(3,5);
		l.add(4,25);
		l.add(5,15);
		l.setColor(Color.GREEN);
		l.getPointer().setStyle(PointerStyle.DIAMOND);
		l.getPointer().setVisible(true);
		l.setChart(chart.getChart());
		chart.getAspect().setView3D(false);
		chart.getAspect().setSmoothingMode(false);
		frame.pack();
		frame.setVisible(true);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		//wait a second
		Thread.sleep(1000);
		l.setColor(Color.BLUE);
		//without the following line, the point markers will remain the same as before 
		l.getPointer().setColor(Color.BLUE);
	}

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

Post by Yeray » Mon Mar 23, 2009 9:21 am

Hi Jesse,

We've tried to reproduce this issue but couldn't with the actual sources nor with v2 installer.

Are you sure that you haven't skipped to mention any important step?
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

Post Reply