highcharts-for-python / highcharts-core

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

`'allow'` should be a valid value for `stackLabels.overflow` #198

Closed JulienBacquart closed 3 months ago

JulienBacquart commented 3 months ago

From the documentation: https://api.highcharts.com/highcharts/yAxis.stackLabels.overflow

The example in the documentation:

options_as_str = """{
    chart: {
        type: 'column',
        width: 300,
        height: 260
    },

    yAxis: {
        stackLabels: {
            enabled: true,
            allowOverlap: true,
            overflow: 'allow',
            crop: false
        }
    },
    plotOptions: {
        column: {
            stacking: 'normal'
        }
    },

    series: [{
        data: [29.9123464, -71.5123464, 106.4123464, 129.2123464]
    }, {
        data: [144.0123464, -176.0123464, 135.6123464, 148.5123464]
    }]
}"""

options = HighchartsOptions.from_js_literal(options_as_str)
bar_chart = Chart.from_options(options)
bar_chart.display()

Results in:

HighchartsValueError: overflow accepts "justify" or "none". Was: allow

hcpchris commented 3 months ago

Thanks, @JulienBacquart ! Good catch. I'll include a fix for it in the next release.