Set a custom font size for the grid

Custom CSS

by Flexmonster Pivot Table

HTML

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

<div>
  <h2>How to set a custom font size for the grid</h2>
  <p>
    To customize the font size, use the <code>font-size</code> property of the
    <code>#fm-pivot-view .fm-grid-layout .fm-cell</code> selector. In this
    example, we've set <code>font-size</code> to <code>15px</code>.
  </p>
  <p>
    <a
      href="https://www.flexmonster.com/doc/customizing-appearance/"
      target="_blank"
    >Visit our docs for more details on customizing the appearance</a>.
  </p>
</div>

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

CSS

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

#fm-pivot-view .fm-grid-layout .fm-cell {
  font-size: 15px;
}

JavaScript

let pivot = new Flexmonster({
  container: "#pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  toolbar: true,
  report: {
    dataSource: {
      filename: "data/data.csv"
    },
    slice: {
      rows: [{
        uniqueName: "Color"
      }, {
        uniqueName: "[Measures]"
      }],
      columns: [{
        uniqueName: "Country"
      }],
      measures: [{
        uniqueName: "Price",
        aggregation: "sum"
      }]
    }
  }
});