Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Charticulator :Datetime in X-axis does not relate to plotting area and displays a different date

Hi Everyone, 

 

i am trying charticulator and facing below issue , kindly help 

 

This is simple tetsing data 

 Range starts from 7/4/2022 6am - 8/4 /2022 5 am 

 

Please find below the chart , how does 06/04/2022 displayed ? and range is different . The plot area looks correct but X-axis do not related to the data 

Kindly note i have tried categorical, Temporal. same for all .

 

 

7 Replies

  • dm-p's avatar
    dm-p
    Super User

    Hi Anonymous,

    For date/time fields that are added to the visual, Charticulator should indicate it's a temporal type with an icon, e.g.:

    I notice that this is missing from your XSTART field in your screenshot. Can you confirm that your field is explicitly typed as Date/Time in your Power BI data model? This is usually enough for Charticulator to assign a numerical axis with temporal properties if you drag it to the appropriate axis on your plot segment, e.g.:

    Regards,

    Daniel

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you for your reply! First thing i used is temporal only 

       

      I did found the issue, Charticulator coverting the datetime to -8 hrs. Probably its due to my locale which is GMT8 so it is converting to GMT is my assumption. As of now i am controlling this in data model by adding +8 hrs which is not the correct way 

      I am searching for a D3 date format to use in tick format which results in GMT8 timings , please let me know if you are across it 

       

       

      • dm-p's avatar
        dm-p
        Super User

        Glad you have a handle on the issue. I typically work with dates rather than date + time, so I don't have any solid advice here.

        To manage an offset via Charticulator may be tricky using just a format specifier. IIRC, the %Z specifier allows you to parse an offset, but it might not adjust it - I'm not sure if this will help at all?

        Given the need to sometimes provide 'design' or 'display' measures to give Charticulator specific data points to work from (much like you might use for conditional formatting of visual titles etc.), offsetting via DAX is not necessarily a bad thing, provided that it's clear what the measure or column is being used for. However this will depend on your modelling policies, and I appreciate this may not be an option for you.

        If you need to handle transformation of data in-visual, another possibility may be Deneb; this is lower-level than Charticulator but as Vega & Vega-Lite have their own expression language, they have support for handling offsets as part of their transform functionality.

        Good luck,

        Daniel

  • dm-p : could you please help, how can I show Month/Year on X axis. charticulator create Year, Month, Day etc from Date column but can year and month to show it on X axis.

      • malpani's avatar
        malpani
        Helper II

        Hi Anonymous 

         

        Thanks for your quick reply. 

        However, I am using Charticulator for the first time and I could not understand where I can use this D3 formatting mentoned in Charticulator. 

         

        Do I need to use this in Plot Segment, X axis Attribute - field 'Data' ?

        Currently field 'Data' has this code - first(date.year(`Approval Date`))

        So, it showing only year on X axis. How can change it show concatenated Year Month.