How to calculate proper aspect for 3d and clicked

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
AergoUser
Newbie
Newbie
Posts: 1
Joined: Thu Nov 08, 2007 12:00 am

How to calculate proper aspect for 3d and clicked

Post by AergoUser » Mon Aug 24, 2009 3:46 pm

Hi, I am having a challenge getting the proper aspect from the mouse click to recognize the chart in the proper 3d aspect. here is how I am doing it;

Code: Select all

     @Override
      public void seriesClicked(SeriesMouseEvent sme) {		
          int x = sme.getPoint().x;
	       int y = sme.getPoint().y;
	       int index = sme.getSeries().clicked(x, y);
	       Series series = (Series)sme.getSource();
	       SeriesXYPoint point = series.getPoint(index);
      }

If I turn off 3d everything is fine and I get back the proper index of my points properly but one I turn on 3d it stops. Especially in a PIE. It seems like I should be doing a calcToPos or something but I can't find how to do it based JUST off of the mouse position. There is a post here using a crosshair cursor but I can't find the relation of how to do it without a CursorTool. Is that my problem? Do I need a cursor tool?

Shouldn't the chart internally know its own aspect and do the calculations itself? Does this break the laws of responsibility?

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

Re: How to calculate proper aspect for 3d and clicked

Post by Narcís » Tue Aug 25, 2009 10:41 am

Hi AergoUser,

Yes, I think clicked method should be enhanced for pie series. I've added this defect (TJ71014362) to the bug list to be fixed for future releases.
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

ZooX
Newbie
Newbie
Posts: 18
Joined: Tue Aug 25, 2009 12:00 am

Re: How to calculate proper aspect for 3d and clicked

Post by ZooX » Tue Aug 25, 2009 2:09 pm

This is also a problem on the other chart types also. If its a bar only the front face of the bar is recognized, not any side that is a 3-D look and a click and the 3D line, I suppose I'm not sure how exactly that should work.

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

Re: How to calculate proper aspect for 3d and clicked

Post by Narcís » Wed Aug 26, 2009 7:54 am

Hi ZooX,
If its a bar only the front face of the bar is recognized, not any side that is a 3-D look


Yes, this is not implemented and is already in the wish-list to be considered for inclusion in future releases.
and a click and the 3D line
Code below works fine for me here. However, I've seen it throws an exception in some ocasions so I'll add it to the defect list to be enhanced for future releases.

Chart initialization:

Code: Select all

    private void initChart() { 
        
        // tChart1.getAspect().setView3D(false);

        Line series = new Line(tChart1.getChart());
        series.fillSampleValues();
        series.addSeriesMouseListener(new seriesMouseAdapter());        
    }
Events implementation:

Code: Select all

class seriesMouseAdapter extends SeriesMouseAdapter
{
    @Override
    public void seriesClicked(SeriesMouseEvent sme) {
        int x = sme.getPoint().x;
        int y = sme.getPoint().y;
        int index = sme.getSeries().clicked(x, y);
        Series series = (Series)sme.getSource();
        
        series.chart.getHeader().setText(Integer.toString(index));
    }

    @Override
    public void seriesEntered(SeriesMouseEvent arg0) {
        super.seriesEntered(arg0);
    }

    @Override
    public void seriesExited(SeriesMouseEvent arg0) {
     super.seriesExited(arg0);
    }
}
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

ZooX
Newbie
Newbie
Posts: 18
Joined: Tue Aug 25, 2009 12:00 am

Re: How to calculate proper aspect for 3d and clicked

Post by ZooX » Wed Aug 26, 2009 4:37 pm

Thanks, do you guys have a date for the next release that your shooting for?

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

Re: How to calculate proper aspect for 3d and clicked

Post by Narcís » Thu Aug 27, 2009 7:31 am

Hi Zoox,

IIRC there's a new release scheduled before the end of the year but can't provide an estimate date for now. I recommend you to be aware at this forum or subscribe to our RSS news feed for new release announcements.
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

ZooX
Newbie
Newbie
Posts: 18
Joined: Tue Aug 25, 2009 12:00 am

Re: How to calculate proper aspect for 3d and clicked

Post by ZooX » Wed Jan 13, 2010 4:33 pm

Ok, we are past the end of the year (2009), when do you anticipate the next release?

Brian

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

Re: How to calculate proper aspect for 3d and clicked

Post by Narcís » Thu Jan 14, 2010 12:12 pm

Hi Brian,

We have modifications pending to put into a maintenance release build. However those do not include a modification for TJ71014362 as we were unable to reproduce the problem, the example functioned correctly in 2D and 3D. It may be that one of the outwardly non-related fixes has affected this functionality too. We will attempt to make a new release available within the next week.
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

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

Re: How to calculate proper aspect for 3d and clicked

Post by Narcís » Tue Jan 26, 2010 1:50 pm

Hi Brian,

The version has been released now:

http://www.teechart.net/support/viewtop ... 10&t=10710
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

ZooX
Newbie
Newbie
Posts: 18
Joined: Tue Aug 25, 2009 12:00 am

Re: How to calculate proper aspect for 3d and clicked

Post by ZooX » Thu Feb 18, 2010 3:52 pm

I just downloaded and updated to the new version and this is NOT working. I am getting the same result.

I believe the core problem is that the 3d aspect is not being taking into account on the clicks. If I have a 3d bar, the very front face is fine, this is the 2d part of the image but if I click on ANY of the sides that make up the 3d part of it (meaning the ones that extend backwards) If I click any part of those sides it does not register as that component being clicked. Same story with Pie and Line

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

Re: How to calculate proper aspect for 3d and clicked

Post by Yeray » Tue Feb 23, 2010 2:29 pm

Hi,

I'm able to reproduce the problem too so, or another change has broken it again, or we made a mistake when we checked it the 14th January 2010.
I've reopened the bug ticket TJ71014362. Excuse us for the confusion generated.
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

ZooX
Newbie
Newbie
Posts: 18
Joined: Tue Aug 25, 2009 12:00 am

Re: How to calculate proper aspect for 3d and clicked

Post by ZooX » Fri Apr 16, 2010 8:28 pm

Do you guys have an ETA on the release that will include this fix?

Brian

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

Re: How to calculate proper aspect for 3d and clicked

Post by Narcís » Mon Apr 19, 2010 9:33 am

Hi Brian,

I'm sorry but I'm not able to provide an estimate date for now as the issue hasn't been fixed yet. I recommend you to be aware at this forum or subscribe to our RSS news feed for new release announcements and what's fixed on them.
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

ZooX
Newbie
Newbie
Posts: 18
Joined: Tue Aug 25, 2009 12:00 am

Re: How to calculate proper aspect for 3d and clicked

Post by ZooX » Mon Nov 08, 2010 8:16 pm

Any news on this? I haven't seen anything in the feeds or did I miss something?

If you can even tell me a workaround if I subclass one of you classes because I think I am going to be forced to choose another chart provider and have to wire up all of my logic to a new chart if you don't have this any time soon.

Brian

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

Re: How to calculate proper aspect for 3d and clicked

Post by Narcís » Fri Nov 12, 2010 10:24 am

Hi Brian,

We have no status change logged for this issue. We'll check it and get back to this thread before the middle of next week.
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