Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

XY Chart problem with International Date format

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

  • XY Chart problem with International Date format

    Hello Brains trust,

    I'm trying to create line-chart in UX, with Chart Control, of transactions occurred over a time period. DB is MySQL and SQL format for dates is yyyy-mm-dd. In UX Properties I have set date format to dd/MM/yyyy

    A standard line chart seems to work fine, however it does not spread dates evenly on X-Axis. With XY chart this spreading works nicely.
    However XY interprets 09-01-2018 as 1st Sept, no matter what I do. So my XY by chart looks like image attached.

    Annotation 2019-04-22 091454.jpg

    Any suggestions would be greatly appreciated.

    Rgds, GvG

    PS: Using Build 5667_5254

  • #2
    Re: XY Chart problem with International Date format

    I'm terrible at Alpha charts... they are clear as mud to me. I tried to create an example... but it doesn't work... I'd have to re-learn the Chart control again... for the 10th time.
    How is your Data Series set up... and how is your Graph Data dialog set up?

    Try changing your SQL select statement... reformatting the date...

    Code:
    SELECT  DATE_FORMAT(ChartDate, '%d/%m/%Y')  AS NewChartDate
    and add in an ORDER BY.

    In my test chart, my dates are being averaged for some reason. I've got 10 dates in my data and only 5 averaged dates showing on the chart. Sheesh.
    Last edited by Davidk; 04-21-2019, 11:57 PM.

    Comment


    • #3
      Re: XY Chart problem with International Date format

      Originally posted by Davidk View Post
      I'm terrible at Alpha charts... they are clear as mud to me. I tried to create an example... but it doesn't work... I'd have to re-learn the Chart control again... for the 10th time.
      How is your Data Series set up... and how is your Graph Data dialog set up?

      Try changing your SQL select statement... reformatting the date...

      Code:
      SELECT  DATE_FORMAT(ChartDate, '%d/%m/%Y')  AS NewChartDate
      and add in an ORDER BY.

      In my test chart, my dates are being averaged for some reason. I've got 10 dates in my data and only 5 averaged dates showing on the chart. Sheesh.
      Thanks David,

      My SQL query is:
      Code:
       SELECT id, value, description,  chart_date FROM chart ORDER BY chart_date
      Inside Series Editor, the order for chart_date looks correct:
      Annotation 2019-04-22 135308.jpg

      I also tried the following, however this did not change the outcome:

      Code:
      SELECT id, value, description,  DATE_FORMAT(chart_date, '%d/%m/%y')  AS NewChartDate FROM chart  ORDER BY NewChartDate
      Rgds, Gerard

      Comment


      • #4
        Re: XY Chart problem with International Date format

        Same here, the Data Series preview data is good. And my SQL Dates are plotted correctly, but the date points showing are averaged dates.

        It seems something is very buggy about this Chart Control. Twice now, it's hung Alpha. It can't be this hard to plot an XY Chart using this control.

        I would report it as a bug. The documentation is very much out of date. Perhaps it's no longer supported... and has been replaced by the Javascript Chart Control found in Other Controls.

        I just tried the Javascript Chart Control and got it working in a couple of minutes... and it displays properly as expected. It looks like the Chart Control is very buggy and Alpha has not kept it up to date. I couldn't even get titles working.

        JSLineChart.PNG
        Last edited by Davidk; 04-22-2019, 02:34 AM.

        Comment


        • #5
          Re: XY Chart problem with International Date format

          Alpha are supplying a fix for this...

          Comment


          • #6
            Re: XY Chart problem with International Date format

            I've tried Alpha's fix, but I think I'm more confused than before. Here's is the fix doc...

            UX Component - Data Series - Date Values - By default, if you have a Data Series that is based on a SQL database, any date or time (date/time) values in the Data Series are rendered using the server's regional settings (i.e. MM/dd/yyyy for US or dd/MM/yyyy - international). However, in the case of the Chart control, it is necessary to provide data values in yyyy-MM-dd format. Therefore, the Data Series builder now allows you to define a date format.
            It seems that this means you must have your date format coming out of SQL as yyyy-MM-dd. Ok.

            But now the Data Series builder allows you to define a date format. What does this do?? Does this mean I can add a Date Format in the Data Series builder of dd-MM-yyyy? And that this format will show on my chart?

            Regardless of what date format I put into the Data Series builder, my Chart X Axis (the date) never represents the dates in my data... and... they are averaged. As well, I still can't get Titles to show on anything.

            Finally, this is the inline doc for the Data Series Date Format...
            ChartDateFormat.PNG

            This says... "If you are using the Date[sic] Series... you should use the yyyy-MM-dd format.". But... doesn't this defeat it's purpose? I'm confused. It doesn't really seem to matter what I put in the Date Format. And should this read "Data Series" not "Date Series"? Or is there actually a "Date Series"?

            Comment


            • #7
              Re: XY Chart problem with International Date format

              The Date format is in the Data Series, not the Chart X-Axis., they have added this field below the SQL definition It seems to be working fine for me now.

              Comment


              • #8
                Re: XY Chart problem with International Date format

                Understood about where the new "Date Format" is. What value are you using there?
                Are you seeing X-axis values for each of your dates? I'm getting averages. The data points are where my dates would be, but my actual dates are not on the X-axis.
                Also, are you able to add a Title anywhere? I include a title but it never shows.

                Comment


                • #9
                  Re: XY Chart problem with International Date format

                  Nope, I can't find the Title either.

                  Re dates scaling, that is I think, and hope, how XY is meant to work. For short date-ranges, it does show the actual measurement points, however when range is too wide this does not work. If you need all your dates to show on X-Axis, use a line-Chart rather than XY-Chart
                  Image 1.JPG
                  Image 2.JPG

                  Comment


                  • #10
                    Re: XY Chart problem with International Date format

                    Thanks for confirming. Seems it should be the other way around. I've only got 9 dates. Not sure about this control... seems off.

                    Comment

                    Working...
                    X