Announcement

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

    Ordering data in FacetChart

    Isomorphic,

    I'm trying to understand the way facetchart plots data. I order my query to return data in a particular fashion and it ignores it and reorders it. Please have a look at the attachment. Here I return data in the following manner. Top Markets and within each market data is ordered by airline's bookings. But the output I get contradicts this. In the second market airline's order isn't proper.

    Can you let me understand this behavior and also suggest the best way to do this. I didn't find anything like data ordering in the Facetchart api.


    Thanks.
    Attached Files

    #2
    Data appears in the order it is given in the Facets.

    Comment


      #3
      I give it in the order i mentioned.
      First data is ordered on market and then on Airline.

      in the second Market this is the order in which data is fetched:
      Code:
      '9W'''BOM-EWR''12364
      'AI'''BOM-EWR''11740
      'BA'''BOM-EWR''1480
      'LH'''BOM-EWR''1003
      'AF'''BOM-EWR''639
      'NW'''BOM-EWR''587
      'DL'''BOM-EWR''372
      'LX'''BOM-EWR''181
      'VS'''BOM-EWR''163
      'Others'''BOM-EWR''194
      But this is not the order in which it is plotted. 'Others' comes always last. Though irrelevant here we use ranking etc..to achieve this ordering in our queries.

      Thanks.

      Comment


        #4
        Also,

        My question is not on what Facet is plotted in which axis, but the order followed for plotting data within a facet.

        Thanks.

        Comment


          #5
          Isomorphic,

          It seems to follow this behavior:

          The market behavior is applied for other market's inner ordering.

          ex:
          In 1st market, the first entry is AI, hence it comes first in other markets too if it is present in those markets irrespective of the order of the data.

          How to differ this behavior???

          Thanks.
          Last edited by harsha.galla; 20 Feb 2012, 23:56.

          Comment


            #6
            Not sure what's unclear - you provide facets to the chart, each facet has facetValues. The order in which you provide the facetValues is the order in which they are rendered.

            Comment


              #7
              Isomorphic,

              1) I have provided the order in which data is fetched for the second market and the plotting doesn't reflect it.

              2) I have already identified the reason of this behavior in my previous response.

              Let me elaborate it once more:

              I have two Facets: Market, Airline
              Value plotted: Passenger bookings

              Sample data returned:
              Code:
              Market, Airline, Bookings
              BOM-DFW,9W,100
              BOM-DFW,AA,40
              BOM-DFW,AI,30
              BOM-DFW,OTHERS,10
              
              BLR-DFW,AI,80
              BLR-DFW,9W,70
              BLR-DFW,OTHERS,40
              In this scenario, in the bar of BLR-DFW market AI needs to be the first one to be plotted then 9W followed by OTHERS.

              But instead 9W is plotted first since it occured first in BOM-DFW bar which is prior to BLR-DFW bar.

              Hope, this makes it clear. Let me know if you still don't get my question.

              Thanks.
              Last edited by harsha.galla; 21 Feb 2012, 09:02.

              Comment


                #8
                What you're providing is a little block of text of some data, with no indication of how this is delivered to the chart. Again, what matters is the order the values appear in the facet definitions. If you think you're already doing this right, show the code for how this data gets into the chart.

                Comment


                  #9
                  Isomorphic,

                  I have emailed you the server response and code used to set data to the chart.

                  Thanks.

                  Comment

                  Working...
                  X