Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

Format rule does not work for type "time" in highcharts

Rodion Lezhnyuk asked on March 16, 2020

We are integrating Flexmonster with Highcharts.
Flexmonster requires values in seconds for type “time”, then applies formatting. But formatting is not applied on Highcharts and time values are in seconds instead of meaningful values like “hh:mm”.
Metadata about fields and their data types is provided to Flexmonster.
As a solution we can transform time values to desired format in callbackHandler:Function in this function

highcharts.getData(options:Object, callbackHandler:Function, updateHandler:Function)

But this solution is not great, because in this function there is no information about metadata of fields, only their display names like “Remaining time” or “Average of Remaining time”. And it’s not OK to map display name of field to datatype of it.
Could you please suggest us solution for this issue? Or it’s even a bug that Flexmonster doesn’t apply formatting for time values in pair with Highcharts?

1 answer

Vera Didenko Flexmonster March 16, 2020

Hello, Rodion,
Thank you for reaching out to us.
We would like to explain that in case of time data ("type":"time"), the time formatting needs to be configured on Highchart’s end.
Please see the following JSFiddle we have prepared for you:
In the example, the time formatting is configured in the Highcharts chart object via the Highcharts formatter.
Hope this helps.
Please let us know if you have any additional questions.
Kind regards,

Please login or Register to Submit Answer