[Apex Charts Library] Request for Datetime x-axis
apex-charts-library
Reactive icon
Forge component by Paulo Moreira
Application Type
Reactive

Hey there!

Thanks for the quick action on my last posts!

Is there any chance we can get the datetime x-axis chart implemented as well? I don't see it in the Apex charts component? I have data series with one datapoint per day, and using the non datetime-axis aware charts gets real messy inside OutSystems as I'll have to adapt and change my datapoints depending on how many are showing in the graph.

https://apexcharts.com/javascript-chart-demos/area-charts/datetime-x-axis/ 

data: [
[1327359600000,30.95],
[1327446000000,31.34],
[1327532400000,31.18], [
1327618800000,31.05],
[1327878000000,31.00],
[1327964400000,30.95],
[1328050800000,31.24],
[1328137200000,31.29],
...
]

Unless you can internally in the component do the conversion to these date formats, then I guess I'll have to do it as part of the pre-fetch action I already have getting my data into the datapoints in the right way.

dataPoint.label = date

- will certainly fail with too many values

Thanks in advance,

Søren

Here is the issue in example. The datetime axes would know how not to include all datapoints, but the normal x-axis has no clue and prints all days and dates making the graph unreadable.

Should I fork Apex charts (this module?) or will you be looking at this?

Hi Soren,

Sorry for this late reply.

We will lok into this asap, and get back to you with an answer.

Best regards,

Paulo Moreira

Hi Soren,

Do you think it's posible for you to send us a small example of the issue you're experiencing, so we can batter come up with a solution?

Thank you very much in advance.

Best regards,

Paulo Moreira

Hey Paulo,

Sorry for the long reply! I don't have an example I can easily strip out for you, but I can describe one!

I'm doing a simple graph for our SaaS solution, and it counts the number of users per tenant every night using a simple trigger. It fills an entry into this table 

After 180 days I have 180 of those, and the graphs looks like above. From my understanding the datetime x-axis would not write all those labels out explicitly, but only take a few to show people where about in time you are.

The other issue is that the current x-axis that is not time aware doesn't scale correctly if you do not have a daily value:

As you can see the first 50% of the graph is just April, then 2 months until We're in June, then suddenly we're in September (so 50% of the graph is 6 months, and the first half is 3 days). I believe the time axis would fix this issue as well - admittedly a side issue, but still related.

I made a demo because I was bored and OutSystems is fun ;) 

Apex Chart issues.oap

Data for the database

DemoNumbers.xlsx

Anything else you need from me Paulo? 

Bump. Anyone looking at this one?

Have not heard anything since August, is this component still maintained?

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.