您的位置:首页 > 其它

Set Height and Width Pie Chart

2008-02-29 15:57 399 查看
Set Height and Width Pie Chart
Tags: Web Controls

arvind_gurjar

Jun 19 2007 at 7:00 PM
Edited Jun 21 2007 at 7:29 PM

Hi,
I am working on SharpMap.I have generated Map on SharpMap ajaxmap Control and also Pie Chart on it.but when Map Zoom's In or Out,the Size of Pie Chart remains same. So I want's to Increase or decrease the Size according to zoom level of Map. for generating pie Chart I am using Radgraph.dll.
Can anyone suggest me how can I set the Height and Width for pie Chart according to Zoom level,so that Pie Chart also Zoom's In and Out According to Map.

Thanks!

codekaizen
Coordinator
Jun 20 2007 at 4:22 AM

It seems that you want to know the scale of the map given the Zoom?

In versions <= 1.0, the Zoom property equals the number of world units wide the Map is. If you divide this number by the width of the view in pixels, then divide that by the dots per inch in your display, you get a reasonable approximation of the scale (although not very accurate, since an "inch" isn't an inch on displays: it's all relative to the display).

Performing the operation in reverse to compute the desired world width and calling setting Zoom with the resulting value will zoom your map.

To keep the pie chart synchronized, you'll need to subscribe to the MapViewOnChange event, of course.

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: