jQWidgets Forums

jQuery UI Widgets Forums Chart xAxis type DateTime

This topic contains 4 replies, has 2 voices, and was last updated by  ziggy 9 years, 9 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • xAxis type DateTime #73784

    ziggy
    Participant

    Hi,

    Can a x-Axis have a type ‘datetime’?

    xAxis type DateTime #73785

    Dimitar
    Participant

    Hi Karen,

    The xAxis can be of type ‘date’ and you can set its baseUnit property to ‘year’, ‘month’, ‘day’, ‘hour’, ‘minute’, ‘second’ or ‘millisecond’ if you wish.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    xAxis type DateTime #73790

    ziggy
    Participant

    Hi Dimitar,

    Thanks for the reply.

    I have tried setting the baseUnit to hour but the x-axis is too crowded. Can we plot the dots (scatter plot) with baseUnit: ‘hours’ but the x-Axis display is by Date? In this way, the dots would be scattered and not plotted in a single line only.

    Thanks!

    xAxis type DateTime #73809

    Dimitar
    Participant

    Hi Karen,

    This can be achieved. You just need to set the xAxis baseUnit to ‘day’. The scatter “circles” will be plotted based on the data points in the data source (every hour). A similar situation can be seen in the demo Line Series, where the x-axis shows months, but there is a data point for each day.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    xAxis type DateTime #73948

    ziggy
    Participant

    Got it! 😀 thanks Dimitar.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.