This is a migrated thread and some comments may be shown as answers.

Plotting Accuracy

3 Answers 46 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 16 Apr 2015, 11:46 AM

Hi,

 

I've noticed when adding plot points that they're not being placed accurately? The data point in the attached image should be plotted at 0,0 so the lines should intersect the circular data point evenly. However it plots it off centre.

 

Do I have a setting wrong or something?

 

Thanks,

3 Answers, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 17 Apr 2015, 07:35 AM
Hi James,

We are unsure what the elements in the attachment are, we assume they are a point in a point series and two annotations. In order to avoid any confusion, you can create a small project that demonstrates this effect so that we can take a look into it.

I can make a blind guess and blame this on the size of the point. It is 10 by 10 by default. When the point needs to be centered at some position X, the point is actually positioned at canvas.left(x-5). Now what happens here is that the point is 5 pixels to the left, one pixel on top of where it should be, and it is 4 pixels to the right. This is where the visual problem occurs - it is 5 pixels to the left and 4 pixels to the right. You can try avoiding this by setting an odd number for the point size, say 11x11.

Regards,
Petar Marchev
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
James
Top achievements
Rank 1
answered on 17 Apr 2015, 09:53 AM
Hi,

It's a scatter graph - no annotations just a zoom in on one of the data points. I've attached a sample project with one data point plotted at 0,0 sized at 9x9 (it's a zip file renamed to ChartTest.png). The point is shown to be up and to the left of centre (it's easier to zoom in and see in the designer). If the plot size is reduced to 1x1 you can see just how far off centre it is (example image attached).

Thanks
0
Petar Marchev
Telerik team
answered on 21 Apr 2015, 07:05 AM
Hello James,

In order for you to be able to send attachments you need to open a support ticket. This is a forum thread and this is why it only allows for images to be sent.

Anyway, I was able to download and run the project, but I do not see what is the point in the test you propose - zooming in the designer and giving such a small size (1, 1) to the point. I ran the project and I played a bit with the zoom and it looks very good. Perhaps the point is not exactly in the middle at all times, but this is not notable at all.

Regards,
Petar Marchev
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
ChartView
Asked by
James
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
James
Top achievements
Rank 1
Share this question
or