Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Pushed Charts in html content - how to render chart

meesha81 priority asked 2 years ago


If I push HTML content with with data-mdb attributes, chart is not rendered. Of course, because it is html content and MDB "don't do that work" for render chart like single page loaded (not pushed content). I know - I can put chart by javascript code.

But my question is: Is possible to call "something" what display chart based on html content (canvas + data-mdb attributes) or I have to do it only by javascript initialization of chart? Somethink what can force MDB process pushed html content to be chart rendered?


Kamila Pieńkowska staff answered 2 years ago


I don't understand your question. Most charts can be initiated via HTML. More complex needs to be declared with the use of JS.

But if you want to add a chart after HTML content is loaded you have to do it with JS for it to initiate.


meesha81 priority commented 2 years ago

Hi, yes, if you do ajax call and put some content to the div element, chart is not initialized. And yes - that is your second paragraph - after content loaded and some new html content with chart comes, I have to do it by JS event etc.


Kamila Pieńkowska staff commented 2 years ago

Sorry, this is the only way.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 5.0.0
  • Device: PC
  • Browser: Chrome 106
  • OS: Win11
  • Provided sample code: No
  • Provided link: No
Tags