npm график js -plugin-trendline не работает в angular 8 - PullRequest
0 голосов
/ 20 марта 2020

Я должен нарисовать график линии тренда. Для этого я установил npm график js -plugin-trendline. Но он не работает

Я использую ng2charts, вдоль графика. js.

Я не импортировал этот модуль в мой файл module.ts.

Мой html

<canvas  height="300"
    [datasets]="chartData" [labels]="chartLabels" [options]="chartOptions" [colors]="chartColors"
    [plugins]="chartPlugins" [chartType]="chartType">
  </canvas>

Его данные

this.chartColors= [{borderColor: "#aec7e8" backgroundColor: "#aec7e8"]
this.chartOptions= { legend: { display: false },
                                title: {
                                    display: true,
                                    text: 'Month wise details'
                                }}
this.chartType= 'bar'
 this.chartData = [{data: (2) [45793.8, 39248.81, _chartjs: {…}, push: ƒ, pop: ƒ, shift: ƒ, splice: ƒ, …]
                   label: " Month"
                   borderColor: "#aec7e8"
                   backgroundColor: "#aec7e8"
                   trendlineLinear: {style: "rgba(255,105,180, .8)",
                    lineStyle: "dotted",
                    width: 2 }}]
this.chartLabels = ["Jan", "Feb"]

Заранее спасибо

...