P
P
psywalker2019-08-14 21:03:05
React
psywalker, 2019-08-14 21:03:05

How to return jsx markup in adapter.add in amCharts 4?

Question at https://www.amcharts.com/docs/v4/.

categoryAxis.renderer.labels.template.adapter.add("html", (text, target, key) => {
      return `
        <div class="category-label">
          <h3 class="category-label__title">{login}</h3>
          {name} 
        </div>
      `;    
    });

How can I return a JSX element in a callback? I need to do something like:
categoryAxis.renderer.labels.template.adapter.add("html", (text, target, key) => {
      return `
        <div class="category-label">
          <Link to="https:\\bla-bla">Текст</Link>
        </div>
      `;    
    });

I read the Doc, I couldn’t find anything on the topic (I looked about adapters, but either "html" or "text" is always returned there ((

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question