Apexcharts.js: DatetimeFormatter not having any effects on Unix time

Created on 6 Sep 2019  路  2Comments  路  Source: apexcharts/apexcharts.js

Hello,

Let's say we have in the axis a unix time as:

series: [{
data: [
          [1567697090, 1],
          [1567697100, 1],
          [1567697110, 2]
]
]

And wish to format ths unix time to a readable time, by using your website samples as:

        xaxis: {
          labels: {
            format: undefined,
            formatter: undefined,
            datetimeFormatter: {
              year: 'yyyy',
              month: 'MMM \'yy',
              day: 'dd MMM',
              hour: 'HH:mm'
            }
          }
        }

Nothing happens, the Unix time is not being converted.

Thank you.

Most helpful comment

You should convert the unix time to JavaScript timestamp by multiplying it by 1000.

All 2 comments

You should convert the unix time to JavaScript timestamp by multiplying it by 1000.

oh ok, thank you

Was this page helpful?
0 / 5 - 0 ratings

Related issues

artfulrobot picture artfulrobot  路  3Comments

jlil picture jlil  路  3Comments

pribilinskiy picture pribilinskiy  路  3Comments

frlinw picture frlinw  路  3Comments

jeroenpol picture jeroenpol  路  3Comments