Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to create a simple cube from datasource

    Hi,
    I am using smartClient 8.0 beta. I try to create a simple cube from a datasource. But I can't get it to work.

    The code is attached. Thanks for your help.
    Attached Files

    #2
    Hi Tiwang,
    To make this work you can explicitly specify the facets property on your cubeGrid. This should be set to an array of Facet objects each of which has a specified id and a specified array of FacetValues as facet.values. The facetValues specify the discrete set of values that will show up as different rows or columns within the facet.

    Take a look at the Analytics example to see a databound cubegrid with explicitly defined facets. This includes some simple flat facet definitions, for example:
    Code:
     {
            id:"Scenarios",
            title:"Scenario",
            values:[
                {id:"Actual", title:"Actual"},
                {id:"Budget", title:"Budget"}
            ]
        },
    As well as some hierarchical facets:
    Code:
        {
            id:"Regions",
            title:"Region",
            isTree:true,
            values:[
                {id:"sum", title:"All Regions", collapse:false},
                {id:"North", parentId:"sum", title:"North"},
                {id:"South", parentId:"sum", title:"South"},
                {id:"East", parentId:"sum", title:"East"},
                {id:"West", parentId:"sum", title:"West"}
            ]
        },
    How these are displayed in the cubeGrid is defined by rowFacets / columnFacets and fixedFacetValues

    Comment

    Working...
    X