Page 1 of 2
How to calculate proper aspect for 3d and clicked
Posted: Mon Aug 24, 2009 3:46 pm
by 10547313
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?
Re: How to calculate proper aspect for 3d and clicked
Posted: Tue Aug 25, 2009 10:41 am
by narcis
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.
Re: How to calculate proper aspect for 3d and clicked
Posted: Tue Aug 25, 2009 2:09 pm
by 15354147
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.
Re: How to calculate proper aspect for 3d and clicked
Posted: Wed Aug 26, 2009 7:54 am
by narcis
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);
}
}
Re: How to calculate proper aspect for 3d and clicked
Posted: Wed Aug 26, 2009 4:37 pm
by 15354147
Thanks, do you guys have a date for the next release that your shooting for?
Re: How to calculate proper aspect for 3d and clicked
Posted: Thu Aug 27, 2009 7:31 am
by narcis
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.
Re: How to calculate proper aspect for 3d and clicked
Posted: Wed Jan 13, 2010 4:33 pm
by 15354147
Ok, we are past the end of the year (2009), when do you anticipate the next release?
Brian
Re: How to calculate proper aspect for 3d and clicked
Posted: Thu Jan 14, 2010 12:12 pm
by narcis
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.
Re: How to calculate proper aspect for 3d and clicked
Posted: Tue Jan 26, 2010 1:50 pm
by narcis
Re: How to calculate proper aspect for 3d and clicked
Posted: Thu Feb 18, 2010 3:52 pm
by 15354147
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
Re: How to calculate proper aspect for 3d and clicked
Posted: Tue Feb 23, 2010 2:29 pm
by yeray
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.
Re: How to calculate proper aspect for 3d and clicked
Posted: Fri Apr 16, 2010 8:28 pm
by 15354147
Do you guys have an ETA on the release that will include this fix?
Brian
Re: How to calculate proper aspect for 3d and clicked
Posted: Mon Apr 19, 2010 9:33 am
by narcis
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.
Re: How to calculate proper aspect for 3d and clicked
Posted: Mon Nov 08, 2010 8:16 pm
by 15354147
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
Re: How to calculate proper aspect for 3d and clicked
Posted: Fri Nov 12, 2010 10:24 am
by narcis
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.