Skip to content

Commit e273d9e

Browse files
dtanp-rftwattachai-lsegbualoy-napat
authored
fix(interactive-chart): hide tradingview default attribution logo (#1253)
* fix(interactive-chart): hide tradingview default attribution logo * fix(interactive-chart): hide tradingview default attribution logo * Update packages/elements/src/interactive-chart/index.ts Co-authored-by: wattachai <[email protected]> * fix(interactive-chart): hide tradingview default attribution logo * fix(interactive-chart): hide tradingview default attribution logo --------- Co-authored-by: wattachai <[email protected]> Co-authored-by: Napat Bualoy <[email protected]>
1 parent 8b91315 commit e273d9e

File tree

5 files changed

+26
-17
lines changed

5 files changed

+26
-17
lines changed

package-lock.json

Lines changed: 10 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/elements/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@
466466
"d3-interpolate": "^3.0.1",
467467
"date-fns": "^2.29.3",
468468
"escape-string-regexp": "^5.0.0",
469-
"lightweight-charts": "^4.1.0",
469+
"lightweight-charts": "^4.2.0",
470470
"tslib": "^2.3.1"
471471
},
472472
"devDependencies": {

packages/elements/src/interactive-chart/__test__/__snapshots__/interactive-chart.test.snap.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ snapshots["interactive-chart/InteractiveChart Default DOM structure is correct"]
1010
<div part="jump-button">
1111
</div>
1212
</div>
13-
<div
13+
<a
14+
href="https://www.tradingview.com"
1415
part="branding-container"
15-
title=""
16-
tooltip="Powered by Trading View"
16+
target="_blank"
17+
title="Charting by Trading View"
1718
>
18-
</div>
19+
</a>
1920
<div part="chart">
2021
</div>
2122
`;

packages/elements/src/interactive-chart/index.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,8 @@ export class InteractiveChart extends ResponsiveElement {
588588
color: this.theme.backgroundColor
589589
},
590590
textColor: this.theme.textColor,
591-
fontFamily: defaultFontFamily
591+
fontFamily: defaultFontFamily,
592+
attributionLogo: false
592593
},
593594
leftPriceScale: {
594595
borderColor: this.theme.scalePriceBorderColor
@@ -1183,15 +1184,20 @@ export class InteractiveChart extends ResponsiveElement {
11831184
<div part="jump-button-container">
11841185
<div part="jump-button"></div>
11851186
</div>
1186-
<div part="branding-container" title="" tooltip="Powered by Trading View">
1187+
<a
1188+
href="https://www.tradingview.com"
1189+
part="branding-container"
1190+
title="Charting by Trading View"
1191+
target="_blank"
1192+
>
11871193
<svg width="33" height="19" viewBox="0 0 611 314" part="branding">
11881194
<path
11891195
fill-rule="evenodd"
11901196
clip-rule="evenodd"
11911197
d="M341 124C375.242 124 403 96.2417 403 62C403 27.7583 375.242 0 341 0C306.758 0 279 27.7583 279 62C279 96.2417 306.758 124 341 124ZM481 314H337L467 4H611L481 314ZM124 4H248V128V314H124V128H0V4H124Z"
11921198
/>
11931199
</svg>
1194-
</div>
1200+
</a>
11951201
<div part="chart"></div>
11961202
`;
11971203
}

packages/theme-compiler/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"fs-extra": "^8.1.0",
3131
"glob": "^10.3.9",
3232
"htmlparser2": "^4.0.0",
33-
"less": "^4.2.0",
33+
"less": "^4.2.1",
3434
"less-plugin-npm-import": "^2.1.0",
3535
"postcss": "^8.4.49",
3636
"svgo": "^3.2.0",

0 commit comments

Comments
 (0)