@eqproject/eqp-dynamic-module 2.4.13 → 2.4.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4781,6 +4781,7 @@ class GraphComponent {
4781
4781
  this.data = new Array();
4782
4782
  this.title = "";
4783
4783
  this.trendColor = '#EB0102';
4784
+ this.mainColor = '#006cad';
4784
4785
  this.loaded = false;
4785
4786
  this.counter = 0;
4786
4787
  }
@@ -4818,11 +4819,13 @@ class GraphComponent {
4818
4819
  // console.log(x);
4819
4820
  // console.log(stockChartdataPoints);
4820
4821
  for (let i = 0; i < stockChartdataPoints.length; i++) {
4821
- this.linearRegression.push({ x: stockChartdataPoints[i].x,
4822
- y: this.m * i + this.q,
4823
- label: stockChartdataPoints[i].label,
4824
- name: stockChartdataPoints[i].name
4825
- });
4822
+ if (i == 0 || i == stockChartdataPoints.length - 1) {
4823
+ this.linearRegression.push({ x: stockChartdataPoints[i].x,
4824
+ y: this.m * i + this.q,
4825
+ label: stockChartdataPoints[i].label,
4826
+ name: stockChartdataPoints[i].name
4827
+ });
4828
+ }
4826
4829
  }
4827
4830
  //this.linearRegression.reverse();
4828
4831
  // console.log(this.linearRegression);
@@ -4843,12 +4846,9 @@ class GraphComponent {
4843
4846
  axisX: {
4844
4847
  labelFormatter: this.labelFormatterFunction,
4845
4848
  },
4846
- data: [{
4847
- type: "spline",
4848
- dataPoints: stockChartdataPoints
4849
- },
4849
+ data: [
4850
4850
  {
4851
- //toolTipContent: null,
4851
+ toolTipContent: null,
4852
4852
  type: 'line',
4853
4853
  color: this.trendColor,
4854
4854
  showInLegend: true,
@@ -4856,7 +4856,13 @@ class GraphComponent {
4856
4856
  markerType: "none",
4857
4857
  legendText: "Trend" + this.trend,
4858
4858
  dataPoints: this.linearRegression
4859
- }],
4859
+ },
4860
+ {
4861
+ type: "spline",
4862
+ dataPoints: stockChartdataPoints,
4863
+ color: this.mainColor,
4864
+ }
4865
+ ],
4860
4866
  culture: "it"
4861
4867
  }],
4862
4868
  rangeSelector: {