Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

highcharts errors missingModuleFor ema #7

Open
gnemoug opened this issue Oct 21, 2024 · 1 comment
Open

highcharts errors missingModuleFor ema #7

gnemoug opened this issue Oct 21, 2024 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@gnemoug
Copy link

gnemoug commented Oct 21, 2024

Description

When trying to display candlestick and ema indicator with highcharts, I get an error:

Error: Highcharts error #17: www.highcharts.com/errors/17/?missingModuleFor=ema

  • missingModuleFor: ema
    at Object. (highcharts.js:8:138)
    at M (highcharts.js:8:2591)
    at o (highcharts.js:8:61)
    at k.initSeries (highcharts.js:8:197051)
    at highcharts.js:8:212230
    at Proxy.forEach ()
    at k.firstRender (highcharts.js:8:212208)
    at k. (highcharts.js:8:196969)
    at M (highcharts.js:8:2591)
    at k.init (highcharts.js:8:196387)

It seems that “https://code.highcharts.com/stock/indicators/ema.js” is not loading.

my configuration:

chart = ui.highchart(
    {
        'title': {'text': 'demo'},
        'chart': {'type': 'stockChart'},
        'yAxis': [
            {
                'lineWidth': 1,
                'opposite': False,
                'title': {'text': 'bais_percent'},
                'labels': {'align': 'right', 'x': -8},
            },
            {
                'lineWidth': 1,
                'opposite': True,
                'title': {'text': 'price'},
                'labels': {'align': 'left', 'x': 8},
            },
        ],
        'series': [
            {
                'type': 'area',
                'data': data['percent'],
                'name': 'bais_percent',
                'yAxis': 0,
                'visible': True,
            },
            {
                'type': 'candlestick',
                'data': data['index'],
                'name': 'price',
                'yAxis': 1,
                'id': 'candlestick-series',
            },
            {
                'type': 'ema',
                'linkedTo': 'candlestick-series',
                'params': {'period': 3},
            },
        ],
    },
    type='stockChart',
    extras=['stock'],
).classes('w-full h-full')
@rodja rodja transferred this issue from zauberzeug/nicegui Oct 21, 2024
@falkoschindler
Copy link
Contributor

Thanks for reporting this issue @gnemoug!

According to the documentation https://api.highcharts.com/highstock/series.ema this series type requires https://code.highcharts.com/stock/indicators/indicators.js. But I can't find it in https://registry.npmjs.org/highcharts/-/highcharts-11.4.8.tgz, which NiceGUI is based on. Here we define what is added to the Python package: https://github.com/zauberzeug/nicegui-highcharts/blob/main/npm.json.

Does anyone have an idea how to resolve this dependency?

@falkoschindler falkoschindler added help wanted Extra attention is needed bug Something isn't working labels Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants