1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    6
    Vote Rating
    0
    FoxXav is on a distinguished road

      0  

    Default Question about sencha Designer 2.0, drag and drop, drill-downs and Models

    Question about sencha Designer 2.0, drag and drop, drill-downs and Models


    Hi !

    I'm totally new to ExtJS and I start working with Sencha designer 2.0 as it uses MVC and is really helpful to design screen.
    Unfortunatelly there are some operation that I don't know how to do.

    Here there are :
    1 - I'd like to do drag and drop between treeview's element and a chart. Both treeview and chart use a different store but there is an identifier common field. With sencha designer I found the drag drop plugin for treeview but it don't seems to have a drag drop option available for the chart what can I do to enable drop on the chart ?
    The treeview json
    Code:
    {
     gpF:".", children:[
       {  dbid:1021,
          lib:'GroupeA',
          children:[{dbid:4021,lib:'file1',leaf : true},{dbid:4057,lib:'file2',leaf : true}]
      },
      { 
          dbid:2023,
          lib:'GroupeB',
          children:[{dbid:3241,lib:'file3',leaf : true},{dbid:2704,lib:'file4',leaf : true},{dbid:8602,lib:'file5',leaf : true}]
      }
     ]
    }
    The chart json :
    Code:
    {Stats:[{dbid:4021,nbapp:80,nbabn:10},{dbid:4057,nbapp:20,nbabn:2},{dbid:3241,nbapp:0,nbabn:0},{dbid:2704,nbapp:200,nbabn:12},{dbid:8602,nbapp:120,nbabn:5}]}
    2 - I also wanted to add a drilldown possibility in the chart. How can I do that ?

    3 - I was trying to make a relation between two stores (the treeview store and the chart store) but I don't understand the mecanics behind that. What I want to do is to use the relation between two stores so I can get the lib field that come from the second store to put in the label of the axis chart wich use the first store.

    Perhaps the better answer is to start by the beginning and learn ExtJS from "scratch" without the designer (I'm interested in great tuto) but we actually haven't lot's of time to do that work so we decided to use the designer.

    I hope domeone could help me at least with good tuto and advices on how to well designed all ExtJS elements.

    I put all the designer 2.0 project in attachments

    See you.
    Attached Files

  2. #2
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Olney, MD
    Posts
    1,939
    Vote Rating
    64
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    Drag and drop from a tree to a chart isn't supported out of the box.

    Checkout this example for how you might do it: http://docs.sencha.com/ext-js/4-0/#!...dropzones.html

    Perhaps you want to have 2 trees: tree 1 that holds possible items and tree 2 that holds items to be charted. Drag/Drop between those trees and have chart respond to tree 2's data store.

    Just know that however you decide to do this, it isn't trivial. Your going to need to learn the framework. Designer should help some.
    Last edited by Phil.Strong; 17 Feb 2012 at 11:36 AM. Reason: remove opinion
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    6
    Vote Rating
    0
    FoxXav is on a distinguished road

      0  

    Default


    Thank you for your answer, I'll look at these info.

    Can't you give me some advices about models relation and how to use this relation ?

    See you