Results 1 to 3 of 3

Thread: How can i show a chart bigger than device screen on iphone?

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    May 2012
    Vote Rating

    Default Unanswered: How can i show a chart bigger than device screen on iphone?

    Hi, I'm trying to show a line chart with a hight number of points (>30) in a UIWebView, but letting sencha handle the chart dimension with "fullscreen: true" the points are too close. What i would like to do is setting the chart width to something bigger (let's say 1000px) and then scroll using the webview built in scroll.

    The chart is shown bigger as it should (i can see a part of it) but (I don't know why) the webview scroll is disabled as soon as the chart appear, i mean, objective-c side it's still active, but the view simply does not respond to gesture any more, i think it could be something in the sencha js code that prevent default gesture to work.

    Here is my code:

    	var store=new{
    	new Ext.chart.Chart({
    		renderTo: Ext.getBody(),
    		width: 800,
    		height: 460,
    		store: store,
    		series: [{
    			font:'18px Arial'
    Any tips? Thanks.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    You should wrap the chart in a container. The container should have the size and the chart should not, container should use fit layout and scroll : 'both'
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2

    Think my support is good? Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    May 2012
    Vote Rating

    Default Solved

    EDIT: (ignore the "solved" title, i've edited the post but can't change the title)

    Thanks for replying, I've tried your suggestion of using a container but i've set things up this way:

    -- Container --
    - fulscreen rendered to body
    - layout auto (why use 'fit'? having the chart resizing to the layout is what i'm tring to avoid)
    - scroll: both
    - style: 'overflow: hidden;'

    -- Chart --
    - size: whatever i want (bigger than screen size)

    This setup almost works as i want, except that a chart in a container with an "auto" layout doesn't get rendered. I've erroneously make the chart render on the body too and it worked in certain cases, but it's... well, just not the right thing to do, right?

    Is there a way to render a chart into a container with "auto" layout?
    Thanks again for your help and sorry for my bad english.
    Last edited by flagg19; 28 May 2012 at 7:16 AM. Reason: the previous version was incomplete and just wrong

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts