lines, annotations and cursor tool encroaching into subchar

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
SetOnHi
Newbie
Newbie
Posts: 8
Joined: Tue Jun 18, 2013 12:00 am

lines, annotations and cursor tool encroaching into subchar

Post by SetOnHi » Fri Jul 05, 2013 6:50 am

I am extending the scrollpager demo
I have added annotations, a cursor tool and drawn various lines
As soon as I drag the lower scroll window , some annotations, lines and the cursor tool are drawn over the drag window permanently
If I click in the drag window in the subchart the annotations return to their proper position [which I should not have to do]
The lines and cursor tool stay encroached in the sub chart.
I have a working project which I can upload but there seems to be a general problem with pixel calculation
Are you aware of such problems or do you need me to upload the complete project and more explanation

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

Re: lines, annotations and cursor tool encroaching into subchar

Post by Yeray » Fri Jul 05, 2013 2:24 pm

Hi,

I don't see any problem with the following example, in Swing:

Code: Select all

    ScrollPager scroller1;
    private void initChart() {
        Line line1 = new Line(tChart1.getChart());
        line1.fillSampleValues();
        
        scroller1 = new ScrollPager(tChart1.getChart());
        
        tChart1.addComponentListener(new ComponentAdapter() {

            @Override
            public void componentResized(ComponentEvent e) {
                
                if (scroller1.getSeries() == null) {
                    scroller1.setSeries(tChart1.getSeries(0));
                }
            }
        });
        
        CursorTool cursor1 = new CursorTool(tChart1.getChart());
        cursor1.setStyle(CursorToolStyle.VERTICAL);
        cursor1.setXValue(10);
        
        Annotation annot1 = new Annotation(tChart1.getChart());
        annot1.setText("My Annotation Tool");
        annot1.getShape().setCustomPosition(true);
        annot1.getShape().setLeft(60);
        annot1.getShape().setTop(40);
    }
Please, modify the code above or upload a simple example project we can run as-is to reproduce the problem here.
Thanks in advance.
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