Skip to content

Commit

Permalink
[se] Fix trendline get text
Browse files Browse the repository at this point in the history
  • Loading branch information
GoshaZotov committed Dec 18, 2023
1 parent da6e55e commit d50834f
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions common/Charts/ChartsDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,18 @@ CChartsDrawer.prototype =
pos = this._calculatePositionLegend(obj);
break;
}
case AscDFH.historyitem_type_TrendLine: {
/*{
coefficients : coefficients,
rSquared : rSquared,
coordinate : lastPoint
}*/
if (this.trendline) {
//CTrendLine
return this.trendline && this.trendline.getAdditionalInfo(obj.parent.Id, obj.parent.parent.Id);
}
return null;
}
default: {
pos = { x: 0, y: 0 };
break;
Expand Down Expand Up @@ -16263,11 +16275,11 @@ CColorObj.prototype =
}
},

getAdditionalInfo: function (chartId, seriaId) {
if (this.storage[chartId] && this.storage[chartId][seriaId]) {
const coefficients = this.storage[chartId][seriaId].getCoefficients(chartId, seriaId);
const rSquared = this.storage[chartId][seriaId].getRSquared(chartId, seriaId);
const lastPoint = this.storage[chartId][seriaId].getLastPoint(chartId, seriaId);
getAdditionalInfo: function (chartId, seriesId) {
if (this.storage[chartId] && this.storage[chartId][seriesId]) {
const coefficients = this.storage[chartId][seriesId].getCoefficients();
const rSquared = this.storage[chartId][seriesId].getRSquared();
const lastPoint = this.storage[chartId][seriesId].getLastPoint();
if (coefficients || rSquared) {
const additionalInfo = {
coefficients : coefficients,
Expand All @@ -16277,6 +16289,7 @@ CColorObj.prototype =
return additionalInfo;
}
}
return null;
},

preCalculate: function (charts, boundaries) {
Expand Down

0 comments on commit d50834f

Please sign in to comment.