zauberzeug / nicegui

Create web-based user interfaces with Python. The nice way.
https://nicegui.io
MIT License
8.9k stars 538 forks source link

ui.highchart not support type xrange #3609

Closed Carlelst closed 3 weeks ago

Carlelst commented 3 weeks ago

Description

chart_options = {
    'chart': {
        'type': 'xrange'
    },
    'xAxis': {
        'type': 'linear',  
    },
    'yAxis': {
        'categories': ['Prototyping', 'Development', 'Testing'],
        'reversed': True  
    },
    'series': [{
        'pointWidth': 20,
        'data': [
            {'x': 0, 'x2': 1, 'y': 0},
            {'x': 1, 'x2': 2, 'y': 1},
            {'x': 2, 'x2': 3, 'y': 2}
        ]
    }]
}

ui.highchart(chart_options)
ui.run()
Carlelst commented 3 weeks ago

image

falkoschindler commented 3 weeks ago

Hi @Carlelst,

It looks like you need to add the "xrange" extra:

ui.highchart(chart_options, extras=['xrange'])
Carlelst commented 3 weeks ago

Thanks a lot! It works perfectly now! 🎉 Really appreciate the help!