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

Scaling the size of the chart img

2 Answers 66 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Justavian
Top achievements
Rank 1
Justavian asked on 01 Sep 2010, 03:34 PM
Forgive me if this has already been covered in a thread.  After a search through all the "scale" and "size" results, i didn't see this question come up.

Is there a way to scale the entire output of the chart, such that the resultant img is larger or smaller?

Much of the chart will automatically scale if you simply change the width and height attributes in the server side code.  However, the text on the chart does not scale, and thus takes over the whole chart at small values of width and height.

A simple solution would be to throw in some client side code to resize the img tag - and that's probably what i'll end up doing if there's not an existing solution.  The only issue with this solution is that the image map for clicking on the chart / tooltips must also be scaled.  While i do have some existing code to perform that kind of action, i would rather avoid it if there is a way to achieve this same thing via server code for the chart.  Scaling image maps in javascript isn't usually a great idea, because the values can end up being off thanks to the image map only using integers.

A server side solution could include manually scaling all of the font sizes and marker dimensions - but that seems like a lot of work.

So - is there any kind of scale factor that can be applied?

Thanks.

-RP

2 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 06 Sep 2010, 09:39 AM
Hello,

I am afraid RadChart does not expose API for automatic scaling of the chart image. One possible approach is to create a custom method, which will set chart font settings for all the chart items depending on the size. I can see you have already considered the client-side approach -- resizing the image plus updating the image map.

Best regards,
Ves
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Justavian
Top achievements
Rank 1
answered on 06 Sep 2010, 03:16 PM
Ves,

Thanks for the response.  You'll note that, in my question, i had suggested scaling the fonts and marker sizes on the server as well.  I'll experiment with that to see if the output is better than client side scaling.

Thanks

-RP
Tags
Chart (Obsolete)
Asked by
Justavian
Top achievements
Rank 1
Answers by
Ves
Telerik team
Justavian
Top achievements
Rank 1
Share this question
or