Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: renderTO

  1. #1

    Default renderTO

    Hi i have one Pie chart and i want to show it in one Panel.
    I am not able to render it pls help

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    As in every example and in the docs:

    Code:
        layout: 'fit',
        items: myChart

  3. #3

    Default renderTo:'container'

    i am seeing examples of charts.
    every where they are using renderTo:'container'
    can you pls tell me where this container is defined.

  4. #4
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    Do not use renderTo inside an Ext container (like Panel). Use the method Animal described.

    You should only use renderTo if you want to render a component in existing HTML (not generated by Ext). In the example you mentioned "container" is the id of a <div>.

  5. #5

    Default

    i am opening js files using openTab function. i dont have any html tags defined in js file. i only have panels. which are beign opened in tabs.

    Thanks
    Amit

  6. #6

    Default

    @Condor
    I have tried what Animal have suggested. but the chart is not visible in panel, i am using JsonStore for data.
    Here is my code
    var store1 = new Ext.data.JsonStore({
    fields:['month','sales'],
    data:[
    {month:'Jan',sales:'10000'},
    {month:'Feb',sales:'12000'},
    {month:'March',sales:'13000'}
    ]
    });

    var chart = new Ext.chart.LineChart({
    store : store1,
    xField:'month',
    yField:'sales'
    });

    var panel = new Ext.Panel({
    title:'Chart',
    autoScroll:true,
    closable:true,
    collapsible:true,
    layout:'fit',
    flex:1,
    items:[chart]

    });

  7. #7

    Default

    @Condor
    I have tried what Animal have suggested but chart is not visible, I am using JsonStore for data

    var store1 = new Ext.JsonStore({
    fields:['month','sales'],
    data : [
    {month:'jan',sales:'10000'},
    {month:'feb',sales:'15000'},
    {month:'march',sales:'20000'}
    ]
    });

    var chart = new Ext.chart.LineChart({
    store : store1,
    xField : 'month',
    yField : 'sales'
    });

    var panel = new Ext.Panel({
    title: 'Chart',
    closable : true,
    collapsible : true,
    autoScroll : true,
    flex : 1,
    layout : 'fit',
    items : chart
    });

  8. #8
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    What Container houses "panel"?

  9. #9
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    And this panel is supposed to be a tab in the tabpanel? Then SPECIFY it as one of the items of the tabpanel.

  10. #10

    Default

    @Animal and @Condor
    this is standalone js file. i am returning this panel at the end of file. (return panel).
    am i supposed to put this panel in another panel and return that??
    in general i am having one large panel that can contain other panels, formpanels, grids, tab panel etc and returning the panel.

    i am having one index.jsp having intial page linked to it. this page opens when user loads the url. and all the pages are connected to this first page using ipenTab which opens new js file in new tab. in my js files i dont have any html tags just one large panel having other items in it.

Page 1 of 2 12 LastLast

Similar Threads

  1. renderTo: body?
    By end-user in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 24 Dec 2008, 6:33 AM
  2. question about renderTo
    By iTzAngel in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 25 Jul 2008, 11:30 AM

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
  •