2

How do you insert html into a FusionChart label? I want something like this. I have a fiddle too.

I have read the doc. for the Label and events, but couldn't find anything customizing with custom markup code.

HTML

<div id="chart-container"></div>

JS

const dataSource = {
  chart: {
    caption: "",
    placevaluesinside: "1",
    showvalues: "0",
    plottooltext: "",
    theme: "fusion"
  },
  categories: [
    {
      category: [
        {
//          label: "<input type="checkbox" name="nameTest" value="valueTest">"
          label: "...insert checkbox to the left of the bar..."
        }
      ]
    }
  ],
  dataset: [
    {
      seriesname: "name",
      data: [
        {
          value: "1"
        }
      ]
    }
  ]
};

FusionCharts.ready(function() {
  var myChart = new FusionCharts({
    type: "stackedbar2d",
    renderAt: "chart-container",
    width: "100%",
    height: "100%",
    dataFormat: "json",
    dataSource: dataSource
  }).render();
});
radbyx
  • 9,352
  • 21
  • 84
  • 127
  • 1
    The label attribute takes the value as a string, hence if you are using HTML tag in the label attribute it will be taken as a string, check this demo - https://codepen.io/ayanbhaduryfc/pen/VwwLpYP – Zapdos13 Oct 09 '19 at 05:03
  • Yeah that was my conclusion too, sadly, but thanks know I can be certain. – radbyx Oct 09 '19 at 05:09

0 Answers0