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

DumbbellSeries doesn't accept 3d collections #176

Closed secastro closed 3 months ago

secastro commented 3 months ago

Describe the bug As per documentation, DumbbellSeries doesn't accept data points with 3 dimensions. I'm trying to reproduce the "Change in Card Usage" plot on this page https://www.highcharts.com/docs/chart-and-series-types/dumbbell-series using the Python package, and it's not possible when following the documentation.

To Reproduce

This minimal code, copied from the documentation, triggers the error

from highcharts_core.options.series.dumbbell import DumbbellSeries
s = DumbbellSeries()
s.data = [[0, 1, 2], [1, 3, 4]]

Generates an error, as below

HighchartsValueError: data expects either a 1D or 2D collection. Collection received had 3 dimensions.

The same happens when trying to use a category X-axis

s.data = [
   ['Category A', 8, 3],
   ['Category B', 1, 1],
   ['Category C', 6, 8]
 ]

Expected behavior For DumbbellSeries to behave as explained in the documentation.

Your Environment:

hcpchris commented 3 months ago

@secastro FYI - sorry about the bug. It should be resolved in v.1.8.0 which was just released.