0

I have used Highstock line chart in my one of Angular 5.0 project. It looks like below screenshot. enter image description here

But I need gradient color in this chart like below screenshot. enter image description here

Can you please help me with this concern. Thanks in advance.

Edited

I am adding

var Highcharts = require('highcharts/highstock'); 
require('indicators')(Highcharts); 
require('sma')(Highcharts); 
var Highcharts = require('highcharts/highstock'); 
require('indicators')(Highcharts); 

But its show me error like:

Module not found: Error: Can't resolve 'highcharts/indicators' in filepath

Rav's Patel
  • 743
  • 6
  • 22
  • 1
    Change the type of your series to **area** and use gradient options from the following demo: https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/demo/line-time-series/ – Kamil Kulig Jun 15 '18 at 14:06
  • Yuppp. It's working. Thanks for the help – Rav's Patel Jun 19 '18 at 05:17
  • @KamilKulig Also, I need indicates for highchart or highstocj in angular 5. Do you have any idea about that? – Rav's Patel Jun 29 '18 at 05:42
  • Sure, check out **the official Highcharts wrapper for angular**: https://github.com/highcharts/highcharts-angular – Kamil Kulig Jun 29 '18 at 10:29
  • Thanks for your response, but we have already used this wrapper but there are no any indicators in this wrapper. – Rav's Patel Jun 29 '18 at 11:30
  • Have you attached indicators as a module(s)?: https://www.highcharts.com/docs/chart-and-series-types/technical-indicator-series Target of the link from my previous comment (*To load a module* section) explains how to do it in angular. – Kamil Kulig Jun 29 '18 at 13:16
  • @KamilKulig I have updated question for it. Please check it and help me on this concern. Please check Edited part. – Rav's Patel Jun 30 '18 at 04:14
  • Firstly: the last two lines of the code that you attached are a duplice of first two ones. Remove last two lines.Secondly: are you sure that you've provided the correct path to the indicators file? – Kamil Kulig Jul 02 '18 at 07:27
  • Yes, I had removed duplicates. But where I should give the path for Indicators and what is that path? I had only import import { ChartModule } from 'angular-highcharts'; and import charts using import { Chart,StockChart } from 'angular-highcharts'; – Rav's Patel Jul 02 '18 at 08:32
  • 1
    `angular-highcharts` is not the official Highcharts wrapper for Angular 2+, see `angular-highcharts` GitHub repo for info about that wrapper. Your questions are not precise enough to provide an answer - please add live demo, error messages, detailed info. `'highcharts/indicators'` is path to folder - use `'highcharts/indicators/indicators'` for core of the indicators module and `highcharts/indicators/xxx`for xxx indicator - e.g. sma, rsi, etc. – Kacper Madej Jul 02 '18 at 11:29

0 Answers0