Stacked column chart

by Flexmonster Pivot Table

HTML

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

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

CSS

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

.fm-custom-cell {
  display: flex !important;
  align-items: center !important;
  font-size: 12px !important;
}

.fm-custom-cell .flag-icon {
  width: 21px !important;
  height: 16px !important;
  margin-left: 0 !important;
  margin-right: 2px !important;
}

#fm-pivot-view .fm-grid-layout .fm-custom-cell.fm-expanded .fm-expanded-icon::before, 
#fm-pivot-view .fm-grid-layout .fm-custom-cell.fm-collapsed .fm-collapsed-icon::before {
  top: -2px;
  height: 16px;
}

.fm-charts-color-1 {
  fill: #264653 !important;
}

.fm-charts-color-2 {
  fill: #2a9d8f !important;
}

.fm-charts-color-3 {
  fill: #e9c46a !important;
}

.fm-charts-color-4 {
  fill: #f4a261 !important;
}
.fm-charts-color-5 {
  fill: #e76f51 !important;
}

.fm-charts-color-6 {
  fill: #ec8c74 !important;
}

JavaScript

new Flexmonster({
  container: "#pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  height: 780,
  report: {
    dataSource: {
      type: "json",
      filename: "data/data.json",
    },
    slice: {
      rows: [
        {
          uniqueName: "Business Type",
        },
      ],
      columns: [
        {
          uniqueName: "Country",
        },
        {
          uniqueName: "[Measures]",
        },
      ],
      measures: [
        {
          uniqueName: "Price",
          aggregation: "sum",
        },
      ],
    },
    options: {
      viewType: "grid_charts",
      chart: {
        type: "stacked_column",
      },
    },
  },
})