tradingview / charting-library-tutorial

This tutorial explains step by step how to connect your data to the Charting Library
MIT License
397 stars 305 forks source link

how do you add a custom html mark to the tradingvie arealine #99

Open addsave opened 7 months ago

addsave commented 7 months ago

``In the react framework, how do you add a custom html mark to the tradingvie arealine diagram? I looked at the shap and mark in the api and it seems that it cannot customize content with styles (such as a combination of pictures and text). I hope to get your help. Thank you so much

The following is my current code, which can only form a circle mark, which does not meet my needs: getMarks: (symbolInfo, startDate, endDate, onDataCallback, resolution) => { console.log('getMarks', symbolInfo, startDate, endDate, onDataCallback, resolution); var Arr = [ { id: 1, time: Date.now() / 1000 - 45, color: 'red', text: '<div>3333</div>', label: 'test', labelFontColor: 'yellow', minSize: 30, }, ] let res = onDataCallback(Arr); console.log(res, "=====getMarks running"); },

kdunaev-tv commented 6 months ago

Unfortunately, it is currently not possible to customize the shape of bar marks. We are collecting requests for this functionality. At the moment it is not possible to say whether this will be implemented or any ETAs.