Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #103434
    salasidis
    Participant
    Up
    0
    Down

    I would like to know if there is an example somewhere of using date time on the X axis.

     

    Specifically – I will have dates such as 2022/08/03 17:00 – the format is not important (I can modify it as required, or I can even pass unix secondsĀ  since 1970 if that is easier)

     

    In my case, I will only have resolution down to hours, but there will definitely be 24 hour values in each day – spanning up to 2 years.

     

    I will likely use the chart range selector on the X axis, and the graph will be of the ‘area line series’ such as this example https://www.htmlelements.com/demos/chart/area-range-line/

     

    Thanks

    • This topic was modified 4 months ago by salasidis.
    #103437
    Up
    0
    Down

    Hi,

    I did not understand you correctly. You asked for an example of using DateTime on the X-axis and you are giving one.

    If you want to set the value to be based on hours you can use the ‘baseUnit’ property as shown in the following example.

    Here there are values for every hour. The base unit is hours and the interval is one hour as set in the ‘unitInterval’ property.

    https://codepen.io/svetoslavb04/pen/ExEEbvO

     

    Please explain what you need, so I can help you as much as possible.

     

    Best Regards,
    Svetoslav Borislavov

    Smart UI Team
    https://www.htmlelements.com/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.