special characters are displayed in Axis titles

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
vijay
Newbie
Newbie
Posts: 15
Joined: Mon Jun 07, 2010 12:00 am

special characters are displayed in Axis titles

Post by vijay » Mon Aug 08, 2011 11:00 am

Hello,

i am using Tchart component in my project.Special characters([]) are displayed at end of Axis titles.This is happening only German windows XP version.
extrachar.GIF
extrachar.GIF (34.71 KiB) Viewed 13310 times
please let me know how to avoid this.

Advance thanks for your reply.

Thanks,
Vijaya Raghava Rao

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

Re: special characters are displayed in Axis titles

Post by Yeray » Mon Aug 08, 2011 12:29 pm

Hello Vijaya,
vijay wrote:i am using Tchart component in my project.Special characters([]) are displayed at end of Axis titles
I've tried the following code in both Swing and SWT but I can't reproduce the problem here in a Spanish machine. Does it reproduce the problem for you?

Code: Select all

		tChart1.getAspect().setView3D(false);
		FastLine fast1 = new FastLine(tChart1.getChart());
		fast1.fillSampleValues();
		tChart1.getAxes().getLeft().getTitle().setText("Sonde 1 [mA]");
vijay wrote:This is happening only German windows XP version.
Do you mean you've tried the same in another machine and it doesn't happen?

I also see that the image looks like an scanned paper or something similar. Doe the problem only happen when you print the chart or also in your application?
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

vijay
Newbie
Newbie
Posts: 15
Joined: Mon Jun 07, 2010 12:00 am

Re: special characters are displayed in Axis titles

Post by vijay » Tue Aug 09, 2011 8:52 am

Hello Yaray,

Thank you for your reply.

special characters are appeared in German window XP version ( according to my investigation).In other Os It's working fine.

this problem is occurring both in printing the chart and also in the application.

Advance thanks for you reply.

Thanks,
Vijay

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

Re: special characters are displayed in Axis titles

Post by Yeray » Tue Aug 09, 2011 9:34 am

Hi Vijay,

And does the simple code in the last message reproduce the problem for you? In other words, is the string "Sonde 1 [mA]" correct or is it missing any other character like end of line (\n) or anything else?

Could you also please precise if you are using Swing or SWT?
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

vijay
Newbie
Newbie
Posts: 15
Joined: Mon Jun 07, 2010 12:00 am

Re: special characters are displayed in Axis titles

Post by vijay » Tue Aug 09, 2011 11:37 am

Hello Yeray,

I am using SWT.

Left Axis text "Sonde 1 [mA]\n ". I added \n to avoid overlapping of title with axis labels ( which was suggested by you).

Bottom Axis text "Zeit [s]".

In the both cases ( both axises) extra special character is appeared in German OS systems.In others It is ok.

Thanks for you reply.

Thanks,
Vijay

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

Re: special characters are displayed in Axis titles

Post by Yeray » Wed Aug 10, 2011 2:39 pm

Hello Vijaya,

I've installed a fresh German WinXP SP3 32bit + the latest Eclipse Classic + the latest Java SDK + TeeChart Java v2.0.2.271 in a virtual machine.
I've tried both the application you attached here and a simpler version of it with the following code and I can't see the strange characters.

Code: Select all

import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

import com.steema.teechart.TChart;
import com.steema.teechart.styles.FastLine;

public class Test {

	static TChart tChart1;
	
    public static void main(String [] args){
        final Display display = new Display();
        Shell shell = new Shell(display);
        shell.setLayout(new FillLayout());
        shell.setSize(600,400);
    
        createChart(shell);
        initializechart();
        
        shell.open();
        while (!shell.isDisposed()) {
        	if (!display.readAndDispatch()) {
        		display.sleep();
        	}
        }
        display.dispose();
    }

	private static void createChart(Shell tmpShell) {
		tChart1 = new TChart(tmpShell, 0);
	}
	
	private static void initializechart() {		
		tChart1.getAspect().setView3D(false);
	    FastLine fast1 = new FastLine(tChart1.getChart());
	    java.util.Random rand = new java.util.Random();
	    for (int i=0; i<10; i++)
	    {
	    	fast1.add(rand.nextInt((int) 5d));
	    }
	    tChart1.getAxes().getLeft().getTitle().setText("Sonde 1 [mA]\n ");
	    tChart1.getAxes().getBottom().getTitle().setText("Zeit [s]");
	}
}
test.png
test.png (19.17 KiB) Viewed 13234 times
You could try updating your eclipse and java.
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