Bubble chart

Integration with Highcharts

by Flexmonster Pivot Table

HTML

<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<script src="https://cdn.flexmonster.com/lib/flexmonster.highcharts.js"></script>

<script src="https://code.highcharts.com/12.5.0/highcharts.js"></script>
<script src="https://code.highcharts.com/12.5.0/highcharts-more.js"></script>
<script src="https://code.highcharts.com/12.5.0/modules/accessibility.js"></script>

<div id="pivot-container"></div>
<div id="highcharts-container"></div>

CSS

@import url(https://cdn.flexmonster.com/assets/jsfiddle-styles.css);

#highcharts-container {
  margin: 20px;
}

JavaScript

let pivot = new Flexmonster({
  container: "#pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  licenseFilePath: "https://cdn.flexmonster.com/jsfiddle.charts.key",
  toolbar: true,
  report: {
    dataSource: {
      filename: "data/data.csv"
    },
    slice: {
      rows: [
        { uniqueName: "Country" },
        { uniqueName: "[Measures]" }
      ],
      columns: [
        {
          uniqueName: "Category",
          filter: {
          	exclude: ["Cars"]
          }
        }
      ],
      measures: [
        { uniqueName: "Price" },
        { uniqueName: "Quantity" }
      ]
    }
  },
  reportcomplete: function() {
    pivot.off("reportcomplete");
    bubbleChart();
  }
});

function bubbleChart() {
  pivot.highcharts.getData({
      type: "bubble"
    },
    function(chartConfig) {
      Highcharts.chart('highcharts-container', chartConfig);
    },
    function(chartConfig) {
      Highcharts.chart('highcharts-container', chartConfig);
    }
  );
}