Welcome Guest Search | Active Topics |

jqChart for Retina display of iPhone 4/4S
NAKAMURA Masayuki
#1 Posted : Sunday, February 5, 2012 3:20:32 AM(UTC)
Rank: Newbie

Groups: ExpiredLicense, Registered
Joined: 2/5/2012(UTC)
Posts: 5

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
I want to optimize the canvas which jqChart draw on for iPhone 4/4S like this:

Code:
        if (window.devicePixelRatio == 2) {
            myCanvas.setAttribute('height', window.innerHeight * 2);
            myCanvas.setAttribute('width', window.innerWidth * 2);
            ctx.scale(2, 2);
        } else {
            myCanvas.setAttribute('height', window.innerHeight);
            myCanvas.setAttribute('width', window.innerWidth);
        }


Is there any methods or properties in jqChart ?


Thanks in advance.
Dragan
#2 Posted : Sunday, February 5, 2012 3:32:52 PM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
Hi,

You can use this code to set the width and height:

Code:
        var width = window.innerWidth;
        var height = window.innerHeight;

        if (window.devicePixelRatio == 2) {

            width *= 2;
            height *= 2;
        }

        var jqChart = $('#jqChart').jqChart({
            width: width,
            height : height, …


Currently, jqChart doesn’t provide settings for custom scaling, but if you want we can add this functionality and send you a working version.
Best Regards,
Dragan Matek
jqChart Inc.
NAKAMURA Masayuki
#3 Posted : Sunday, February 5, 2012 6:52:57 PM(UTC)
Rank: Newbie

Groups: ExpiredLicense, Registered
Joined: 2/5/2012(UTC)
Posts: 5

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Hi Dragan,

Settings for custom scaling is needed for getting a clear chart in Retina display.

Now i'm using trial version,
but i'll purchase a license if you give me this functionality.


Thank you for your kindness.
NAKAMURA Masayuki
#4 Posted : Monday, February 6, 2012 2:25:50 AM(UTC)
Rank: Newbie

Groups: ExpiredLicense, Registered
Joined: 2/5/2012(UTC)
Posts: 5

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
P.S. Please tell me when you could have it ready.
Dragan
#5 Posted : Monday, February 6, 2012 3:57:35 PM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
I sent you a custom version via email.
Best Regards,
Dragan Matek
jqChart Inc.
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

FlatEarth Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.097 seconds.