I'm trying to show a few charts on my app, but I can't get to show them the proper date format on the X Axis. I haven't figured it out how to set the proper format with HighCharts. I haven't been able to create the server action to pass onto my charts. I'd appreciate any help or directions. Best regards.
Hi you will find suggestions here
Outsystems Charts : https://charts.outsystems.com/
Highcharts Forum : https://www.highcharts.com/forum/
https://www.highcharts.com/
Hi,
seems date you passed is not in correct format. It seems its showing epoch time in miliseconds, as millis of current date time is 1696816704142. This value is very similar to values which you are showing in graph. So you should format this with correct date format.
If not able to figure it out then please share how you are passing values of date and time to graph and what is current values in the list of data points.
regard.
Hello Vikas,
Thank you for your input. I'm actually connecting to an external MySQL Database. Funny enough, the Data points show the proper format when I hover the cursor on top of them.
The format of the field is date. Dunno if this info is answering your questions. Thanks again for the help. Best regards.
Hi @Eduardo M
Can you please tell us how you are passing dates to chart.
There is structures( Datapoint or Dataseries with chart).
I would suggest you to use those for showing values or data series properly.
Best
Arun
Hello Arun,
Would you please read the previous answer. Regarding the Datapoint, it seems to be mapping to Legacy_Datapoint. Thanks for your help.
Best regards,
Ed
Hello @Eduardo M
Can you please your oml so that we can see what values you are assigning to the datapoint in what format.
Thanks
Anees
Hello Mohd,
Thanks for your help, a question. I'm connecting to an external database, so I don't have the actual data in an Entity in my App, it's integrated through My SQL Connector.
Hi @Eduardo M you can use below json into your chart.
xAxis: {
type: 'datetime',
labels: {
format: '{value:%Y-%m-%d}' // Format the date as desired
}
},
or you can change into chart ValuesType property.
Hello Apoorv,
Thanks for your help. I tried to use Highcharts, but I can't get it to work properly. I tried getting a server action to format the charts, although I'm still trying to figure out as to how to go about that. Best regards.
Hello Eduardo,
You can also do this by downloading the highcharts.js file and upload it in the application in the scripts section.
Before uploading the highcharts.js file you can even customize the js file as per the requirement. That will be more great.
Hope this will be helpful!!
Thanks,
Vibhor Agarwal
Hello Vibhor,
I actually download HighCharts and imported the scripts for a basic line chart. But I'm still unable to figure out how to set the proper format for the X Axis. Best regards.
Hi @Apoorv Choubey ,
Could you please elaborate on how you initialized the LineCharInitialized Client Action. Thanks for your help.
Thanks @Apoorv Choubey, it seems that changing the source block to Charts\LineChart instead of Version1\LineChart_v1 did the trick. Now I need to work on making the charts look better. I was not looking at the block, and all I did was trying to format that legacy block. Once again, thanks for pointing me to the right direction. Best regards.