You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful to add a .convert_to(series_type) method to the SeriesBase class. This method would convert from one series instance to a second series instance.
For the sake of simplicity, the strategy to adopt should be:
Serialize the originating instance to JS literal.
De-serialize the targeted series type from JS literal.
IMPORTANT: This will be a lossy-operation for certain conversions. The reason for that is because not all series have the same underlying data structures, and not all series have the same properties. It is unrealistic to validate / warn when there is a data loss occurring within the conversion - users should know what they are doing.
Furthermore, in certain circumstances an error may get thrown which will require the addition of a special error (HighchartsSeriesConversionError).
The text was updated successfully, but these errors were encountered:
It would be useful to add a
.convert_to(series_type)
method to theSeriesBase
class. This method would convert from one series instance to a second series instance.For the sake of simplicity, the strategy to adopt should be:
IMPORTANT: This will be a lossy-operation for certain conversions. The reason for that is because not all series have the same underlying data structures, and not all series have the same properties. It is unrealistic to validate / warn when there is a data loss occurring within the conversion - users should know what they are doing.
Furthermore, in certain circumstances an error may get thrown which will require the addition of a special error (
HighchartsSeriesConversionError
).The text was updated successfully, but these errors were encountered: