Update Dynamic Text External Resources examples #684
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Code examples have been updated
Necessary changes:
import()
. But can be converted and used https://esm.sh/flatpickr (a working example with flatpickr - DT with Grafana 11 fails for Date-Picker flatpickr volkovlabs-dynamictext-panel#309 (comment))this
in afterRender code to keep data for next updates. Eg. destroy chart before creating a new one. It's show in chart.js exampleThere is a refernce to the page in the External Scripts editor
![Screenshot 2024-06-04 at 12 54 23](https://private-user-images.githubusercontent.com/15867703/336401174-90e02052-df9f-43c3-b9b4-5fad05c9e0c1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkyNzQ5MzIsIm5iZiI6MTcxOTI3NDYzMiwicGF0aCI6Ii8xNTg2NzcwMy8zMzY0MDExNzQtOTBlMDIwNTItZGY5Zi00M2MzLWI5YjQtNWZhZDA1YzllMGMxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI1VDAwMTcxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgxODNiODA2MzlhYzVhN2JhYjI0ZWI4NmJlOGQzMGNmZjc4ZTgzOWI2MzljODVlNTZjYzQ1MTM4NjdjYmQ1ODkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.2VE1qAO7mk75_uco10KsCeVgK8Orjh7_pvIYD5vD1hM)
All working examples here - https://github.com/VolkovLabs/volkovlabs-dynamictext-panel/blob/66a9beefa4dacc7d1ebee995c657d27ec248573b/provisioning/dashboards/libraries.json