I'm trying to make a graph using Hightcharts.js, but get an error
TypeError: Highcharts.stockChart is not a function.
I install it using npm(package.json)
"highcharts": "^5.0.6"
Сall
var Highcharts = require('highcharts');
And use
var options = {
chart: {
alignTicks: false,
renderTo: 'container'
},
rangeSelector: {
selected: 1
},
title: {
text: 'AAPL Stock Volume'
},
series: [{
type: 'column',
name: 'AAPL Stock Volume',
data: [],
dataGrouping: {
units: [[
'week', // unit name
[1] // allowed multiples
], [
'month',
[1, 2, 3, 4, 6]
]]
}
}];
};
var chart = Highcharts.stockChart(options);
Highstock is not a separate module, and belongs to Highcharts, I do not understand what could be the problem?
npm install highcharts-angular
, then
import * as Highcharts from 'highcharts/highstock';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With