question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Trying to create StockChart

See original GitHub issue

I have Angular 5. In my component i import

import {Chart, StockChart, HIGHCHARTS_MODULES} from "angular-highcharts"; then i init chart like this

this.chart = new StockChart({
            // chart: {
            //     type: 'spline'
            // },
            xAxis: {
                type: 'datetime',
                dateTimeLabelFormats: { // don't display the dummy year
                    month: '%e. %b',
                    year: '%b'
                },
                title: {
                    text: 'Date'
                }
            },
            yAxis: {
                title: {
                    text: 'USD'
                },
            },
            tooltip: {
                headerFormat: '<b>{series.name}</b><br>',
                pointFormat: '${point.y:.2f}/ETH'
            },
            plotOptions: {
                spline: {
                    marker: {
                        enabled: true
                    }
                }
            },

            title: {
                text: 'Ethereum price history'
            },
            credits: {
                enabled: false
            },
            series: this.data
        });

And after compile , in browser console i see error: TypeError: __WEBPACK_IMPORTED_MODULE_0_highcharts__.stockChart is not a function

What am I doing wrong?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:20 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
amandainniscommented, Jun 13, 2018

I figured out that the ChartModule needed to be an import in the AppModule, not a declaration.

1reaction
ceborcommented, Mar 2, 2018

Oh, i cant read ^^

Read more comments on GitHub >

github_iconTop Results From Across the Web

Step-by-Step | StockCharts.com
Enter the name of the ChartList you want and click the "OK" button. Now, your ChartList is created and you can start saving...
Read more >
Create a Stock Chart - YouTube
See the video on how to create the stock chart. ... If you find these videos useful and want to support my channel...
Read more >
Chip Anderson | All Aboard StockCharts (01.24.20) - YouTube
Join StockCharts president, Chip Anderson as he walks you through what ... StockCharts website, creating SharpCharts and using ChartStyles.
Read more >
How I Set Up My Stock Charts - YouTube
A tutorial video for smart investors and traders designed to teach you how and why I set up my charts the way I...
Read more >
Getting Started with StockCharts.com - YouTube
Everything you need to know to get started using StockCharts like a pro, including a tour of the site and an overview of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found