Announcement

Collapse
No announcement yet.

Chart App: How to arrange months of year in correct sequence?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Chart App: How to arrange months of year in correct sequence?

    Currently my chart does not arrange the months of year in correct sequence. May I know how to make the arrangement sequence correct?

    Please see the chart below.

    sc_chart_wrong_sequence.jpg

  • #2
    Are the date values text values of origin? Because if so it's technically ordering them right as it seems to be ordering them character by character where.

    Now I myself haven't used any charts yet so can't really help you if it's some setting with the chart.
    However if it is using that kind of sorting as I described above putting it as 2014/01 would work. (however that obviously wouldn't look good to most people as most are used to having date's formatted like month/year)
    But yeah apart from this I'm afraid I can't be of much more help.

    Comment


    • #3
      Hi, the data in the DB is MySQL Datetime format. This is record creation date inserted by now().

      Hope the above can provide more info why it's not arrange the correct calendar month sequence.

      Comment


      • #4
        are you using an orderby in your SQL... commonly thats how i fix this issue.

        Regards

        Comment


        • #5
          Hi, thanks for your suggestion. I have tried it and the following is my SQL query

          SELECT
          added_datetime,
          FROM
          mobile_users
          ORDER BY added_datetime
          Same result. I guess the Chart App rearrange the sequence for their setting purposes.

          Comment


          • #6
            Originally posted by lesliez View Post
            Hi, thanks for your suggestion. I have tried it and the following is my SQL query



            Same result. I guess the Chart App rearrange the sequence for their setting purposes.
            This problem goes beyond charts. If you have a date field in a table, create a grid over it and try to group by that date, you have 3 options by SC: YYYY, MMYYYY and DDMMYYYY. If you choose MMYYYY and have records with data ranging from Jan 2014 to say February 2015, it will produce the report in this sequence: 01/2014, 01/2015, 02/2014, 02/2015, 03/2014 etc (at least in the scenario where the dates are on the horizontal axis which is what I've used)

            Comment


            • #7
              Originally posted by scriptcaser View Post
              This problem goes beyond charts. If you have a date field in a table, create a grid over it and try to group by that date, you have 3 options by SC: YYYY, MMYYYY and DDMMYYYY. If you choose MMYYYY and have records with data ranging from Jan 2014 to say February 2015, it will produce the report in this sequence: 01/2014, 01/2015, 02/2014, 02/2015, 03/2014 etc (at least in the scenario where the dates are on the horizontal axis which is what I've used)
              Hi scriptcaser, sorry I don't fully understand what you mean. Can explain more on the solution? I'll try it. Thanks.

              Comment


              • #8
                Hi lesliez, I don't have a solution: I was adding my voice to your observation to hopefully spur Netmake into fixing the problem faster. I'm also positing that the issue is at grid level, which is what charts are based on.

                Comment


                • #9
                  scriptcaser - Good Luck with that!

                  Comment


                  • #10
                    Originally posted by kholliday View Post
                    scriptcaser - Good Luck with that!
                    ye of little faith

                    Comment


                    • #11
                      Chart sorts alphabetically.
                      you have to format your data field (mydate in the example below) as YY/MM and sort accordingly.
                      something like:

                      Char(year(mydate)) || '/' || char(month(mydate))
                      Massimiliano Campagnoli

                      Comment

                      Working...
                      X