Skip to content

Commit

Permalink
Merge pull request #1550 from tradingview/fix_show_labels_option_on_t…
Browse files Browse the repository at this point in the history
…rend_line_plugin

fix showLabels option on trend-line plugin example
  • Loading branch information
romfrancois committed Mar 25, 2024
2 parents de75f81 + a1680b5 commit 59eec42
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugin-examples/src/plugins/trend-line/trend-line.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ class TrendLinePaneRenderer implements ISeriesPrimitivePaneRenderer {
ctx.moveTo(x1Scaled, y1Scaled);
ctx.lineTo(x2Scaled, y2Scaled);
ctx.stroke();
this._drawTextLabel(scope, this._text1, x1Scaled, y1Scaled, true);
this._drawTextLabel(scope, this._text2, x2Scaled, y2Scaled, false);
if (this._options.showLabels) {
this._drawTextLabel(scope, this._text1, x1Scaled, y1Scaled, true);
this._drawTextLabel(scope, this._text2, x2Scaled, y2Scaled, false);
}
});
}

Expand Down

0 comments on commit 59eec42

Please sign in to comment.