highcharts-for-python / highcharts-core

Python wrapper for the Highcharts Core JavaScript library
https://www.highcharts.com/integrations/python
Other
54 stars 14 forks source link

Data collection propagation to `DataCore` has a validation error in `DataCore.id` #162

Closed hcpchris closed 5 months ago

hcpchris commented 5 months ago

This issue arises out of highcharts-for-python/highcharts-gantt#46, which in turn is well-outlined in this Highcharts Forum post.

It seems to be an issue during the data assignment phase within data collection instances, and the resulting downstream propagation to data point instances.

hcpchris commented 5 months ago

The issue turns out to be rooted in the Highcharts Gantt for Python library after all, due to a minor mistake in the GanttSeries implementation (specifically GanttSeries._data_collection_class() was actually returning the data point class and vice versa, which was causing the validation error).

However, in solving the Highcharts Gantt for Python bug, there was still a data conversion issue converting between numpy.datetime64 and Python datetime. To generalize the solution for that problem, I've implemented utility_functions.datetime64_to_datetime() in the Highcharts Core for Python library. It may be needed elsewhere, until such time as datetime64 support is added to the Validator Collection library.